HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
A <div> section in a document that is styled with CSS
The <div>
tag defines a division or a section in an HTML document.
The <div>
tag is used as a container for HTML elements
- which is then styled with CSS or manipulated with JavaScript.
The <div>
tag is easily styled by
using the class or id attribute.
Any sort of content can be put inside the <div>
tag!
<div>
element.
Element | |||||
---|---|---|---|---|---|
<div> | Yes | Yes | Yes | Yes | Yes |
The <div>
tag also supports the Global Attributes in HTML.
The <div>
tag also supports the Event Attributes in HTML.
HTML tutorial: HTML Block and Inline Elements
HTML tutorial: HTML Layout
HTML DOM reference: Div Object
Most browsers will display the <div>
element with the following default values:
div {
display: block;
}