Formatting an HTML document usually requires little more than identifying the word, sentence, or section you wish to format and applying the appropriate opening and closing HTML tags to the selection. Let’s begin with headings.
Headings, simply put, are a way to organize your document and distinguish different sections and topics.
<h1> through <h6> tags
<h3> display a larger, bolder font than the default font for most browser software. Headings
<h6> display a smaller font than the default. The
<h4> heading usually displays the default font size in bold.
Headings require an opening and a closing tag:
<h1>, <h2>, ... <h6> – opening tags
</h1>, </h2>, ... </h6> – closing tags
All text between the opening and closing tags will be part of the heading. The tag has no other effect on non-text elements. The heading tags also place a blank line after the heading, so there is no need to use paragraph or line break tags with a heading.
<h1>Heading One</h1> <h3>Heading Three </h3>
Note: Many things in HTML can be a little confusing, and this is one of them. For HTML Headings, H1 is the largest and H6 is the smallest. When we get to the font size options, they work in the opposite way — the smaller number produces a smaller font and increasing the number increases the font size.