What is "div"
To <div>
(or splitter), which must be closed by </div>
, is an HTML block element often used for website layout or for content that does not semantically fit into any other element. The only semantic meaning of a "division" is the logical grouping of content within it. Because of this, it can be used freely for non-standard presentation or behavior purposes. It is strongly encouraged that this element is only used as a last resort when there is no other appropriate element.
Of the HTML5 specification:
The
elemento
div has no special meaning. It represents your children. It can be used with the class, lang, and title attributes to mark semantics common to a group of consecutive elements.
They are often used to produce floating content in layouts, in preference to the semantically inadequate element <table>
. Often used together with "class" and "id" attributes for divisions such as "Header message" or "Table of Contents" respectively.
References: