# attr-no-duplication

> Prevents duplicate attributes in a single HTML element to ensure valid and clean markup.

The same attribute can’t be specified 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
<img src="a.png" />
```

### 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
<img src="a.png" src="b.png" />
```

### Why this rule is important

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

Duplicate attributes can cause unexpected behavior and make the code harder to read and maintain.