- Element of
- HTML Document Structure Before And After HTML5 – Here’s What Changed
- What does
<div> HTML Tagdo?
- The <div> element defines an arbitrary block of content which can be placed and styled as a single unit.
Just a block
<div> element has no particular semantic meaning. It simply defines a block of content which can be styled as a single unit on a page. Prior to the semantic elements added in HTML5, it was the main structural element defining sections of an HTML Document. Today, there are a number of better structural elements which can be styled the same way as
<div> elements, but add semantic meaning, identifying their purpose in the overall document. These include:
Adoption of these semantic structural elements is not universal, but they are widely supported on browsers. So, while you will continue to see
<div> elements in existing websites (and front-end frameworks like Twitter's Bootstrap), you should use the newer elements whenever appropriate.
Browser Support for div