Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6
Div tag is a container for other elements that use can interact with our just display to. Div tag is not visible, to make it visible you so have to add styling to it. Div tag is by default displayed as a block element and that means it will take full width of parent container, but it can be inline too (as other tags too). In HTML5 there are some tags that are identical to div like: aside, nav, section, article, footer etc. Identical by the way they display on a page when they don't have any styling on them. I think that the difference between div and those tags comes in sense of what they are used for. So browser or spider (BOT) can read footer or navigation better, etc. Hope I got your question right and provided right answer.
14th Sep 2019, 12:25 AM
Dejan Dozet
Dejan Dozet - avatar