HTML and CSS Reference
In-Depth Information
1.8 Modifying the Document Outline
Problem
You have a primary page title and tagline marked up with headings (
h1
and
h2
, respec-
tively), but you don't want the tagline included in your document outline.
Solution
Contain the both headings with the
hgroup
element:
<hgroup>
<h1>HTML5, for Fun & Profit</h1>
<h2>Tips, Tricks and Resources</h2>
</hgroup>
Discussion
hgroup
hides all headings except the highest ranked from the document outline. In the
above example, the only content that would appear in the document outline is
“HTML5, for Fun & Profit” from the
h1
.
Even if we reverse the source order of the two headings, only the highest-ranked (
h1
)
content will be pulled into the document outline:
<hgroup>
<h2>Tips, Tricks and Resources</h2>
<h1>HTML5, for Fun & Profit</h1>
</hgroup>
See Also
1.9 Emphasizing Text
Problem
You want to add emphasis or emphatic stress to text content.
Solution
Contain the text to be emphasized with the
em
element:
<p>My name is
<em>Jane</em>
, not John.</p>