crus4

logo

HTML div Tag



The <div> tag is a generic container used to group together other HTML elements. The <div> tag has no required attributes, but style, class and id are common. It can be used with JavaScript to make it easier to work with (dynamic). Many developers use div tag in their web designs.

The <div> tag has no special meaning at all. It represents its children. Also it can be used with the class, lang, and title attributes to mark up semantics common to a group of consecutive elements.

Example

<div>Hello crus4 learners!</div>

The <div> element is supported by almost all major browsers.

HTML div Tag