# attr-lowercase

> Enforces all attribute names in HTML to be lowercase for consistency and standards compliance.

Attribute name must be lowercase.

Level: Error

## Config value

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

* `true`: enable rule
* `false`: disable rule
* `['fooBar', 'Test']`: enable rule except for the given attribute names. All SVG camelCase properties are included, for example `viewBox`

### Example

[Section titled “Example”](#example)

```json
{
  ...
  "attr-lowercase": ['fooBar']
  ...
}
```

### The following pattern is **not** considered a rule violation:

[Section titled “The following pattern is not considered a rule violation:”](#the-following-pattern-is-not-considered-a-rule-violation)

```html
<img src="test.png" alt="test" />


<!-- known SVG attributes are ignored -->
<svg width="200" height="200" viewBox="0 0 200 200" />
```

### 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="test.png" ALT="test" />
```

### Why this rule is important

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

Lowercase attribute names are required for HTML5 compliance and to ensure consistency across different HTML elements.