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>
都是正確的,它不會在所有問題... !!!你正面臨一些問題嗎? – 2013-05-13 10:44:33
+1感謝您的回覆。兩者都是正確的?那麼如果兩者都是正確的,我寧願使用選項1,因爲它更簡潔。我沒有任何問題。我只是想確保我正確使用html5標籤。感謝 – Anthony 2013-05-13 10:46:19
我希望你會發現這個[**鏈接**](http://stackoverflow.com/questions/7549561/section-vs-article-html-5)爲有用的。 – 2013-05-13 11:04:02