The heading tags <h1> to <h6>
The primary function of heading tags is to create a visual and logical hierarchy of the page. There are 6 heading elements from <h1>
to <h6>
, with <h1>
being the most and <h6>
the least important.
Visually, headings stand out from the body text with a more prominent and bolder font and paragraph breaks before and after. Logically, search engines use the headings to index the structure and content of the web page. This helps sighted and assistive technology users quickly skim through the page and find the information they need.
Pro Tip: Don't skip heading levels. Use <h1>
headings for the main title of the page, followed by <h2>
headings, then the less important <h3>
, and so on.