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>

i have not understand why we use <aside><article><nag>

i have not understand why we use <aside><article><nag>

2 Answers

Andrew Poteau
Andrew Poteau
2,819 Points

For article, think of a magazine, where there are several articles on different topics within the magazine. If you took one out of the magazine and read it by itself, it would make sense on its own. So on a web page, you might use <article> if your pages have several different written pieces about different things. The <aside> tag would be something that relates to the subject matter of a section of content, but is not necessary to understanding the main content. It could be used to bring up interesting side facts or other less important information. <nav> is used for the main navigation of a web page, usually at the top. It is separate from other links on the page.

Rui Xu
Rui Xu
11,245 Points

Thanks for the sharing! It is very clear!

Thank you!

Frederick Bogdanoff
Frederick Bogdanoff
15,338 Points

They're semantic elements for giving proper meaning to your HTML. Semantics is the study of the meanings of words and phrases in a language. Examples of non-semantic elements would be <div> and <span>. If you wrapped all of your content in <div> and <span> tags alone, it might be kind of hard for you or others to understand. You should use semantics if you want your code to be meaningful and understandable for others.