Codectionary / Developer documentation / HTML

<aside>

The <aside> element represents content that is tangentially related to the surrounding content, such as a sidebar, pull quote, advertisement, or a group of related links. It can be used both as a page-level sidebar and nested inside an <article> for content that is related to, but separate from, the main article text.

Syntax

<aside>
  <h3>Related Links</h3>
  <ul>...</ul>
</aside>

Examples

Page Sidebar

Using aside as a sidebar with supplementary content.

<main>
  <article>...</article>
</main>
<aside>
  <h3>Popular Posts</h3>
  <ul>
    <li><a href="#">Post One</a></li>
    <li><a href="#">Post Two</a></li>
  </ul>
</aside>

Pull Quote Within an Article

Using aside inside an article for a related but separate callout.

<article>
  <p>Long article text continues here...</p>
  <aside>
    <blockquote>Key takeaway: semantic HTML improves accessibility.</blockquote>
  </aside>
  <p>The article continues...</p>
</article>

Author Bio Aside

A tangential author information box.

<article>
  <h2>10 Tips for Clean Code</h2>
  <p>Article content...</p>
</article>
<aside>
  <h4>About the Author</h4>
  <p>Jane writes about software craftsmanship.</p>
</aside>

Best practices

  • Use <aside> for content that is related but not essential to understanding the main content
  • Do not use <aside> purely as a styling hook for a sidebar-looking box that is actually essential content
  • An <aside> nested inside an <article> should relate specifically to that article, not the whole page
  • Give the aside its own heading when it has one, so it makes sense as an independent block

At a glance

Purpose
Structure and meaning for web content
File extension
.html · .htm
Runs in
Web browsers
Usually used with
CSS and JavaScript

Specifications & further reading

Related HTML documentation