HTML and CSS Reference
In-Depth Information
<body>
<h1>Main heading</h1>
<p>Some text</p>
<h2>Level 2 heading</h2>
<p>Some more text</p>
<h3>Level 3 heading</h3>
<p>A bit more text</p>
<h2>Another level 2 heading</h2>
<p>The last bit of text</p>
</body>
In a plain document with no other sectioning con-
tent, the outline will match the heading levels.
This is similar to the way a table of contents in
Wikipedia is generated (right). Headings can also
be grouped using the <hgroup> element. Let's see
how they affect the document outline:
<hgroup>
<h1>Main heading</h1>
<h2>
Subheading to main heading
</h2>
</hgroup>
<p>Some text</p>
<h2>Level 2 heading</h2>
<p>Some more text</p>
<h3>Level 3 heading</h3>
<p>A bit more text</p>
<hgroup>
<h2>Another level 2 heading</h2>
<h3>
Subheading to level 2 heading
</h3>
</hgroup>
<p>The last bit of text</p>
Search WWH ::




Custom Search