HTML Div
HTML <div> Element
The <div> tag is used as a container to group HTML elements.
Basic Example
<div> <h2>Hello</h2> <p>This is a div container</p> </div>
Why use div?
- Group elements together
- Create layout structure
- Apply CSS styling
- Build website sections
SEO Tip
Use semantic tags like <section> when possible instead of only div.