Div or Html5 structure | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Div or Html5 structure

I'm still learning, but I want to see in coding is it better to use <nav> or <section> tags rather than <div> with a lot of id's and classes?

24th Feb 2019, 5:46 PM
Milan Nikic
Milan Nikic - avatar
3 Answers
+ 15
Yes. It is always better to use semantic elements than div. In case you have complex transitions or animations then you can consider using the latter.
24th Feb 2019, 6:09 PM
Mitali
Mitali - avatar
+ 5
👌👌👌👌👌
24th Feb 2019, 6:11 PM
Mr. Kumar
+ 5
Div tag is the use in css and we can also use it in html This will make a division..... you can apply many division in a html or css code 👌👌👌👌👌
10th Jun 2019, 5:58 PM
Siddharth MaLhoTra( InActiVe )
Siddharth MaLhoTra( InActiVe ) - avatar