【发布时间】:2014-11-28 17:04:15
【问题描述】:
据我了解,良好的 HTML5 做法是使用 h2-h6 标签命名所有部分:
<section id='chapter_one' class='chapter'>
<h3>Chapter One</h3>
<p>My site has lots of content.</p>
</section>
没有元素,w3c 验证器给出“节缺少标题。考虑使用 h2-h6 元素为所有节添加标识标题”。很好,但是有没有办法为节标签使用内联元素而不是块元素?
<section id='chapter_one' class='chapter'>
<p>Welcome to <span>Chapter One</span> of my fine content rich site.</p>
</section>
参考:http://www.smashingmagazine.com/2013/01/18/the-importance-of-sections/ 和 w3c html validation error - Section lacks heading. Consider using h2-h6 elements to add identifying headings to all sections 和 Is it necessary to have a heading of <section> in HTML5
【问题讨论】:
标签: html validation w3c-validation