Articles → HTML → div tag in HTML

div tag in HTML






Purpose





Syntax


<div> Contents </div>



Example


<html>

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head>

<body>
	<div style="border:1px solid black;height:25%"> Test1 </div>
	<div style="border:1px solid black;height:25%"> Test2 </div>
	<div style="border:1px solid black;height:25%"> Test3 </div>
	<div style="border:1px solid black;height:25%"> Test4 </div>
</body>

</html>







Output


Picture showing the output of div tag in html

Click to Enlarge


Browser support


Internet ExplorerFirefoxChromeSafariOperaEdge
YesYesYesYesYesYes



Posted By  -  Karan Gupta
 
Posted On  -  Tuesday, November 1, 2016
 
Updated On  -  Saturday, November 18, 2017

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250