So far we have been creating little bits of html. Now let’s create a whole document.
<!DOCTYPE html>
<html>
<head>
<title>A demo page</title>
</head>
<body>
Your page goes here
</body>
</html>
<!DOCTYPE html>
This is an HTML5 doctype. It tells the browser what type of HTML we are using. The HTML5 doctype is the only doctype you should be using at the moment.
<html></html>
This tag wraps the entire document. We call it the root tag. Any tree we draw will have this as it’s root.
<head></head>
This tag marks off the header of the document. This section contains information about the document such as the title, and description. You can also link to and external resources your page needs here, like JavaScript files or CSS stylesheets.
<body></body>
This is your page body, the part of the page that will be rendered on the screen.
All the code we have written so far, all your h1, p, table, el, etc tags go in here.
You are going to create a little page on any topic you like. Don’t worry that it doesn’t look pretty yet, we’ll get to that soon.