Heading elements are used to divide your document into sections
and subsections. The top-level heading,
h1, will usually occur
only once in a document and will contain the title of the document. It will
often contain the same content as the
By default, each successive heading element is styled to indicate
h2 is most often used as a section
title, so it is rendered in a smaller font, giving it less emphasis than
h3 element is used for sub-sections, and
receives less emphasis still, and so on. The chain of emphasis decreases as
all the way to
h6. Since information is not usually subdivided
into sub-sub-sections and beyond,
h4 elements and below are
less commonly used than the higher-lever heading elements.
HTML is a formal language, and like all formal languages is has a well defined set of rules for its syntax.
The World Wide Web Consortium (W3C) provides a web site to check the syntax, or markup validation of your web pages. The URL for the validator is http://validator.w3.org. You can check your pages to see if they have correct syntax by copy and pasting, uploading, or entering a web address for them (if they are on a public website).
A green bar means your page has passed validation, and a red bar means it contains errors. You should check all your pages as you go through this tutorial and be sure you get a green bar.
If your web page is publicly accessible, you can add this to the bottom
of your page (above the
</body> tag) to create a link
that sends your page to the W3C for validation:
<footer style="text-align: center;"> <a href="http://validator.w3.org/check/referer"> <strong> HTML </strong> Valid! </a> </footer>
Here is version of the
minimal_page.html with the
validation link included. After clicking on the link, right mouse click on
the page that loads (which will look completely empty except for the
HTML Valid! link) and select
Save Page As... to
download a local copy of the page.