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

How to fix

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)

Related

All tools · Canonical