Reputation: 26514
Other than having a structure that makes more sense (i.e wrapping a footer with a <footer>
tag) why should i be using html5 tags over div tags?
If i use <div>
i will still be able to use some of the sweet html5 features, so why should i worry about learning all this new tags?
P.S: I am aware of video and audio tags that make it easier to embed media
Upvotes: 10
Views: 2436
Reputation: 38860
Tags like footer
, section
etc are all included in HTML5 as a move towards the semantic web. You can learn more about the semantic web on Wikipedia. In a nutshell the semantic web helps search engines understand the content on your site better which would (hopefully) result in more accurate search rankings. It also means programmers can write code that parses your site more accurately, for example browser makers can incorporate features in their browsers that react to the semantics of a web page.
Upvotes: 6
Reputation: 12875
<div>This is an advertisement about big rubber flashlights</div>
<div>This is the actual content of the current page, an important article about the state of the world we live in</div>
<div>Here a user posts that he hates everything about this place</div>
The second div i guess would benefit a lot by being replaced with the <article>
tag, as a web bot, gadget or browser can see that this is probably the main topic of the page.
Upvotes: 6
Reputation: 150976
Using those tags will help search engine index your site, and for screen reader, etc. This is known as "semantic correctness".
Upvotes: 6