A section in a document that will be displayed in blue:
![]()
The <div> tag is supported in all major browsers.
The <div> tag defines a division or a section in an HTML document.
The <div> tag is used to group block-elements to format them with CSS.
Tip: The <div> element is very often used together with CSS, to layout a web page.
Note: By default, browsers always place a line break before and after the <div> element. However, this can be changed with CSS.
The align attribute not supported in HTML5.
The align attribute is deprecated in HTML 4.01.
| Attribute | Value | Description |
|---|---|---|
| align | left right center justify |
Not supported in HTML5. Deprecated in HTML 4.01. Specifies the alignment of the content inside a <div> element |
The <div> tag also supports the Global Attributes in HTML.
The <div> tag also supports the Event Attributes in HTML.
HTML tutorial: HTML Layout
Your message has been sent to W3Schools.