On this page
<div>
Prev: `<strong>` | Up: text | Next: `<center>`
Rel: text, Text & Lists Guide
Ref: MDN Web Docs — <div>
Tags: #public #web #html #elements #text #tier/core
Summary
Neutral block container (<span> for inline) with no semantic meaning.
- Implicit ARIA Role:
generic - DOM Interface:
HTMLDivElement - Key Attributes:
class, id, data-*
Notes & Best Practices
- Generic flow container with zero semantics: Reach for
<main>,<section>,<article>,<nav>, or<button>first whenever a semantic element fits.
Example
<div class="card-grid">
<article class="card">Item 1</article>
<article class="card">Item 2</article>
</div>
Linked from
Related notes
- tuts/html/elements/text/center Linked here; links to this page; shared tags: #elements, #html, #text, #tier, #web
- tuts/html/elements/text/strong Linked here; links to this page; shared tags: #elements, #html, #text, #tier, #web
- tuts/html/elements/text Linked here; links to this page; shared tags: #elements, #html, #text, #web
- tuts/html/elements/text_and_lists Linked here; shared tags: #elements, #html, #web
- tuts/html/elements/text/a shared tags: #elements, #html, #text, #tier, #web
- tuts/html/elements/text/code shared tags: #elements, #html, #text, #tier, #web
- tuts/html/elements/text/dl shared tags: #elements, #html, #text, #tier, #web
- tuts/html/elements/text/font shared tags: #elements, #html, #text, #tier, #web
- tuts/html/elements/text/h1 shared tags: #elements, #html, #text, #tier, #web
- tuts/html/elements/text/ol shared tags: #elements, #html, #text, #tier, #web