Why We Use Tags Like Header Nav Section Footer Etc If We Have Already Div Tag In HTML ?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Why We Use Tags Like Header Nav Section Footer Etc If We Have Already Div Tag In HTML ??

12th Jan 2020, 1:23 PM
Harsh Singh
Harsh Singh - avatar
3 Answers
+ 6
Because <div> means nothing, while <section>, <header>, <main>, <nav>, <article>, <footer> and others are semantic tags and that helps for SEO since search engines like Google can know where is the header of a website or the footer or know which section of a website is the main or most important That does not mean that the <div> is no longer used at all, you can safely use it, however it will not be semantic I leave these links that may be useful for you https://www.w3.org/TR/2011/WD-html5-20110525/sections.html https://developers.google.com/style/semantic-tagging https://www.inboundnow.com/html5-semantic-elements-mean-seo/
12th Jan 2020, 1:54 PM
Kevin E. Torres Caldas
Kevin E. Torres Caldas - avatar
+ 2
These new tags were added in HTML5, probably for the simplicity. The web developers using these tags would then just alter each tag in CSS, without having to create a ID for each one.
12th Jan 2020, 1:54 PM
Jianmin Chen
Jianmin Chen - avatar
+ 2
To enable you to differentiate from other parts of your code. say you have several <div> and your work is not arranged properly you may get confused
15th Jan 2020, 5:30 PM
Abere Obed
Abere Obed - avatar