View Full Version : [HTML5]Proper Use for Article?

06-03-2010, 04:59 PM
I am curious about one thing. According to w3schools.com's article tag definition (http://www.w3schools.com/html5/tag_article.asp), the <article> tag defines external content.

So what tag would I properly use for an article on my own site? A simple section tag?

06-03-2010, 08:58 PM
"...content from an external source."

So if your including an article or section of article from another site, you would use this tag.

If its an original article of your own posted on your site, section tag should work.

06-04-2010, 12:21 AM
Hm I always thought you would have used article but from reading that it is explicitly stating that it defines external content? Personally I think it's misleading us, even though it's a pretty reputable site so what do I know.

If we look at the spec here:

It doesn't really say anything about external, but maybe implies that it can be re-used..

06-04-2010, 01:14 AM
You could be right. Maybe its <article> regardless if its external or internal. But why would w3schools say external only? This implies that something else should be used for internal articles.

http://www.smashingmagazine.com/2009/08/04/designing-a-html-5-layout-from-scratch/ doesn't distinguish between external or internal articles.

However, according to http://www.brucelawson.co.uk/2010/html5-articles-and-sections-whats-the-difference/ , here is the difference:

An article is an independent, stand-alone piece of discrete content.

Section, on the other hand, isnít ďa self-contained composition in a document, page, application, or site and that is intended to be independently distributable or reusableĒ. Itís either a way of sectioning a page into different subject areas, or sectioning an article into Ö well, sections.

By this definition, I would use <article> for everything that is intended to be an article.

06-04-2010, 06:12 AM
To make things more confusing (for me, at least), section has an optional attribute for cite in the event it is taken from an external source. If it isn't "a self-contained composition in a document, page, application, or site and that is intended to be independently distributable or reusable," then why do we need the cite attribute? Wouldn't we then use the article tag?

Edit: Or is it simply that the cite attribute is there if we DO take something from another website that wasn't intended to be independently distributed? In such an event, though, I would think that the blockquote tag is then the better option.

Semantics: gotta love it.

Edit2: I just found this article: http://boblet.tumblr.com/post/130610820/html5-structure1
I'm not sure I agree with all of it, such as when he says:

Also avoid nesting an <article> inside another <article>—use <section> for indicating logical parts of an <article> instead.
In one of the examples article element examples (http://dev.w3.org/html5/spec/Overview.html#article-example) it nests an article (comments of an article) inside of the main article.