HTML and CSS Reference
In-Depth Information
There are six levels of headings, from <h1> to <h6> , with <h1> representing the top level. Like the
<p> tag, all heading tags are containers and coded like this:
<h1>Famous Quotes of Henry David Thoreau</h1>
Again, like the paragraph tag, heading tags are block tags and have a bit of space added to their top
and bottom margin by default. You can, of course, adjust or eliminate the margins using CSS as well
as control all the other available properties.
To learn how to style headings as well as other text elements, see Lesson 7.
Without any additional styling, browsers typically present the six levels of headings as bolded text,
in descending sizes from <h1> to <h6> as shown in Figure 6-3.
FiGure 6-3
It is considered a best practice to use heading tags in a hierarchical order, like an outline. Though
there are no restrictions against using headings out of sequence or skipping over them, web pages
are more likely to be future-compatible when the heading tags are in order.
Although there are six heading levels, web designs rarely use them all.
Personally, I almost never go below an <h3> tag or often use only <h1> and
<h2> tags.
Search WWH ::




Custom Search