Questions tagged [custom-attribute]

According to HTML 5.1 CR, `an attribute value is a string` and `attribute values on HTML elements may be any string value`. The term html-`custom-attribute` is used to distinguish "any-string"-attributes from explicitly listed Global attributes in the HTML standard.

According to HTML 5.1 CR an attribute value is a string and attribute values on HTML elements may be any string value. The term html-custom-attribute is used to distinguish "any-string"-attributes from explicitly listed Global attributes in the HTML standard.

62 questions
411
votes
18 answers

Can I add a custom attribute to an HTML tag?

Can I add a custom attribute to an HTML tag like the following?
lovespring
  • 19,051
  • 42
  • 103
  • 153
260
votes
15 answers

Custom attributes - Yea or nay?

Recently I have been reading more and more about people using custom attributes in their HTML tags, mainly for the purpose of embedding some extra bits of data for use in javascript code. I was hoping to gather some feedback on whether or not using…
TM.
  • 108,298
  • 33
  • 122
  • 127
16
votes
2 answers

Using custom type attribute in