Section 4.3

Sections

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

Read this section of the standard ↗

All 15 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.

Sections 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.

<body>
  <header class="site">
    <h1>The Daily Loaf</h1>
    <nav aria-label="Main">
      <a href="#recipe">Recipes</a>
      <a href="#popular">Popular</a>
      <a href="#contact">Contact</a>
    </nav>
  </header>

  <div class="layout">
    <article id="recipe">
      <hgroup>
        <h2>Sourdough for beginners</h2>
        <p>A slow bread that rewards patience.</p>
      </hgroup>
      <section>
        <h3>Day one</h3>
        <p>Feed your starter with flour and water.</p>
        <h4>Morning</h4>
        <p>Mix, then let the dough rest.</p>
        <h5>If your kitchen is cold</h5>
        <p>Leave it near the oven.</p>
        <h6>One last tip</h6>
        <p>Be patient: six heading levels, from h1 to h6, make the outline.</p>
      </section>
      <footer>
        <p>Posted by Ana, 3 comments</p>
      </footer>
    </article>

    <aside id="popular">
      <h2>Popular this week</h2>
      <p>Banana bread</p>
      <p>Focaccia</p>
      <p>Cinnamon rolls</p>
    </aside>
  </div>

  <footer class="site" id="contact">
    <address>Questions? Write to <a href="mailto:hello@example.com">hello@example.com</a></address>
  </footer>
</body>

Each element in detail

<body>

Baseline: widely availablesince January 2018

WHATWG Document body

MDN The <body> HTML element represents the content of an HTML document. There can be only one <body> element in a document.

Live preview Example from MDN
<html lang="en">
  <head>
    <title>Document title</title>
  </head>
  <body>
    <p>
      The <code>&lt;body&gt;</code> HTML element represents the content of an
      HTML document. There can be only one <code>&lt;body&gt;</code> element in
      a document.
    </p>
  </body>
</html>

Content model

Categories
none
Parents
html
Children
flow
Interface
HTMLBodyElement

Browser support

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

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

Attributes

onmessage
message event handler for Window object Value: Event handler content attribute
onoffline
offline event handler for Window object Value: Event handler content attribute
ononline
online event handler for Window object Value: Event handler content attribute
onpageswap
pageswap event handler for Window object Value: Event handler content attribute
onpagehide
pagehide event handler for Window object Value: Event handler content attribute
onpageshow
pageshow event handler for Window object Value: Event handler content attribute
onpopstate
popstate event handler for Window object Value: Event handler content attribute
onstorage
storage event handler for Window object Value: Event handler content attribute
onunload
unload event handler for Window object Value: Event handler content attribute

Also accepts the global attributes.

<article>

Baseline: widely availablesince January 2018

WHATWG Self-contained syndicatable or reusable composition

MDN The <article> HTML element represents a self-contained composition in a document, page, application, or site, which is intended to be independently distributable or reusable (e.g., in syndication). Examples include: a forum post, a magazine or newspaper article, or a blog entry, a product card, a user-submitted comment, an interactive widget or gadget, or any other independent item of content.

Live preview Example from MDN
<article class="forecast">
  <h1>Weather forecast for Seattle</h1>
  <article class="day-forecast">
    <h2>03 March 2018</h2>
    <p>Rain.</p>
  </article>
  <article class="day-forecast">
    <h2>04 March 2018</h2>
    <p>Periods of rain.</p>
  </article>
  <article class="day-forecast">
    <h2>05 March 2018</h2>
    <p>Heavy rain.</p>
  </article>
</article>

Content model

Categories
flow; sectioning; palpable
Parents
flow
Children
flow
Interface
HTMLElement

Browser support

First browser version supporting <article>
Chrome 5
Edge 12
Firefox 4
Safari 5
Chrome Android 18
Safari iOS 4.2

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

Attributes

No element-specific attribute.

Also accepts the global attributes.

<section>

Baseline: widely availablesince January 2018

WHATWG Generic document or application section

MDN The <section> HTML element represents a generic standalone section of a document, which doesn't have a more specific semantic element to represent it. Sections should always have a heading, with very few exceptions.

Live preview Example from MDN
<h1>Choosing an Apple</h1>
<section>
  <h2>Introduction</h2>
  <p>
    This document provides a guide to help with the important task of choosing
    the correct Apple.
  </p>
</section>

<section>
  <h2>Criteria</h2>
  <p>
    There are many different criteria to be considered when choosing an Apple —
    size, color, firmness, sweetness, tartness...
  </p>
</section>

Content model

Categories
flow; sectioning; palpable
Parents
flow
Children
flow
Interface
HTMLElement

Browser support

First browser version supporting <section>
Chrome 5
Edge 12
Firefox 4
Safari 5
Chrome Android 18
Safari iOS 4.2

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

Attributes

No element-specific attribute.

Also accepts the global attributes.

<aside>

Baseline: widely availablesince January 2018

WHATWG Sidebar for tangentially related content

MDN The <aside> HTML element represents a portion of a document whose content is only indirectly related to the document's main content. Asides are frequently presented as sidebars or call-out boxes.

Live preview Example from MDN
<p>
  Salamanders are a group of amphibians with a lizard-like appearance, including
  short legs and a tail in both larval and adult forms.
</p>

<aside>
  <p>The Rough-skinned Newt defends itself with a deadly neurotoxin.</p>
</aside>

<p>
  Several species of salamander inhabit the temperate rainforest of the Pacific
  Northwest, including the Ensatina, the Northwestern Salamander and the
  Rough-skinned Newt. Most salamanders are nocturnal, and hunt for insects,
  worms and other small creatures.
</p>

Content model

Categories
flow; sectioning; palpable
Parents
flow
Children
flow
Interface
HTMLElement

Browser support

First browser version supporting <aside>
Chrome 5
Edge 12
Firefox 4
Safari 5
Chrome Android 18
Safari iOS 4.2

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

Attributes

No element-specific attribute.

Also accepts the global attributes.

<h1><h2><h3><h4><h5><h6>

Baseline: widely availablesince January 2018

WHATWG Heading

MDN The <h1> to <h6> HTML elements represent six levels of section headings. <h1> is the highest section level and <h6> is the lowest. By default, all heading elements create a block-level box in the layout, starting on a new line and taking up the full width available in their containing block.

Live preview Example from MDN
<h1>Beetles</h1>
<h2>External morphology</h2>
<h3>Head</h3>
<h4>Mouthparts</h4>
<h3>Thorax</h3>
<h4>Prothorax</h4>
<h4>Pterothorax</h4>

Content model

Categories
flow; heading; palpable
Parents
legend; summary; flow
Children
phrasing
Interface
HTMLHeadingElement

Browser support

First browser version supporting <h1>, <h2>, <h3>, <h4>, <h5>, <h6>
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.

<hgroup>

Baseline: widely availablesince January 2018

WHATWG Heading container

MDN The <hgroup> HTML element represents a heading and related content. It groups a single <h1>–<h6> element with one or more <p>.

Live preview Example from MDN
<hgroup>
  <h1>Frankenstein</h1>
  <p>Or: The Modern Prometheus</p>
</hgroup>
<p>
  Victor Frankenstein, a Swiss scientist, has a great ambition: to create
  intelligent life. But when his creature first stirs, he realizes he has made a
  monster. A monster which, abandoned by his master and shunned by everyone who
  sees it, follows Dr Frankenstein to the very ends of the earth.
</p>

Content model

Categories
flow; palpable
Parents
legend; summary; flow
Children
h1; h2; h3; h4; h5; h6; p; script-supporting elements
Interface
HTMLElement

Browser support

First browser version supporting <hgroup>
Chrome 5
Edge 12
Firefox 4
Safari 5
Chrome Android 18
Safari iOS 4.2

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

Attributes

No element-specific attribute.

Also accepts the global attributes.

<address>

Baseline: widely availablesince January 2018

WHATWG Contact information for a page or article element

MDN The <address> HTML element indicates that the enclosed HTML provides contact information for a person or people, or for an organization.

Live preview Example from MDN
<p>Contact the author of this page:</p>

<address>
  <a href="mailto:jim@example.com">jim@example.com</a><br />
  <a href="tel:+14155550132">+1 (415) 555‑0132</a>
</address>

Content model

Categories
flow; palpable
Parents
flow
Children
flow*
Interface
HTMLElement

Browser support

First browser version supporting <address>
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.