The <div> element is used as a container for other HTML elements.
The <div> element is by default a block-level element, meaning that it takes all available width and starts on a new line.
The <div> element is often used to group sections of a web page together.
<div> <h2>London</h2> <p>London is the capital city of England.</p> <p>London has over 13 million inhabitants.</p> </div>
You can have many <div> containers on the same page.
<div> <h2>Patna</h2> <p>Patna is the capital city of Bihar.</p> </div> <div> <h2>Delhi</h2> <p>Delhi is the capital city of India.</p> </div> <div> <h2>Aurangabad</h2> <p>Aurangabad is located in Bihar.</p> </div>
Classes are commonly used with div elements for styling.
<div class="box"> Welcome to Soopro Pathshala </div>
IDs uniquely identify a div element.
<div id="header"> Website Header </div>
Which HTML tag is commonly used as a container for other elements?