HTML <aside> tag
- closing tag
- required
- void element
- no
- lives inside
- <body> or <main>, beside the main content
- typically holds
- related links, a sidebar, a pull quote, an ad
Where it goes
Inside <main> when it relates to that page's content, or directly in <body> as a site-wide sidebar. One or two per page at most.
Example
<main>
<article>
<h1>Baking sourdough</h1>
<p>...</p>
</article>
<aside>
<h2>Related</h2>
<ul><li><a href="/starter">Keeping a starter alive</a></li></ul>
</aside>
</main>Open this example in the editor →
Common mistakes
- Using it for the site menu. That is <nav>. An <aside> is for side content, not the way around the site.
- Expecting it to sit beside the main column on its own. <aside> says nothing about layout. It stacks like any block until flexbox or grid moves it.
- Putting the most important content in it because it looks like a sidebar in the design. If the page would not make sense without it, it belongs in <main>.