2

I'm writing a Twitter application that will display the following three (3) things about a Twitter user:

  • GET statuses/user_timeline
  • GET friends/ids
  • GET followers/ids

My question is, is it symantically correct to put the above-mentioned three (3) things inside one (1) <article> tag and separate them using three(3) <section> tags? (See Option 1 below)

Or is it symantically correct to just use three (3) <article> tags (one for each item above)? (See option 2 below)

Option 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>

Option 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>
Mudshark
  • 3,253
  • 15
  • 20
Anthony
  • 3,990
  • 23
  • 68
  • 94
  • 1
    both are correct, it won't be a problem at all...!!! are you facing some problem??? – Elavarasan Muthuvalavan - Lee May 13 '13 at 10:44
  • +1 Thanks for your reply. Both are correct? Well if both are correct, I would prefer to use Option 1 because its more concise. I'm not having any problem. I just wanted to make sure that I was using the html5 tags correctly. Thanks – Anthony May 13 '13 at 10:46
  • 1
    I hope you'll find this [**link**](http://stackoverflow.com/questions/7549561/section-vs-article-html-5) as useful one. – Elavarasan Muthuvalavan - Lee May 13 '13 at 11:04
  • I've decided to go with 1 article (since everything is related) and 3 sections. That link helped. Thanks – Anthony May 13 '13 at 11:24
  • @elavarasanlee Your comments helped me and was correct and you should move your comment into an answer so I could accept it and close off this question. – Anthony May 13 '13 at 11:37

1 Answers1

1

Both are correct, it won't be a problem at all...!!!

Reference: link

Community
  • 1
  • 1