Section 4.4

Grouping content

16 entries from this section of the HTML Living Standard, in the order the standard presents them.

Read this section of the standard ↗

All 16 elements together

One small page that uses every element of this section. Turn on Show tags and point at any part of the page: a label tells you which element draws it. Click to jump to that element's details below.

Grouping content Written for this site

Every element of this section is in the page above. Point at one to find it, click it to read its details.

<main>
  <search>
    <form>
      <label for="q">Search the guide</label>
      <input id="q" name="q" type="search" placeholder="e.g. watering">
    </form>
  </search>

  <div class="card">
    <h1>House plant care</h1>
    <p class="lead">Five minutes a week keep a house plant happy. Here is everything in one place.</p>

    <menu aria-label="Page tools">
      <li><button type="button">Print</button></li>
      <li><button type="button">Share</button></li>
      <li><button type="button">Save</button></li>
    </menu>

    <hr>

    <div class="columns">
      <div>
        <h2>What you need</h2>
        <ul>
          <li>A pot with a hole at the bottom</li>
          <li>Potting soil</li>
          <li>A watering can</li>
        </ul>
      </div>
      <div>
        <h2>Every week</h2>
        <ol>
          <li>Touch the soil.</li>
          <li>If it is dry, water slowly.</li>
          <li>Turn the pot a quarter turn.</li>
        </ol>
      </div>
    </div>

    <h2>Words to know</h2>
    <dl>
      <dt>Repotting</dt>
      <dd>Moving a plant into a bigger pot.</dd>
      <dt>Drainage</dt>
      <dd>Letting extra water flow out of the pot.</dd>
    </dl>

    <div class="columns">
      <figure>
        <blockquote>
          <p>The best time to plant a tree was twenty years ago. The second best time is now.</p>
        </blockquote>
        <figcaption>A popular proverb</figcaption>
      </figure>
      <figure>
        <pre>
    \ | /
  --( * )--
    / | \
      |
   ___|___
   \_____/</pre>
        <figcaption>A plant drawn with text: pre keeps every space.</figcaption>
      </figure>
    </div>
  </div>
</main>

Each element in detail

<p>

Baseline: widely availablesince January 2018

WHATWG Paragraph

MDN The <p> HTML element represents a paragraph. Paragraphs are usually represented in visual media as blocks of text separated from adjacent blocks by blank lines and/or first-line indentation, but HTML paragraphs can be any structural grouping of related content, such as images or form fields.

Live preview Example from MDN
<p>
  Geckos are a group of usually small, usually nocturnal lizards. They are found
  on every continent except Antarctica.
</p>

<p>
  Some species live in houses where they hunt insects attracted by artificial
  light.
</p>

Content model

Categories
flow; palpable
Parents
flow
Children
phrasing
Interface
HTMLParagraphElement

Browser support

First browser version supporting <p>
Chrome 1
Edge 12
Firefox 1
Safari 1
Chrome Android 18
Safari iOS 1

First version with support, from MDN browser-compat-data.

Attributes

No element-specific attribute.

Also accepts the global attributes.

<hr>

Baseline: widely availablesince January 2018

WHATWG Thematic break

MDN The <hr> HTML element represents a thematic break between elements: for example, a change of scene in a story, or a shift of topic within a section.

Live preview Example from MDN
<p>§1: The first rule of Fight Club is: You do not talk about Fight Club.</p>

<hr />

<p>§2: The second rule of Fight Club is: Always bring cupcakes.</p>

Content model

Categories
flow
Parents
flow; select
Children
empty
Interface
HTMLHRElement

Browser support

First browser version supporting <hr>
Chrome 1
Edge 12
Firefox 1
Safari 3
Chrome Android 18
Safari iOS 1

First version with support, from MDN browser-compat-data.

Attributes

No element-specific attribute.

Also accepts the global attributes.

<pre>

Baseline: widely availablesince January 2018

WHATWG Block of preformatted text

MDN The <pre> HTML element represents preformatted text which is to be presented exactly as written in the HTML file. The text is typically rendered using a non-proportional, or monospaced font.

Live preview Example from MDN
<pre>
             S
             A
            LUT
             M
            O N
            D  E
            DONT
          JE SUIS
          LA  LAN
          G U E  É
         L O Q U E N
        TE      QUESA
       B  O  U  C  H  E
      O        P A R I S
     T I R E   ET   TIRERA
    T O U             JOURS
   AUX                  A  L
 LEM                      ANDS   - Apollinaire
</pre>

Content model

Categories
flow; palpable
Parents
flow
Children
phrasing
Interface
HTMLPreElement

Browser support

First browser version supporting <pre>
Chrome 1
Edge 12
Firefox 1
Safari ≤4
Chrome Android 18
Safari iOS ≤3.2

First version with support, from MDN browser-compat-data.

Attributes

No element-specific attribute.

Also accepts the global attributes.

<blockquote>

Baseline: widely availablesince January 2018

WHATWG A section quoted from another source

MDN The <blockquote> HTML element indicates that the enclosed text is an extended quotation. Usually, this is rendered visually by indentation (see Notes for how to change it). A URL for the source of the quotation may be given using the cite attribute, while a text representation of the source can be given using the <cite> element.

Live preview Example from MDN
<div>
  <blockquote cite="https://www.huxley.net/bnw/four.html">
    <p>
      Words can be like X-rays, if you use them properly—they'll go through
      anything. You read and you're pierced.
    </p>
  </blockquote>
  <p>—Aldous Huxley, <cite>Brave New World</cite></p>
</div>

Content model

Categories
flow; palpable
Parents
flow
Children
flow
Interface
HTMLQuoteElement

Browser support

First browser version supporting <blockquote>
Chrome 1
Edge 12
Firefox 1
Safari ≤4
Chrome Android 18
Safari iOS ≤3.2

First version with support, from MDN browser-compat-data.

Attributes

cite
Link to the source of the quotation or more information about the edit Value: Valid URL potentially surrounded by spaces

Also accepts the global attributes.

<ol>

Baseline: widely availablesince January 2018

WHATWG Ordered list

MDN The <ol> HTML element represents an ordered list of items — typically rendered as a numbered list.

Live preview Example from MDN
<ol>
  <li>Mix flour, baking powder, sugar, and salt.</li>
  <li>In another bowl, mix eggs, milk, and oil.</li>
  <li>Stir both mixtures together.</li>
  <li>Fill muffin tray 3/4 full.</li>
  <li>Bake for 20 minutes.</li>
</ol>

Content model

Categories
flow; palpable*
Parents
flow
Children
li; script-supporting elements
Interface
HTMLOListElement

Browser support

First browser version supporting <ol>
Chrome 1
Edge 12
Firefox 1
Safari ≤4
Chrome Android 18
Safari iOS ≤3.2

First version with support, from MDN browser-compat-data.

Attributes

reversed
Number the list backwards Value: Boolean attribute
start
Starting value of the list Value: Valid integer
type
Kind of list marker Value: "1"; "a"; "A"; "i"; "I"

Also accepts the global attributes.

<ul>

Baseline: widely availablesince January 2018

WHATWG List

MDN The <ul> HTML element represents an unordered list of items, typically rendered as a bulleted list.

Live preview Example from MDN
<ul>
  <li>Milk</li>
  <li>
    Cheese
    <ul>
      <li>Blue cheese</li>
      <li>Feta</li>
    </ul>
  </li>
</ul>

Content model

Categories
flow; palpable*
Parents
flow
Children
li; script-supporting elements
Interface
HTMLUListElement

Browser support

First browser version supporting <ul>
Chrome 1
Edge 12
Firefox 1
Safari ≤4
Chrome Android 18
Safari iOS ≤3.2

First version with support, from MDN browser-compat-data.

Attributes

No element-specific attribute.

Also accepts the global attributes.

<li>

Baseline: widely availablesince January 2018

WHATWG List item

MDN The <li> HTML element is used to represent an item in a list. It must be contained in a parent element: an ordered list (<ol>), an unordered list (<ul>), or a menu (<menu>). In menus and unordered lists, list items are usually displayed using bullet points. In ordered lists, they are usually displayed with an ascending counter on the left, such as a number or letter.

Live preview Example from MDN
<p>Apollo astronauts:</p>

<ul>
  <li>Neil Armstrong</li>
  <li>Alan Bean</li>
  <li>Peter Conrad</li>
  <li>Edgar Mitchell</li>
  <li>Alan Shepard</li>
</ul>

Content model

Categories
none
Parents
ol; ul; menu*
Children
flow
Interface
HTMLLIElement

Browser support

First browser version supporting <li>
Chrome 1
Edge 12
Firefox 1
Safari 3
Chrome Android 18
Safari iOS 1

First version with support, from MDN browser-compat-data.

Attributes

value
Ordinal value of the list item Value: Valid integer

Also accepts the global attributes.

<dl>

Baseline: widely availablesince January 2018

WHATWG Association list consisting of zero or more name-value groups

MDN The <dl> HTML element represents a description list. The element encloses a list of groups of terms (specified using the <dt> element) and descriptions (provided by <dd> elements). Common uses for this element are to implement a glossary or to display metadata (a list of key-value pairs).

Live preview Example from MDN
<p>Cryptids of Cornwall:</p>

<dl>
  <dt>Beast of Bodmin</dt>
  <dd>A large feline inhabiting Bodmin Moor.</dd>

  <dt>Morgawr</dt>
  <dd>A sea serpent.</dd>

  <dt>Owlman</dt>
  <dd>A giant owl-like creature.</dd>
</dl>

Content model

Categories
flow; palpable
Parents
flow
Children
dt*; dd*; div*; script-supporting elements
Interface
HTMLDListElement

Browser support

First browser version supporting <dl>
Chrome 1
Edge 12
Firefox 1
Safari ≤4
Chrome Android 18
Safari iOS ≤3.2

First version with support, from MDN browser-compat-data.

Attributes

No element-specific attribute.

Also accepts the global attributes.

<dt>

Baseline: widely availablesince January 2018

WHATWG Legend for corresponding dd element(s)

MDN The <dt> HTML element specifies a term in a description or definition list, and as such must be used inside a <dl> element. It is usually followed by a <dd> element; however, multiple <dt> elements in a row indicate several terms that are all defined by the immediate next <dd> element.

Live preview Example from MDN
<p>Please use the following paint colors for the new house:</p>

<dl>
  <dt>Denim (semigloss finish)</dt>
  <dd>Ceiling</dd>

  <dt>Denim (eggshell finish)</dt>
  <dt>Evening Sky (eggshell finish)</dt>
  <dd>Layered on the walls</dd>
</dl>

Content model

Categories
none
Parents
dl; div*
Children
flow*
Interface
HTMLElement

Browser support

First browser version supporting <dt>
Chrome 1
Edge 12
Firefox 1
Safari ≤4
Chrome Android 18
Safari iOS ≤3.2

First version with support, from MDN browser-compat-data.

Attributes

No element-specific attribute.

Also accepts the global attributes.

<dd>

Baseline: widely availablesince January 2018

WHATWG Content for corresponding dt element(s)

MDN The <dd> HTML element provides the description, definition, or value for the preceding term (<dt>) in a description list (<dl>).

Live preview Example from MDN
<p>Cryptids of Cornwall:</p>

<dl>
  <dt>Beast of Bodmin</dt>
  <dd>A large feline inhabiting Bodmin Moor.</dd>

  <dt>Morgawr</dt>
  <dd>A sea serpent.</dd>

  <dt>Owlman</dt>
  <dd>A giant owl-like creature.</dd>
</dl>

Content model

Categories
none
Parents
dl; div*
Children
flow
Interface
HTMLElement

Browser support

First browser version supporting <dd>
Chrome 1
Edge 12
Firefox 1
Safari ≤4
Chrome Android 18
Safari iOS ≤3.2

First version with support, from MDN browser-compat-data.

Attributes

No element-specific attribute.

Also accepts the global attributes.

<figure>

Baseline: widely availablesince January 2018

WHATWG Figure with optional caption

MDN The <figure> HTML element represents self-contained content, potentially with an optional caption, which is specified using the <figcaption> element. The figure, its caption, and its contents are referenced as a single unit.

Live preview Example from MDN
<figure>
  <img
    src="https://developer.mozilla.org/shared-assets/images/examples/elephant.jpg"
    alt="Elephant at sunset" />
  <figcaption>An elephant at sunset</figcaption>
</figure>

Content model

Categories
flow; palpable
Parents
flow
Children
figcaption*; flow
Interface
HTMLElement

Browser support

First browser version supporting <figure>
Chrome 8
Edge 12
Firefox 4
Safari 5.1
Chrome Android 18
Safari iOS 5

First version with support, from MDN browser-compat-data.

Attributes

No element-specific attribute.

Also accepts the global attributes.

<figcaption>

Baseline: widely availablesince January 2018

WHATWG Caption for figure

MDN The <figcaption> HTML element represents a caption or legend describing the rest of the contents of its parent <figure> element, providing the <figure> an accessible name.

Live preview Example from MDN
<figure>
  <img
    src="https://developer.mozilla.org/shared-assets/images/examples/elephant.jpg"
    alt="Elephant at sunset" />
  <figcaption>An elephant at sunset</figcaption>
</figure>

Content model

Categories
none
Parents
figure
Children
flow
Interface
HTMLElement

Browser support

First browser version supporting <figcaption>
Chrome 8
Edge 12
Firefox 4
Safari 5.1
Chrome Android 18
Safari iOS 5

First version with support, from MDN browser-compat-data.

Attributes

No element-specific attribute.

Also accepts the global attributes.

<main>

Baseline: widely availablesince January 2018

WHATWG Container for the dominant contents of the document

MDN The <main> HTML element represents the dominant content of the <body> of a document. The main content area consists of content that is directly related to or expands upon the central topic of a document, or the central functionality of an application.

Live preview Example from MDN
<header>Gecko facts</header>

<main>
  <p>
    Geckos are a group of usually small, usually nocturnal lizards. They are
    found on every continent except Antarctica.
  </p>

  <p>
    Many species of gecko have adhesive toe pads which enable them to climb
    walls and even windows.
  </p>
</main>

Content model

Categories
flow; palpable
Parents
flow*
Children
flow
Interface
HTMLElement

Browser support

First browser version supporting <main>
Chrome 26
Edge 12
Firefox 21
Safari 7
Chrome Android 26
Safari iOS 7

First version with support, from MDN browser-compat-data.

Attributes

No element-specific attribute.

Also accepts the global attributes.

<div>

Baseline: widely availablesince January 2018

WHATWG Generic flow container, or container for name-value groups in dl elements

MDN The <div> HTML element is the generic container for flow content. It has no effect on the content or layout until styled in some way using CSS (e.g., styling is directly applied to it, or some kind of layout model like Flexbox is applied to its parent element).

Live preview Example from MDN
<div class="warning">
  <img
    src="https://developer.mozilla.org/shared-assets/images/examples/leopard.jpg"
    alt="An intimidating leopard." />
  <p>Beware of the leopard</p>
</div>

Content model

Categories
flow; palpable
Parents
flow; dl; option; optgroup; select
Children
flow*
Interface
HTMLDivElement

Browser support

First browser version supporting <div>
Chrome 1
Edge 12
Firefox 1
Safari 1
Chrome Android 18
Safari iOS 1

First version with support, from MDN browser-compat-data.

Attributes

No element-specific attribute.

Also accepts the global attributes.