Course contentsShow
← Web Development
Lesson 52 of 2,9822. HTML FundamentalsFree lesson

The <aside> Element

Marking tangentially related content with <aside> for sidebars, pull quotes, and supplementary information.

The <aside> Element

You'll learn how to mark up content that's related to, but separate from, the main content of your page.

What Is an <aside>?

Think of <aside> like a sidebar in a magazine or those little "Fun Fact!" boxes you see in textbooks. The content inside an <aside> is tangentially related to the main content around it, but it's not essential to understanding the main point. If you removed it, the main content would still make complete sense.

When to Use <aside>

Use <aside> for:

  • Sidebars containing related links or information
  • Pull quotes (highlighting a quote from the article)
  • Advertising or promotional content
  • Glossaries or definitions
  • Author bios at the end of articles
  • Related articles or "You might also like..." sections

Example Structure

<article>
  <h2>The History of Coffee</h2>
  <p>Coffee was first discovered in Ethiopia...</p>
  
  <aside>
    <h3>Fun Fact</h3>
    <p>The word "coffee" comes from the Arabic word "qahwa."</p>
  </aside>
  
  <p>Coffee spread to the Middle East...</p>
</article>

In this example, the fun fact is interesting and related to coffee, but the article about coffee's history doesn't need it to be understood.

The Key Test

Ask yourself: "If I removed this content, would the main content still be complete?" If yes, it's probably an <aside>.

Key Takeaway: The <aside> element marks content that's related but supplementary—think sidebars, pull quotes, or tangential information that enriches but isn't essential to the main content.