需要HTML5语义建议

时间:2013-05-13 10:37:52

标签: html5 twitter

我正在写一个Twitter application,它将显示关于Twitter用户的以下三(3)件事情:

  • 获取状态/ user_timeline
  • GET friends / ids
  • GET粉丝/ ids

我的问题是,将上述三(3)个内容放在一个(1)<article>标记中并使用三个(3)<section>标记将它们分开是否在语义上是正确的? (见下文选项1)

或者只使用三(3)个<article>标签(上面每个项目一个)在语义上是否正确? (见下文选项2)

选项1:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>Twitter App</title>  
</head>
<body>
    <article>
        <section>
            <h2>User's Timeline<h2>     
            <!-- Displays GET statuses/user_timeline here -->
        </section>      

        <section>
            <h2>User's Friends<h2>      
            <!-- Displays GET friends/ids here -->
        <section>   

        <section>
            <h2>User's Followers<h2>        
            <!-- Displays GET followers/ids -->
        </section>
    </article>
</body>
</html>

选项2:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>Twitter App</title>  
</head>
<body>
    <article>
        <header>
            <h2>User's Timeline<h2>
        </header>
            <!-- Displays GET statuses/user_timeline here -->
        <footer></footer>
    </article>

    <article>
        <header>
            <h2>User's Friends<h2>
        </header>
            <!-- Displays GET friends/ids here -->
        <footer></footer>
    </article>

    <article>
        <header>
            <h2>User's Followers<h2>
        </header>
            <!-- Displays GET followers/ids -->
        <footer></footer>
    </article>
</body>
</html>

1 个答案:

答案 0 :(得分:1)

两者都是正确的,它根本不会成为问题...... !!!

参考:link