Skip to content

h1-require

A H1 heading element is required in HTML documents. The heading can not be empty.

Level: Warning

  • true: enable rule
  • false: disable rule

The following patterns are not considered rule violations

Section titled “The following patterns are not considered rule violations”
<html><body><h1>Title</h1></body></html>

The following patterns are considered rule violations

Section titled “The following patterns are considered rule violations”
<html><body><p>No heading</p></body></html>
<html><body><h1></h1></body></html>
<html><body><h1> </h1></body></html>

The <h1> element is the main heading of the page and is used to provide a clear and concise title for the page. It is also used to help with SEO by providing a clear and concise title for the page.