Html5 tags | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 12

Html5 tags

Why we must use html5 tags as nav, section, article, footer etc ... ? These tags are related to semantic context. What are these tags used for ? How can we take advantage of contents grouped by semantic context ? How to handle it ?

2nd Jun 2019, 7:38 AM
Javier Felipe Toribio
Javier Felipe Toribio - avatar
4 Answers
+ 3
they allow other types of media to use those tags..such as news feeds that pull only articles. each has its own use
2nd Jun 2019, 8:43 AM
Jason Kennedy
+ 71
Those tags are basically DIV tags with proper names and purpose to them. So instead of DIV "class=header ..." , you should use dedicated HEADER tag etc. Semantic tags are containers for certain types of content that stand out from other DIV elements populating your code. Hence it's easier for people (including the developer himself 😂) to read the code afterwards. Search engine bots, screen readers for blind people, Ebooks readers and news readers (thank you Jason Kennedy) work best with semantic structures. Hence more people will find and enjoy your website. Another advantage is that you can use a set of semantic tags as a work template for your websites and simply add content to it.
4th Jun 2019, 7:31 PM
🇺🇦 Vitya 🇺🇦
🇺🇦 Vitya 🇺🇦 - avatar
20th Jul 2019, 8:50 AM
Zhenis Otarbay
Zhenis Otarbay - avatar
+ 2
Many web sites contain HTML code like: <div id="nav"> <div class="header"> <div id="footer"> to indicate navigation, header, and footer. The <section> element defines a section in a document. The <article> element specifies independent, self-contained content. A <footer> element should contain information about its containing element. A footer typically contains the author of the document, copyright information, links to terms of use, contact information, etc. You may have several <footer> elements in one document.
13th May 2020, 4:45 AM
SOHAG GOSWAMI