HTML and CSS Reference
In-Depth Information
Required Attributes
There aren't any required attributes for the nav element.
Optional Attributes
The nav element doesn't offer any optional attributes.
Heading elements ( h1 through h6 , and the new hgroup element) act as titles to introduce a section of
content. They're flow content, but also belong to their own content model: heading content . The first child
heading element to appear within any sectioning element— section , article , aside , or nav —acts as the
heading for the entire parent element, introducing and establishing that block of content, even if other
content appears before the heading.
h1, h2, h3, h4, h5, and h6
HTML offers a range of six headings, with each level indicating the heading's relative importance or its
rank in the document hierarchy (and, by association, the importance or rank of the content that heading
introduces). With these headings, you can organize your content into distinct topics or areas of interest,
sorted from the top down in order of importance, and with each section containing subsections of its own.
Listing 4-7 shows some content with headings and short paragraphs, where each heading introduces the
content that follows it. The different heading levels imply a clear hierarchy of importance; the top-level
heading introduces the entire section, whereas the subheadings beneath it introduce lesser sections within
that. The lower headings here simply imply subsections under the previous headings, they're not explicit
sections defined by nested sectioning elements.
Listing 4-7. Headings and paragraphs
<h1>Costume Accessories</h1>
<p>All the trappings and trimmings.</p>
<h2>Masks and Cowls</h2>
<p>Protect your secret identity.</p>
<p>Facial coverage.</p>
<p>Head coverage.</p>
The h1 element designates the top-level heading—the most important one in the section, or even in the
entire document. Because there can logically be only one “most important” heading, it's customary for only
one h1 to occur within a single section. This isn't a requirement of HTML, just a good semantic rule of
thumb. You should also try to keep your headings in the proper sequence—an h5 shouldn't come before
an h2 unless you have a really good reason to break their natural order.
Search WWH ::

Custom Search