Is <H#> element inside HTML <li> element considered semantically correct?
Is <H#> element inside HTML <li> element considered semantically correct?
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.
There are many tools that no web developer should be without. One of those tools is a good HTML Validator add-on for your browser.
Firefox HTML Validator Add-on:
http://users.skynet.be/mgueury/mozilla/
Chrome HTML Validator add-on:
http://robertnyman.com/2010/04/07/html-validator-extension-for-google-chrome/
I especially like the one for Firefox. If there is a validation error in your HTML, not only will it tell you, but it also tells you why it’s bad and how to fix it.
To answer your question, I do believe h# are considered valid inside an <li> element. But it may also depend on DOCTYPE as there are different rules for different HTML DOCTYPES. However, with the validator you’ll never need to ask a question like this again 🙂