W3C validation says h1 in article is invalid

故事扮演 提交于 2019-12-01 03:05:26
unor

It is valid to use h1 there.

The W3C Markup Validator does report a warning, not an error. You can ignore warnings if you like to.

The HTML5 spec "encourages" authors to use "headings of the appropriate rank" instead of h1 everywhere. But an encouragement is not a normative requirement.

<h1> Tag must be used as top-level heading, i.e, as page heading/tittle. Here you are the W3C Reference

That's is because SEO purposes; ensuring content is formatted in the best way possible to aid search engine indexing; and because technical correctness; ensuring that markup is written in accordance with the appropriate W3C spec.

Depending on the strucutre of your page, you can use more than one perhaps, but it's better not tu use more than one <h1> tag

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!