The <div>
element stands for
division and is used to segregate a group of elements.
<div> |
Yes | Yes | Yes | Yes | Yes |
The align
attribute is deprecated in HTML5.
The <div> tag supports the Global Attributes in HTML.
The <div> tag supports the Event Attributes in HTML.
div { display: block; }
A demo showing how to use <div> tag.
<html>
<body>
<div style="background-color: #CCFFCC; border: 1px none #000000;">
<p>This div element contains only text.</p>
</div>
</body>
</html>