點評: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>
新聞熱點
疑難解答