Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialLu Favela
Front End Web Development Techdegree Student 15,549 PointsWhats the difference between section and article?
Im having trouble understanding the difference between "<section>" and <article>" when they do essentially the same?
1 Answer
Jamie Reardon
Treehouse Project ReviewerHi,
The section element groups together related sections of content, for example, a group of blog entries. It can be used for semantic meaning and markup on your pages instead of the generic div element.
<section>
Your content grouped together inside the section.
</section>
The article element element describes self-contained pieces of content. You can also nest the article inside of a section tag, or use it on it's own.
<section>
<article>
A piece of content...
</article>
<article>
Another piece of content...
</article>
</section>
<article>
Stand alone content...
</article>
Dave StSomeWhere
19,870 PointsDave StSomeWhere
19,870 PointsHi Guadalupe, the confusion might be a language thing.
To me, I see <section> as major areas of the page - like the main content section or left navbar section or header section or footer section.
While I see <article> as an individual blog post, and we can have many articles/posts in the main section (or other sections).
So, if we look at this community, I see the list of questions as the questions section and each individual question (or post) as an article.
So, the goal is just to provide additional naming capabilities to make your layout clearer to interested parties.