2013-05-13 100 views
2

我正在写一个Twitter application将显示有关Twitter用户以下三(3)件事情:HTML5 Symantic建议需要

  • GET状态/ user_timeline
  • 得到朋友/ IDS
  • 让追随者/ IDS

我的问题是,它是正确symantically把上述三(3)的事情之一(1)<article>标记内,并使用它们分开三(3)<section>标签? (请参见下面的选项1)

或者是symantically正确只使用三(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

都是正确的,它不会在所有问题... !!!你正面临一些问题吗? – 2013-05-13 10:44:33

+0

+1感谢您的回复。两者都是正确的?那么如果两者都是正确的,我宁愿使用选项1,因为它更简洁。我没有任何问题。我只是想确保我正确使用html5标签。感谢 – Anthony 2013-05-13 10:46:19

+1

我希望你会发现这个[**链接**](http://stackoverflow.com/questions/7549561/section-vs-article-html-5)为有用的。 – 2013-05-13 11:04:02

回答

1

两者都是正确的,它不会是一个问题在所有... !

参考:link

+0

+1是感谢你的帮助 – Anthony 2013-05-13 12:40:21