DEV Community

Cover image for HTML tags | h1-h6
Carlos Espada
Carlos Espada

Posted on • Updated on

HTML tags | h1-h6

They are used to create headings in the document, with the <h1> being the most important and the <h6> being the least. You do not have to use them thinking about how they look, but control the design with CSS.

Elements cannot be skipped (<h1>-<h2>-<h4>) and there can only be one <h1> per document.

As there is no actual implementation of the outline algorithm or forecast of it in any browser or assistive technology, it is better to use them in descending order, as always, instead of nesting <h1> inside <section> or <article>.

It is the main tool to discover information using assistive technologies, so it is very important to take care of them so that the page is accessible.

  • Type: block
  • Self-closing: No
  • Semantic value: No

Definition | Example | Support

Discussion (0)