萬盛學電腦網

 萬盛學電腦網 >> 網頁制作 >> Html5 >> html5的article元素使用方法介紹

html5的article元素使用方法介紹

下面我們給大家介紹一下html5的article元素使用方法吧!希望大家可以在這裡學習!

Article元素(

)故名思議,可以表示論壇帖子、雜志或新聞文章、博客、用戶提交的評論、交互式組件,或者其他獨立的內容項目。它的主要語義為表示自己是一個獨立的內容結構。每一個

元素內部結構都應該是相似的,比如都應該包含一個頭標題(h1-h6元素)等。

元素用法:

  1. <article class="film_review">  
  2.   <header>  
  3.     <h2>侏羅紀公園</h2>  
  4.   </header>  
  5.   <section class="main_review">  
  6.     <p>Dinos were great!</p>  
  7.   </section>  
  8.   <section class="user_reviews">  
  9.     <article class="user_review">  
  10.       <p>Way too scary for me.</p>  
  11.       <footer>  
  12.         <p>  
  13.           Posted on <time datetime="2015-05-16 19:00">May 16</time> by Lisa.   
  14.         </p>  
  15.       </footer>  
  16.     </article>  
  17.     <article class="user_review">  
  18.       <p>I agree, dinos are my favorite.</p>  
copyright © 萬盛學電腦網 all rights reserved