Can I add a custom attribute to an HTML tag like the following?
<tag myAttri="myVal" />
You can add custom attributes to your elements at will. But that will make your document invalid.
In HTML 5 you will have the opportunity to use custom data attributes prefixed with data-.
data-
2.1m questions
2.1m answers
60 comments
57.0k users