| created | 2026-05-03 23:47 | ||
|---|---|---|---|
| source | https://www.freecodecamp.org/learn/responsive-web-design-v9/lecture-html-fundamentals/what-are-div-elements | ||
| tags |
|
The div element will be used mostly to group [[HTML elements]] which share a set of [[CSS styles]]
The div element does not have a [[semantic]] meaning.
Make sure not to overuse div. Other [[HTML elements|elements]] maybe more appropriate to use on various occasions. E.g., if you want to divide content into multiple sections, don't use div, use [[section]], instead.
<div>
<p>Example paragraph element.</p>
</div>