How to declare a custom attribute in HTML ?
Attributes are extra information that provide for the HTML elements. There are lots of predefined attributes in HTML.
- You must define your attribute in lower case letters. Even though some browsers do automatically correct mistakes in the markup, it can cause errors, and they are not valid HTML5.
- It must not start with XML (case-insensitive)
- It should not contain any colon characters ( : ).
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML course.