Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML HTML Basics Structuring Your Content Sectioning Content with <article>, <nav> and <aside>

Euan Canoy
Euan Canoy
918 Points

Would <aside> be inside a <section> or stand-alone by itself?

Where is <aside> supposed to be placed? Would <aside> be inside a <section> or stand-alone by itself?

<aside> contains the content which is not directly related to the website. So you can use it as a stand alone element that can contain the supplementry content.

1 Answer

Euan Canoy It all depends on the structure of your document/webpage... So imagine you have a blog... let's say you are posting about your trip to the museum and the article is about all the things you saw in the museum... you could have something like the following:

<article>
  <h2>Cool things I saw at the museum</h2>

  <h3>Exhibit A</h3>
  <p>What you saw in exhibit A</p>

  <h3>Exhibit B</h3>
  <p>What you saw in exhibit B</p>

  <aside>
    <h4>Exhibit B fun fact</h4>
    <p>Historical fact about exhibit B</p>
  </aside>
</article>

So the article is specifically about the things that YOU saw while you were at the exhibit, so information such as historical facts about the exhibits may not be relative to the main point of the article so you can put it in an aside... but that aside is still nested in the article because it is related, and it is still part of the article. I hope this makes sense, if not, feel free to tag me with any other concerns.

Euan Canoy
Euan Canoy
918 Points

This makes sense. Thank you for the help!