I was wondering if some one could clarify when is the most appropriate place to use <article>, <section> and <div>.
My understanding is this:
You would use <article> for the main content on your page. For example, if you were making a blog page, the actual content of the blog post would go in <article>.
You would use <aside> for secondary content. So on a blog page, you would put related articles in <aside>.
In HTML5, you would only use <div> for styling purposes. For example, if you need to place in a background, and needed a few extra hooks (perhaps because <body> already has a background on it) , you would use a <DIV>.
When would you <section>? I would have thought it would be to divide up the article into different sections. But isn't that redundant, because an article would already be divided up by header tags (e.g. H2/h3 would mark out where the new section starts)?
Also, I have read that <article> should only be used for external content. So does that mean in my blog page example, the content would NOT go in <article> because it is not external content? But if this is the case, what tag would you put the article in? I know you can use <p> and <h>. However, what if you wanted a container to hold all these <p> & <h> together (i.e. to mark them out as having a relation)?
![]()







Bookmarks