Creating Headings

HTML provides six heading levels for establishing the hierarchy of information in your pages. Mark up each heading with one of the h1h6 elements, where h1 is a top-level heading, h2 is a subheading of an h1, h3 is a subheading of an h2, and so on. Headings are among the most important HTML elements in any page, as you will learn.

Think of the h1h6 headings as similar to headings within a non-HTML document you might write, like a sales report, term paper, product manual, news article—you get the idea. When you write those types of documents, you identify each major section of content with a heading and any number of subheadings (and sub-subheadings, and so on), as appropriate. Collectively, those headings represent the document’s ...

Get HTML5 and CSS3: Visual QuickStart Guide, Seventh Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.