HTML and CSS Reference
In-Depth Information
This produces the expected outline, shown in Figure 1-13.
FIGURE 1-13 The output of a series of header elements to create a document structure
The outline shows the default styles of the different header elements as expected. The
heading elements create implied sections and subsections within the document. This is still
valid in HTML5. However, you shouldn't leave the page sectioning set to implied sectioning as
presented by the header elements; rather, you should explicitly define the sections by using
the appropriate semantics. Also recommended is that <h1> elements be used solely through-
out an HTML5 document. To produce the same hierarchy in this fashion, you would need to
change your HTML to be like the following:
<section>
<h1>Fruits and Vegetables</h1>
<section>
<h1>Fruit</h1>
<section>
<h1>Round Fruit</h1>
</section>
<section>
<h1>Long Fruit</h1>
</section>
</section>
<section>
<h1>Vegetables</h1>
<section>
<h1>Green</h1>
</section>
<section>
<h1>Colorful</h1>
</section>
</section>
</section>
Search WWH ::




Custom Search