I saw this on a CMS(sitecore) based Asp.net 2.0 Webform based site.
<a class="boardTextLink " id="boardTextLink6" headerindex="5h">
is it semantically correct and w3c valid? Can we make and use custom attributes like this? Is it good practice?
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.
no it’s not correct and not a good practice. This kind of markup would fail to validate
This argument was used against dojo toolkit, the JavaScript framework heavily use custom attributes for doing some automatic replacement to create widget.
more reading about the custom attribute VS class here.
I think it’s kind of okay to use that for private website (CMS admin interface closed website intranet) but you should avoid it on public websites.