The div tag stands for Division tag. This is used in HTML to make divisions of content in the web page like text, images, header, footer, navigation bar, etc. Div tag has two parts like:
- open(<div>) and
- closing (</div>) tag and it is mandatory to maintain the tag.
The Div is the most used tag in web page development because it has power to separate respective data in the web page and also a particular section can be created for particular data or function in the web pages.
- Div tag is Block level tag
- Generic container tag
<html>
<head>
<title>div tag demo</title>
<style type=text/css>
p{
background-color:gray;
margin: 100px;
}
div
{
color: white;
background-color: 009900;
margin: 4px;
font-size: 35px;
}
</style>
</head>
<body>
<div > div tag demo 1 </div>
<div > div tag demo 2 </div>
<div > div tag demo 3 </div>
<div > div tag demo 4 </div>
</body>
</html>