标题是否有必要<section>
在 HTML5 中,就像这里提到的一样 http://blog.whatwg.org/is-not-just-a-semantic
有时在一个页面上我们有一些相关的元素可以组合成一个 <section id="semantic name">
相反 <div id="semantic name">
但是我们没有任何标题..
可以用<section>
吗没有 <h1>
, <h2>
, <h3>
里面
最佳答案
According to the HTML5 Doctor , 你不应该使用 <section>
如果没有自然航向。此外,他们说:
The section element represents a generic document or application section…The section element is not a generic container element. When an element is needed for styling purposes or as a convenience for scripting, authors are encouraged to use the div element instead.
此外,check out this nifty flowchart决定哪种元素最适合您的情况。
关于html - 在 HTML5 中是否必须有 <section> 的标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8544671/