```
# id-unique
> Ensures all id attributes in an HTML document are unique to prevent conflicts and unexpected behavior.
ID attributes must be unique in the document.
Level: Error
## 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
```
### The following pattern is considered a rule violation:
[Section titled “The following pattern is considered a rule violation:”](#the-following-pattern-is-considered-a-rule-violation)
```html
```
### Why this rule is important
[Section titled “Why this rule is important”](#why-this-rule-is-important)
Duplicate ID attributes can cause unexpected behavior and make the code harder to read and maintain.
Further reading: [Axe Rules - duplicate-id](https://dequeuniversity.com/rules/axe/4.1/duplicate-id)
# inline-script-disabled
> Disallows the use of inline JavaScript in HTML elements for improved security and maintainability.
Inline script cannot be used.
Level: Warning
## Config value
[Section titled “Config value”](#config-value)
* `true`: enable rule
* `false`: disable rule
### The following patterns are considered violations
[Section titled “The following patterns are considered violations”](#the-following-patterns-are-considered-violations)
```html
test1
```
# inline-style-disabled
> Disallows the use of inline style attributes to promote separation of content and presentation.
Inline style cannot be used.
Level: Warning
## Config value
[Section titled “Config value”](#config-value)
* `true`: enable rule
* `false`: disable rule
### The following pattern is considered a rule violation:
[Section titled “The following pattern is considered a rule violation:”](#the-following-pattern-is-considered-a-rule-violation)
```html
```
## Why this rule is important
[Section titled “Why this rule is important”](#why-this-rule-is-important)
Inline styles can make the code harder to read and maintain. They also make it harder to override styles with CSS.
# input-requires-label
> Requires every
element to have an associated
for accessibility compliance.
All ` ` tags must have a corresponding `` tag.
Level: Warning
## Config value
[Section titled “Config value”](#config-value)
* `true`: enable rule
* `false`: disable rule
### The following patterns are considered rule violations
[Section titled “The following patterns are considered rule violations”](#the-following-patterns-are-considered-rule-violations)
```html
```
### 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
Password
```
### Why this rule is important
[Section titled “Why this rule is important”](#why-this-rule-is-important)
This rule ensures that the input element has a corresponding label element for accessibility compliance.
Further reading: [Axe Rules - input elements must have labels](https://dequeuniversity.com/rules/axe/4.1/label)
# link-rel-canonical-require
> Ensures every HTML document includes a canonical link tag within the head element for better SEO and duplicate content management.
A ` ` with non-blank href must be present in `` tag.
Level: Error
## 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
```
### The following patterns are considered rule violations
[Section titled “The following patterns are considered rule violations”](#the-following-patterns-are-considered-rule-violations)
```html
```
## Why this rule is important
[Section titled “Why this rule is important”](#why-this-rule-is-important)
While it’s generally not critical to specify a canonical preference for your URLs, there are several reasons why you would want to explicitly tell search engines about a canonical page in a set of duplicate or similar pages:
* **Specify preferred URL**: Tell search engines which URL you want people to see in search results
* **Consolidate signals**: Help search engines consolidate signals from similar pages into a single, preferred URL
* **Simplify tracking**: Get consolidated metrics for specific content across multiple URLs
* **Optimize crawling**: Prevent search engines from wasting time crawling duplicate content
# main-require
> Ensures that an HTML document contains a `` element within the `` tag for proper document structure and accessibility.
A `` element is required within the `` tag of HTML documents.
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
Content
```
```html
Content
```
### The following patterns are considered rule violations
[Section titled “The following patterns are considered rule violations”](#the-following-patterns-are-considered-rule-violations)
```html
No main tag
```
```html
```
### Why this rule is important
[Section titled “Why this rule is important”](#why-this-rule-is-important)
This rule helps ensure that the document has a clear and accessible structure, which is important for both users and screen readers.
Further reading: [Axe Rules - landmark-one-main](https://dequeuniversity.com/rules/axe/4.9/landmark-one-main)
# meta-charset-require
> Ensures every HTML document includes a meta charset tag within the head element for proper character encoding.
A ` ` must be present in `` tag.
Level: Error
## 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
```
### The following patterns are considered rule violations
[Section titled “The following patterns are considered rule violations”](#the-following-patterns-are-considered-rule-violations)
```html
```
# meta-description-require
> Ensures every HTML document includes a non-blank meta description tag within the head element for better SEO.
A ` ` with non-blank content must be present in `` tag.
Level: Error
## 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
```
### The following patterns are considered rule violations
[Section titled “The following patterns are considered rule violations”](#the-following-patterns-are-considered-rule-violations)
```html
```
## Why this rule is important
[Section titled “Why this rule is important”](#why-this-rule-is-important)
The ` ` tag is used to provide a description of the page, which helps with SEO.
Further reading:
* [MDN Web Docs - Setting a document meta description](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/content#setting_a_document_meta_description)
* [Google Search Central - Meta descriptions](https://developers.google.com/search/docs/appearance/snippet#meta-descriptions)
# meta-viewport-require
> Ensures every HTML document includes a meta viewport tag within the head element for proper responsive design.
A ` ` must be present in `` tag.
Level: Error
## 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
```
### The following patterns are considered rule violations
[Section titled “The following patterns are considered rule violations”](#the-following-patterns-are-considered-rule-violations)
```html
```
## Why this rule is important
[Section titled “Why this rule is important”](#why-this-rule-is-important)
The ` ` tag is used to control the viewport of the page, which helps with responsive design.
# script-disabled
> Disallows the use of
```
```html
```
# space-tab-mixed-disabled
> Prevents mixing spaces and tabs for indentation at the beginning of lines to ensure consistent formatting.
Blank-space (space and tab) characters should not be mixed in the beginning of any line.
Level: Warning
## Config values
[Section titled “Config values”](#config-values)
* `space`: space mode (only spaces are valid for indentation)
* `space4`: space mode and require 4 space characters
* `tab`: tab mode (only tab characters are valid for indentation)
* `false`: disable rule
### Example
[Section titled “Example”](#example)
```json
{
...
"space-tab-mixed-disabled": space4
...
}
```
### 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
33333333
```
### The following pattern is considered a rule violation:
[Section titled “The following pattern is considered a rule violation:”](#the-following-pattern-is-considered-a-rule-violation)
```html
333
3333
```
Note
In the examples above, spaces and tabs are represented by `3` and ``, respectively, to make the difference visible.
# spec-char-escape
> Requires special characters in HTML to be properly escaped to prevent rendering issues.
Special characters must be escaped.
Level: Error
## Config value
[Section titled “Config value”](#config-value)
* `true`: enable rule
* `false`: disable rule
### The following patterns are **not** considered violations
[Section titled “The following patterns are not considered violations”](#the-following-patterns-are-not-considered-violations)
```html
aaa>bbb<ccc
Steinway & Sons, Q&A
Steinway & Sons, Q&A
```
### The following pattern is considered a rule violation:
[Section titled “The following pattern is considered a rule violation:”](#the-following-pattern-is-considered-a-rule-violation)
```html
aaa>bbb
```
## Why this rule is important
[Section titled “Why this rule is important”](#why-this-rule-is-important)
Special HTML characters like `<`, `>`, and `&` must be escaped to prevent them from being interpreted as HTML tags or entities. This avoids rendering issues and potential cross-site scripting (XSS) vulnerabilities.
# src-not-empty
> Requires the src attribute of img, script, and link elements to have a non-empty value.
Src of img(script, link) must set value.
Empty of src will visit current page twice.
Level: Error
## 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