0
What are div tags used for in html? Are they necessary to use in an html document?
2 Answers
+ 1
it is optional, as to speak, but it does divide html documents into sections, as the other guy said. and itâs pretty useful for css if you only want to style large parts of a document, either internally or externally (class, id). the <span> element can do the same thing, but itâs more of an inline element so itâs not really recommended for large sections of content.
0
it encapsulates other page elements and and divides html documents into sections.