0

tell me about div tag?

its purpose,its attributes,

25th Jun 2016, 12:08 PM
aamir niazi
aamir niazi - avatar
4 odpowiedzi
+ 3
it's used to create different sections/areas on a webpage. classes and ids can be applied. In html5 it is replaced by the article tag.
25th Jun 2016, 2:48 PM
Alissa Ackerson Herbert
Alissa Ackerson Herbert - avatar
+ 2
It has a default { display: block } CSS rule. If placed inside a p tag you might have issues with browser compatibility. I suggest never to use div tags inside elements having as default style inline display.
26th Jun 2016, 8:30 PM
Elena Alexie
Elena Alexie - avatar
+ 1
thanks...
26th Jun 2016, 10:49 PM
aamir niazi
aamir niazi - avatar
+ 1
It is not replaced. If you content has semantic use an article/section tag. If you need a tag just for styling then use a div.
27th Jun 2016, 4:55 AM
Alejandro Bozzi