<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My First Webpage</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="style.css" rel="stylesheet">
<script src="script.js" defer></script>
</head>
<body>
</body>
</html>
Tell the browser the version of html to render the document.
For html5:
<DOCTYPE html>Root element.
<html lang="en">
</html>
The lang attribute specify the language and improve accessibility.
The <head> element store important meta-information about the page, and requirement to render correctly in the browser.
Do not put element that display content.
Always include the charset encoding of the webpage.
It ensures that the page display special symbols and character correctly.
<meta charset="uft-8">
Title displayed in the browser tab. Should always be included.
If not specify, the name of the file is displayed. (ex: index.html)
<title>webpage tilte</title>
Element where the content displayed to the user is specify.