我试图编写一个语义HTML5代码,但不确定它是否正确。“Visualy I”有一篇文章/文章被分成3所学院:
图像(200 H2)+ H1+摘要+ More Link (350 H2)\x附加部分(2 headers H2,150 H2)
在CSS中,我将浮动:左-图,..post汇总,..post备用。
以下是第1卷:
<article>
<figure>
<a href="#"><img src="images/temp/entry_01.jpg" alt=""></a>
<figcaption>Title for Case Study</figcaption>
</figure>
<div class="post-summary">
<section>
<h1>MAIN Article Title</h1>
<p>Lorem ipsum...</p>
<a href="#">read more</a>
</section>
</div>
<div class="post-aside">
<section>
<h2>The Charges:</h2>
<p>Lorem ipsum...</p>
</section>
<section>
<h2>The Verdict:</h2>
<p>Lorem ipsum...</p>
</section>
</div>
</article>版本。2
<article>
<figure>
<a href="#"><img src="images/temp/entry_01.jpg" alt=""></a>
<figcaption>Title for Case Study</figcaption>
</figure>
<section class="post-summary">
<h1>MAIN Article Title</h1>
<p>Lorem ipsum...</p>
<a href="#">read more</a>
</section>
<section class="post-aside">
<h2>The Charges:</h2>
<p>Lorem ipsum text ...</p>
<h2>The Verdict:</h2>
<p>Lorem ipsum text...</p>
</section>
</article> 哪一个是对的?
发布于 2012-05-10 09:40:53
取决于你想要什么。
div -我们都知道和喜爱的“通用流容器”。它是一个块级元素,没有额外的语义含义。 第一节-“通用文件或申请部分”。一个部分通常有一个标题(标题),也许还有一个页脚。它是一大块相关的内容,比如一篇长篇文章的一小部分,页面的一个主要部分(比如主页上的新闻部分),或者是webapp的选项卡界面中的一个页面。
http://boblet.tumblr.com/post/130610820/html5-structure1 链接到文章
我会这样使用它(your v2):
<div> <!-- Main article div -->
<article> <!-- First article -->
<section><!-- Header, about the author... --></section>
<section><!-- related info .. --></section>
<section><!-- conclusion --></section>
</article>
<article>
<section></section>
<section></section>
<section></section>
</article>
</div>发布于 2012-05-10 13:41:26
这不对..。他们俩,还有答案.别用DIV!用段代替!
https://stackoverflow.com/questions/10531057
复制相似问题