拿这两个标记:
<div id="header">
<img src="/img/logo.png" alt="MyLogo" />
<ul id="misc-nav">
<li>..</li>
</ul>
<header>
<h1>Welcome to Bob's Website of Fantastical Conbobulations</h1>
<p>The smell of invention awaits you...</p>
</header>
</div>
Run Code Online (Sandbox Code Playgroud)
和
<header>
<img src="/img/logo.png" alt="MyLogo" />
<ul id="misc-nav">
<li>..</li>
</ul>
<h1>Welcome to Bob's Website of Fantastical Conbobulations</h1>
<p>The smell of invention awaits you...</p>
</header>
Run Code Online (Sandbox Code Playgroud)
我的例子可能不完美,但是我想知道标签的用途是用于内容的语义定义,还是用CSS进行块级结构定义?
我从规范本身的理解是,第一个例子是正确的解释,但我看到第二个被吹捧为正确的方式.
你能说清楚吗?