开发者

Heading element inside <li> element

开发者 https://www.devze.com 2023-02-02 16:09 出处:网络
Is <H开发者_如何学Python#> element inside HTML <li> element considered semantically correct?Yep. According to http://validator.w3.org/check anyway... it\'s a great tool.There are many tool

Is <H开发者_如何学Python#> element inside HTML <li> element considered semantically correct?


Yep. According to http://validator.w3.org/check anyway... it's a great tool.


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 :)

0

精彩评论

暂无评论...
验证码 换一张
取 消