Like a tag that I can use to store some necessary info? But really isn’t required or used by the HTML? Works like the tag attribute for objects on Visual Basic?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Up until HTML5 no. With HTML 5 there is provision for this with the
data-*attribute.For example:-
In current technology there is no “official” away to do this. However all browsers allow you to add any arbitary attribute to a HTML element so in HTML4 you can do this:-
Which as you can see is identical but not offically sactioned and if you want strict XHMTL compliance will be considered “broken”.
You can access the attribute just as you would any other:-