There are some commands in HTML that are confusing me. For example, what do the <nav>
element and the <article>
element do? There's a lot like this. <nav> <article> <section> <aside> <div>
What are the purpose of these? I know what they do, what I'm confused about is why you'd want to use them. These elements create semantic sections, what I'm asking is, why is this needed? What does it change?
-
Here's some info on html5 for you: http://html5doctor.com/element-index/ – Wim Mertens Mar 05 '17 at 23:59
-
Another useful source: https://html.spec.whatwg.org/multipage/semantics.html#the-article-element – BSMP Mar 06 '17 at 00:01
-
Side note, you have "eements" instead of "elements". You can [edit] your question to fix the title. – BSMP Mar 06 '17 at 00:08
-
1I'm aware that you're a beginner, but it's good do some research before posting on StackOverflow. This one is a Google search away. – silvenon Mar 06 '17 at 00:15
3 Answers
One important reason is accessibility of websites: If a screenreader (for blind people) knows (from recognizing these tags) which element contains the navigation (nav
, which otherwise would just be a div
), which elements are seperate, more or less independent blocks (articles
and sections
), it can guide the user much easier throught he structure of the page and help him/her to find the essential parts of the page quicker.
Another reason is that search engines can find the essential parts of a website, since the structure is much clearer.

- 64,305
- 18
- 73
- 130
It is the new Html5 standard. They can be easily used in semantic way and they have more meaning for example than a classic div

- 3,946
- 11
- 49
- 96
This is probably a good place to start HTML Tags If you're not sure what a div is I'm going to assume you're reasonably new to HTML?
You don't have to use tags like but it just makes it easier for someone reading your code to know exactly where the navigation is. Otherwise it might just look like a list.
I'd suggest you read that list though.

- 83
- 2
- 11