Issue
When should I use <article>
and <section>
tags in HTML5?
Solution
The <section>
tag:
The section tag defines sections in a document, such as chapters, headers, footers, or any other sections of the document.
The <article>
tag:
The article tag specifies independent, self-contained content.
An article should make sense on its own and it should be possible to distribute it independently from the rest of the site.
Potential sources for the article element:
- Forum post
- Blog post
- News story
- Comment
Basically these tags are semantic elements and the only real difference between them are readability and design preference.
You can read more about them here if you wish:
- http://www.w3schools.com/html/html5_semantic_elements.asp
- http://www.w3schools.com/tags/tag_article.asp
- http://www.w3schools.com/tags/tag_section.asp
Answered By - Nick Zuber
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.