div element
A generic HTML container, div for blocks and span for inline text, that groups content for styling but says nothing about what the content is.
In more detail
Divs and spans are useful for layout, but a page made only of them has no landmarks or roles for assistive technology. Prefer a semantic element when one fits.
Related terms
- semantic HTML — Using HTML elements for their meaning, such as <button> for actions and <nav> for navigation, rather than generic <div>s.
- landmark — A region of a page, such as navigation, main content or footer, that assistive technology users can jump between.
Taught in
- Semantic HTML Elements: Landmarks And Structure — Frontend Architecture & Web Platform
- CSS Parsing, The CSSOM And The Render Tree — Frontend Architecture & Web Platform