Div Tags | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

Div Tags

My Question is are Div tags still used, for example if my website has two Section codes one supporting let‚Äôs say Favourite Food and the other Favourite Movie would I do <div section=‚ÄúMovie‚ÄĚ></div> and the the same for Food to keep it more organized for CSS or is there another way you do it in HTML5?

28th Sep 2018, 7:42 PM
Johnny Meyer
Johnny Meyer - avatar
5 Réponses
+ 1
We also use sections and articles, now that they are available. These are supposed to represent that the content has meaning and are supposed to help with SEO, so use where appropriate and use div where appropriate. Hope this clears things up. ūüôā
28th Sep 2018, 10:09 PM
Janning‚≠ź
Janning‚≠ź - avatar
+ 1
- div tags are used all the time - div is for grouping content, not code - section is not a standard attribute ( https://www.w3schools.com/tags/ref_attributes.asp ) If I've misunderstood your question, please rephrase. ūüôā
28th Sep 2018, 8:24 PM
Janning‚≠ź
Janning‚≠ź - avatar
+ 1
Janning‚≠ź It does thank you for helping me with my confusion
28th Sep 2018, 10:10 PM
Johnny Meyer
Johnny Meyer - avatar
0
Janning‚≠ź I was reading a comment after a lesson saying that instead of using div tags they are now orginzed using sections and articles, which I just had to have someone verify that for me
28th Sep 2018, 8:54 PM
Johnny Meyer
Johnny Meyer - avatar
0
Happy to help. ūüôā
28th Sep 2018, 10:15 PM
Janning‚≠ź
Janning‚≠ź - avatar