Attribute name case-sensitive
Warns that the attribute name is not in one of uppercase or lowercase letters. Unlike HTML, foreign elements (SVG or MathML) are case sensitive, so they are not subject to this rule.
Attributes have a name and a value. Attribute names must consist of one or more characters other than controls, U+0020 SPACE, U+0022 ("), U+0027 ('), U+003E (>), U+002F (/), U+003D (=), and noncharacters. In the HTML syntax, attribute names, even those for foreign elements, may be written with any mix of ASCII lower and ASCII upper alphas. [cite: https://html.spec.whatwg.org/#attributes-2]
🔧 Fixable
Rule Details
👎 Examples of incorrect code for this rule
<div DATA-ATTR></div>
<div Data-Attr></div>
👍 Examples of correct code for this rule
<div data-attr></div>
Setting value
Type: "no-upper" | "no-lower"
value | default | description |
---|---|---|
"no-upper" | ✓ | Warns that the attribute name is not in lowercase. |
"no-lower" | Warns that the attribute name is not in uppercase. |
Default severity
warning