Inline & Block Elements
Div Tag
The <div> (division) tag is a generic block container. It has no meaning and no default style of its own. You use it to group elements so you can style or position them together with CSS.
Syntax:
<div class="card">
<img src="python.png" alt="">
<h2>Python from Zero</h2>
<p>Learn Python step by step.</p>
<a href="/courses/python">Start</a>
</div>.card {
border: 1px solid #ddd;
border-radius: 12px;
padding: 20px;
max-width: 300px;
}Almost every web layout is built from boxes inside boxes, and <div> is the most common box.