HTMLHTML12 min read

HTML Div

Use div as a box/container to group content for layout and styling.

David Miller
December 31, 2025
0.0k0

div is a container (a box). It helps you group elements. ## Example ```html <div style="border: 1px solid #ccc; padding: 10px;"> <h2>Card Title</h2> <p>This is inside a div box.</p> </div> ``` ## Preview A box appears with title and paragraph inside. ## When you use div - grouping sections - making layout blocks - applying CSS to a group

#HTML#Beginner