HTML Tag Reference - HTML tag div

The <div> element stands for division and is used to segregate a group of elements.

Browser compatibility

<div> Yes Yes Yes Yes Yes

What's new in HTML5

The align attribute is deprecated in HTML5.


Not supported in HTML5. Align the content.

Global Attributes

The <div> tag supports the Global Attributes in HTML.

Event Attributes

The <div> tag supports the Event Attributes in HTML.

Default CSS Settings

div {
    display: block;


A demo showing how to use <div> tag.

     <div style="background-color: #CCFFCC; border: 1px none #000000;">
          <p>This div element contains only text.</p>

Click to view the demo