HTML <aside> Tag for Sidebar Code


ATTENTION: THIS PAGE IS Valid HTML 5 AND IS BEST VIEWED WITH HTML 5 - Please upgrade your browser or download one of the HTML 5 compatible browsers such as Mozilla Firefox, Chrome, Opera or IE 9 (March 14, 2011 or later). For more information see HTML 5 browsers.

If you find this helpful, please click the Google +1 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.)

PDF mobile

The <aside> Tag in HTML 5

The aside element is used for an HTML sidebar and is created using the <aside> tag, which is one of the sectioning tags in HTML 5. An <aside> separates content that departs from the theme of the main article, such as advertising, comments, an author's biography, background information on a news story or any other tangential content remotely related to the main article. The content in an aside element is less essential to the main text of an article than content in a figure element, which is usually referenced by the main article text.

For the main theme of an HTML document, the <article> tag is used. The <section> tag can be used to identify sections 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.

<aside> Tag Syntax

Rules for coding HTML aside elements
   ... flow content expected ...
      ... flow content ...
  1. Inside an element where flow content is allowed, code one or more optional aside elements.
  2. Begin each aside element with a starting <aside> 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.
  3. Include any HTML global attributes on the <aside> tag as appropriate.
  4. End the aside element with a matching </aside> closing tag.
  5. Inside the aside element, include any flow content as appropriate.

<aside> Content Model

Content of the <aside> Tag

The content of the aside element can include HTML comments, text and any tags that can be used in flow content.

<aside> Tag Attributes

Attributes of the <aside> tag
global attributes The only attributes that can be coded on the <aside> tag are the common HTML attributes.

<aside> Tag Examples

Examples of the aside tag in HTML 5

Changes in HTML 5 - <aside> Tag

What's new in HTML 5

The <aside> 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 <aside> 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 aside element name. In older (pre-2000) versions of HTML, element type names were not associated with a namespace.

Valid HTML 5