html5中article元素的使用方法

cherishSpring發表於2016-07-27
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>article元素的使用方法</title>
    </head>
    <body>
        <article>
            <header>
                <h1>我是article</h1>
                <p>建立時間<time pubdate="true">2016/7/25</time></p>
            </header>
        </article>
        <p>
            <b>Article</b>是一個獨立的區域
        </p>
        <section>
            <h2>讀者評論</h2>
            <article>
                <header>
                    <h3>讀者:flower</h3>
                    <p>
                        <time pubdate="true" datetime="2016/7/25 T23:00">2小時前</time>
                    </p>
                </header>
                <p>文章很好</p>
            </article>
            <article>
                <header>
                    <h3>讀者:cherish</h3>
                    <p>
                        <time pubdate="true" datetime="2016/7/25 T21:00">1小時前</time>
                    </p>
                </header>
                <p>文章很好</p>
            </article>
        </section>
        <footer>
            <p><small>開發者版權</small></p>
        </footer>
        </article>
    </body>
</html>

相關文章