The <div> Tag

The <div> tag is one of the most commonly used block-type tags in HTML.

Its main role is to serve as a container for other HTML elements to group or logically organize them.

It is particularly useful for structuring content into sections or blocks, making it much easier to apply styles with the CSS language, which we will cover in the next lesson.

With these tags, we can control the layout, size, positioning, and visual appearance of different content blocks.

Unlike <p>, the <div> tag is not a semantic tag but rather a presentation or layout tag.

In essence, think of it as a box in which you place other HTML elements. These containers can then be styled and positioned using CSS.

The goal is to achieve this result: