0
How do i know where to use <div> in html?
Title is self explanatory
3 Réponses
+ 2
You don't have to at all, but it's a useful container element for structuring your code (even if there might be suitable semantic alternatives available in HTML5).
Any more specific questions?
+ 1
If you want to add another content not related with the previous one or you need another block where you want to write separate things there you can use <div> tag.
for eg: If you can use it on navigation bar and content of a page separately then you should use div here
+ 1
Div means division and when you want to make an specific part of your web and decorate it with css you use a div for those elements in it