点评:HTML5带出了一系列新元素,以下两个新元素:article和section是比较混淆,经常提到是什么情况下我们应该使用这些元素,接下来为大家介绍下两者的应用,感兴趣的各位可以参考下哈
复制代码
代码如下:
<div>
<section>
<h2>Blog Post Title</h2>
<p>Ice cream tart powder jelly-o.
Gummies chocolate cake ice cream cookie halvah tiramisu jelly-o.</p>
</section>
<section>
<h2>Blog Post Title</h2>
<p>Ice cream tart powder jelly-o.
Gummies chocolate cake ice cream cookie halvah tiramisu jelly-o.</p>
</section>
<section>
<h2>Blog Post Title</h2>
<p>Ice cream tart powder jelly-o.
Gummies chocolate cake ice cream cookie halvah tiramisu jelly-o.</p>
</section>
</div>
复制代码
代码如下:
<article>
<header>
<h1>This is Blog Post Title</h1>
<div>
<ul>
<li>Author Name</li>
<li>Save in Categories</li>
</ul>
</div>
</header>
<div>
Sweet roll halvah biscuit toffee liquorice tart pudding sesame snaps.
Biscuit powder jelly-o fruitcake faworki chocolate bar. Pudding oat
cake tootsie roll sesame snaps lollipop gingerbread bonbon. Gummies
halvah gummies danish biscuit applicake gingerbread jelly-o pastry.
</div>
</article>
复制代码
代码如下:
<article>
<header>
<h1>This is Blog Post Title</h1>
<div>
<ul>
<li>Author Name</li>
<li>Save in Categories</li>
</ul>
</div>
</header>
<div>
<section>
<h2>This is the Sub-Heading</h2>
Sweet roll halvah biscuit toffee liquorice tart pudding sesame snaps.
Biscuit powder jelly-o fruitcake faworki chocolate bar. Pudding oat cake
tootsie roll sesame snaps lollipop gingerbread bonbon. Gummies halvah
gummies danish biscuit applicake gingerbread jelly-o pastry.
</section>
<section>
<h3>This is another Sub-Heading</h3>
Topping cheesecake sweet pie carrot cake sweet roll. Gummi bears lemon drops
toffee sesame snaps tart topping chupa chups apple pie gummies. Wafer chocolate
cake. Sugar plum chocolate bar topping ice cream carrot cake danish bonbon.
Cheesecake gummi bears dragée jujubes dragée dragée brownie jelly biscuit. Powder croissant jelly beans pastry.
</section>
</div>
</article>
新闻热点
疑难解答