All pages will use the same starting point and a basic structure. This is what we’re going to start building.
Now it won’t really be effective for anything but the most basic pages, but it gives it the necessary start that all HTML 5 pages need.
First, we need to define what we call the doctype. This is the very first tag at the top of the page and lets us know that the page is going to be using the HTML 5 specification.
<!doctype html>
We specify the !doctype to let the browser know what type of tag it is, and html is used to define that we are using the HTML 5 specification.
Now you might ask why it’s not html5. That’s because when the HTML 5 specification was implemented, it was decided that is should be a living specification subject that constantly changes. Instead of having different versions like previously, it simply is html.
I should note here that the doctype tag only has to appear at the top of the page, and there is no corresponding closing doctype tag. I should also note that it can be any form of upper, lower, or mixed case, although standard practice is to write tags in lowercase.
After the doctype, you will have your HTML tags. This has an open and closing tag, and everything within them will be the webpage.
Generally the open html tag should be on the second line of our file, and the closing html tag will be on the last line of the document.
Within the opening html tag, you will probably want to use the lang attribute, which is how we define what the default language is for the web page, however, this attribute, while commonly seen, is not required.
With our version, we’ve specified the language to be “en” which is the designation for the English language.
<html lang="en">
.... web page information ...
</html>
This is technically a web page, however it would just show a blank screen. All we’ve defined is essentially a large container for the web page to sit within. Next we’re going to start looking at how the page is constructed into sections.
Base HTML5 Structure was originally found on Access 2 Learn