# h1-require

> Ensures that an HTML document contains at least one `<h1>` element for proper document structure and accessibility.

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

Level: Warning

## Config value

[Section titled “Config value”](#config-value)

* `true`: enable rule
* `false`: disable rule

### The following patterns are **not** considered rule violations

[Section titled “The following patterns are not considered rule violations”](#the-following-patterns-are-not-considered-rule-violations)

```html
<html><body><h1>Title</h1></body></html>
```

### The following patterns are considered rule violations

[Section titled “The following patterns are considered rule violations”](#the-following-patterns-are-considered-rule-violations)

```html
<html><body><p>No heading</p></body></html>
```

```html
<html><body><h1></h1></body></html>
```

```html
<html><body><h1>   </h1></body></html>
```

### Why this rule is important

[Section titled “Why this rule is important”](#why-this-rule-is-important)

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.