If you find this helpful, please click the Google Button to the left, if it is white, to make it turn blue or red. Thank you! (It also helps find this page again more easily.) |
The <article> Tag in HTML 5
An article element contains the main theme(s) of an HTML document and is created using the <article>
tag, which is one of the sectioning tags in HTML 5. More than one article element can be included in a single document if there is more than one main theme, such as for:
- a blog summary page with an introduction to each blog entry
- an index with short abstracts for research papers
For content that departs from the main theme(s), the <aside> tag can be used. The <section> tag can be used to identify subsections within an <aside> or <article>, such as the "Tag Summary", "Tag Syntax", "Element Attributes", "Tag Examples" and "What's New / Changes" sections on this page.
<article> Tag Syntax
Rules for coding HTML article
elements
<body> ... ... flow content expected ... <article> ... flow content ... </article> ... </body>
- Inside an element where flow content is allowed, code one or more optional article elements.
- Begin each article element with a starting <article> tag. The element name uses lower case letters and should be in the HTML namespace, which it will pick up automatically from the
xmlns
attribute on the <html> tag. - Include any HTML global attributes on the <article> tag as appropriate.
- End the article element with a matching
</article>
closing tag. - Inside the article element, include any flow content as appropriate.
<article> Content Model
Content of the <article> Tag
The content of the article element can include HTML comments, text content and any tags that can be used in flow content.
<article> Tag Attributes
Attributes of the <article> tag
global attributes | The only attributes that can be coded on the <article> tag are the common HTML attributes. |
<article> Tag Examples
Examples of the article
tag in HTML 5
Changes in HTML 5 - <article> Tag
What's new in HTML 5
The <article> tag is one of the new elements in HTML 5. It is one of the new sectioning tags in HTML 5, which are intended to reduce the need to use <div> tags for sectioning purposes.
Differences between HTML 5 and earlier versions of HTML
The <article> tag did not exist in older versions of HTML.
The 2000-2010 Recommendations from the W3C HTML Working Group defined the HTML namespace for the names of all HTML element types, which now includes the article element name. In older versions of HTML, element type names were not associated with a namespace.