Headings and subheadings should provide an outline of page content, so users can understand how the page is structured and easily navigate between headings.
Techniques using HTML
The following are best practices for using HTML headings:
<h1>for the main heading of the page. For most pages, there will be only one
<h1>, marking the content that is unique on that page. The name of the website, which is often shown at the top of each web page within a website, does not need to be tagged as a heading at all.
<h2>for subheadings beneath the main heading.
- Use additional levels of headings (
<h6>) as needed if there are additional levels of sub-headings within your web page content.
- Ensure headings form an outline of your page content; avoid skipping heading levels.
Techniques using content management systems
WordPress, Drupal, and other content management systems all have a rich content editor for authoring content. The editor includes a toolbar with a format selector (see screenshot below). Use this format selector to select the appropriate heading level for your content.
Note that content management systems typically reserve Heading 1 for the title of the page or post, so the first heading that should be used in the rich content editor is Heading 2. In some editors, Heading 1 is not an option, but this may not always be the case.