Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 - Correct usage of the <article> tag

Reading an article on the <article> tag on HTML5, I really think my biggest confusion is in the first question of this section:

Using <article> gives more semantic meaning to the content. By contrast <section> is only a block of related content, and <div> is only a block of content... To decide which of these three elements is appropriate, choose the first suitable option:

  1. Would the content would make sense on its own in a feed reader? If so, use <article>.
  2. Is the content related? If so, use <section>.
  3. Finally, if there’s no semantic relationship, use <div>.

So I guess my question is really: What types of content belong in a feed reader?

like image 368
Wex Avatar asked Aug 04 '11 23:08

Wex


People also ask

What is the use of article tag in HTML5?

Definition and Usage 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.

What is the correct way to use main tag in HTML5?

Definition and UsageThe <main> tag specifies the main content of a document. The content inside the <main> element should be unique to the document. It should not contain any content that is repeated across documents such as sidebars, navigation links, copyright information, site logos, and search forms.

How do you use HTML tags correctly?

An HTML tag is a special word or letter surrounded by angle brackets, < and >. You use tags to create HTML elements , such as paragraphs or links. Many elements have an opening tag and a closing tag — for example, a p (paragraph) element has a <p> tag, followed by the paragraph text, followed by a closing </p> tag.


1 Answers

The spec answers this quite clearly:

The article element represents a self-contained composition in a document, page, application, or site and that is, in principle, independently distributable or reusable, e.g. in syndication. This could be a forum post, a magazine or newspaper article, a blog entry, a user-submitted comment, an interactive widget or gadget, or any other independent item of content.

see: http://dev.w3.org/html5/spec/Overview.html#the-article-element

like image 60
Maple Avatar answered Oct 14 '22 05:10

Maple