html – 是语义或结构标签
发布时间:2020-12-14 18:48:17 所属栏目:资源 来源:网络整理
导读:拿这两个标记: div id="header" img src="/img/logo.png" alt="MyLogo" / ul id="misc-nav" li../li /ul header h1Welcome to Bob's Website of Fantastical Conbobulations/h1 pThe smell of invention awaits you.../p /header/div 和 header img src="/i
拿这两个标记:
<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> 和 <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> 我的例子可能不是完美的,但是我想知道标签的目的是为了内容的语义定义,还是CSS的块级结构定义? 这是我的理解from the spec itself,第一个例子是正确的解释,但我看到第二个被称为正确的方式. 你可以提供任何清晰度吗? 解决方法
两者都不错但是,“结构”vs“语义”究竟是什么意思?
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |