Quick answer
Attributes must be valid for the element.
HTML Invalid Attribute
Attributes must be valid for the element. Unknown or wrong attribute causes validation error.
Common causes
- Typo in attribute name.
- Attribute not allowed on element.
How to fix
- Check spelling and element spec.
- Remove or replace invalid attribute.
FAQ
- How to know valid attributes?
- Check HTML spec per element.
- Data attributes?
- data-* is valid on any element.
Fix it now
Try in validator (prefill this example)