您现在的位置: 万盛学电脑网 >> 程序编程 >> 网页制作 >> Html5 >> 正文

html5的article元素使用方法介绍

作者:佚名    责任编辑:admin    更新时间:2022-06-22

下面我们给大家介绍一下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>