article标准用法

article代表一个在文档、页面或者网站中自成一体的内容

其目的是为了让开或重用

譬如论坛的帖子、博客的文章、一片用户的评论、一个互动的widget小工具

article 会有一个标题(通常在header里),会有一个footer页脚

如果在aritcle内部再嵌套article

那就代表的article是与它外部的内容有关联,如博客文章下面的评论 

标准article元素的用法:

<article>
 <h1>文章标题</h1>
 <p>文章内容</p>
 <footer>
     <p><small>版权</small></p>  
  </footer>    
</article>
效果如下



例如:
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title> article </title>
</head>
<body>
    <article>
        <header>
            <h1>王者荣耀</h1>
        </header>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquid esse odio quam quo repellat? Accusamus
            atque, dicta dolore iste maxime odio odit sequi suscipit tempora ut. Aspernatur officia placeat
            quibusdam!</p>
        <p>Amet eos esse nisi numquam obcaecati quos repellat saepe. Ab alias aliquam assumenda consequuntur cumque
            debitis, deserunt, enim expedita in molestias mollitia voluptatum! Cumque dicta laborum magni maiores
            recusandae repudiandae!</p>
        <p>Deleniti distinctio, eveniet magnam maiores odio officiis provident reprehenderit. Aliquid eius, enim
            expedita labore magnam odit quae quaerat quisquam tempore voluptates? Cupiditate error nisi quaerat ratione
            reiciendis sed soluta voluptas.</p>
        <footer>
            
            &copy; 2017
        </footer>

    </article>
</body>

效果如下:

 

 
posted @ 2018-06-28 20:16  雪地里的Alan  阅读(643)  评论(0编辑  收藏