“The id attribute got more classy in HTML5” is written at some pages. If I use class attribute instead of id, does it conform to HTML5? Thanks for your help.
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.
I believe you’re talking about this article. Well, nothing has really changed —
classes andids are used the same way as in HTML4.Except one thing: The HTML4 spec says the following
However, in the HTML5 spec, the requirement for
ids is much less rigidSo HTML5
ids can accept more characters, which is what the article you’re reffering to is talking about.