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>

Christina Ferrise
Christina Ferrise
859 Points

Aside tag

So with the <aside> and <section> tags the display of our website does not change does it? Is it just for us to understand how to structure a proper HTML page?

Thanks for asking this question. I was wondering the same thing myself!

3 Answers

nico dev
nico dev
20,364 Points

Hi Christina,

Short answers: 1) No. 2) Mostly.

Remember that HTML is a language to convey to the browser the structure of our page, not the style. The display of our website will mostly be explained by our CSS.

But one important thing not to forget is that not only what you see matter. I mean it is incredible what you can do with CSS to style a page nowadays, but still you have to start with a correct structure.

An example? I don't know if you drive? But if so, imagine you see a beautiful Ferrari or Mercedes, then you enter so proud to drive it and when you throttle, it is slow to react, has poor handling, and you start to notice that it's assembled all wrongly, well, that's a page with an amazing CSS but a poor HTML.

Hope the example helped, don't know if you're a driver anyway :)

Ah! About the second question, here we get a lot of guide on using correctly HTML, but the guys of W3 keep evolving at a fast pace, so in the long run, you must rely on the docs, and sites like MDN to keep up to date.

Thanks for the car analogy.

Bára Paulátová
Bára Paulátová
3,583 Points

The car analogy is fun and I completely agree :)

Abner Olivieri
Abner Olivieri
1,941 Points

Aside and section tags are different.

The <section> tag defines sections in a document, such as chapters, headers, footers, or any other sections of the document and the <aside> tag defines some content aside from the content it is placed in. The aside content should be related to the surrounding content. (

So for example, you could create a section and then create an aside inside it, setting aside certain content.

Example:

<section>
    <p>This is some content.</p>
    <aside>
        <h3>This is a title for the aside content</h3>
        <p>This is some content for the aside content.</p>
    </aside>
    <p>This is some more content.</p>
</section>

To answer your other question, using these tags won't change the display of content on your website, they are just for structural purposes. As I'm sure you know, basically all HTML is for structural purposes, with CSS providing the presentation.

Bára Paulátová
Bára Paulátová
3,583 Points

Hi,

I checked the link to MND for more info about <aside> .. could anyone please give me an example of a sidebar or call-out box? I am not sure if I understand the purpose of <aside> correctly.

Thanks, Bára

Mediocre 02
Mediocre 02
1,211 Points

Hello,

Don't know whether you have worked out this problem. Just give my understanding about <aside>: <aside> is used for contents which separate from the main content. For example, if you create a blog page. You can write a new article within <article> and use <aside> to create a navigation bar which is able to link to your previous posts.

Hope my explanation can be helpful.