The div element (<div>) is a generic block-level container that has no semantic value other than the one that you give it via id or class attributes. It can be used for a variety of purposes including the styling of common elements, or for grouping elements with common attributes.
Overview TableThe div tag contains no native semantics, and is only effectively used for styling purposes.
In some cases, other elements may be more suitable, like article, section, fieldset, nav, header, footer, or main
ExamplesThis example shows two DIVs, one inside the other, that define a main content section, then a subsection within that. Each DIV is semantically defined using a class or ID.
<div id="mainContent">
<h1>The HTML Times</h1>
<div class="sportsSection">
<h2>Sports</h2>
</div>
</div>
Related specifications
div
Mozilla Developer Network : Article
Microsoft Developer Network: [Windows Internet Explorer API reference Article]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4