In the last chapter, we used the h1 and h2 elements to indicate headings for the Black Goose Bistro page. There are actually six levels of headings, from h1 to h6. When you add headings to content, the browser uses them to create a document outline for the page. Assistive reading devices such as screen readers use the document outline to help users quickly scan and navigate through a page. In addition, search engines look at heading levels as part of their algorithms (information in higher heading levels may be given more weight). For these reasons, it is a best practice to start with the Level 1 heading (h1) and work down in numerical order (see note), creating a logical document structure and outline.
This example shows the markup for four heading levels. Additional heading levels would be marked up in a similar manner.
<p>Serif typefaces have small slabs at the ends of letter strokes. In general, serif fonts can make large amounts of text easier to read.</p>
<p>Description of the Baskerville typeface.</p>
<p>The history of the Baskerville typeface.</p>
<p>Description and history of the Georgia typeface.</p>
<p>Sans-serif typefaces do not have slabs at the ends of strokes.</p>