Skip to main content

HTML elements

Text blocks

Hold the reading content of a page: paragraphs, lists, quotations and preformatted text.

A longer quotation, set apart as its own block. Put the source URL in the cite attribute, and say who said it outside the quote, for example in a figcaption.

The best interface is the one the browser already ships.

HTML
<blockquote>
  <p>The best interface is the one the browser already ships.</p>
</blockquote>

Styled by elements/text.css, with no class.

The value or explanation that follows a dt in a description list. One term can have several.

Token
A named design decision, stored as a variable.
HTML
<dl>
  <dt>Token</dt>
  <dd>A named design decision, stored as a variable.</dd>
</dl>

Styled by elements/text.css, with no class.

A plain box that adds no meaning. Use it only when no other element fits, and give it a class that says what it is for.

First block
Second block
HTML
<div class="o-stack">
  <div>First block</div>
  <div>Second block</div>
</div>

LUZ adds no style: the browser look is kept. LUZ adds no style. The o-stack layout object spaces the children.

A list of names paired with values: a glossary, product specs, the details of a file. Each dt names something and the dd after it explains it.

Tokens
Layer 1, standalone.
Core
Layer 2, requires tokens.
HTML
<dl>
  <dt>Tokens</dt>
  <dd>Layer 1, standalone.</dd>
  <dt>Core</dt>
  <dd>Layer 2, requires tokens.</dd>
</dl>

Styled by elements/text.css, with no class.

The name half of a name and value pair in a description list, such as a word in a glossary. LUZ sets it in a heavier weight.

Catalog
Layer 3, catalog patterns.
HTML
<dl>
  <dt>Catalog</dt>
  <dd>Layer 3, catalog patterns.</dd>
</dl>

Styled by elements/text.css, with no class.

The caption of a figure. Make it the first or the last child of the figure.

A blue square and a grey circle
Two shapes, drawn in SVG.
HTML
<figure>
  <img src="shapes.svg" alt="A blue square and a grey circle" width="240" height="120">
  <figcaption>Two shapes, drawn in SVG.</figcaption>
</figure>

Styled by elements/text.css, with no class.

Wraps an image, a diagram, a code listing or a quote that the text refers to, with an optional caption. It could move elsewhere on the page without breaking the text.

A blue square and a grey circle
Two shapes, drawn in SVG.
HTML
<figure>
  <img src="shapes.svg" alt="A blue square and a grey circle" width="240" height="120">
  <figcaption>Two shapes, drawn in SVG.</figcaption>
</figure>

Styled by elements/text.css, with no class. LUZ makes a bare figure a padded surface. The .luz-figure component adds more.

Marks a change of topic or scene between paragraphs. Use it for that meaning, not as a decorative line: for a plain line, use a border.

Above the break.


Below the break.

HTML
<p>Above the break.</p>
<hr>
<p>Below the break.</p>

Styled by elements/text.css, with no class.

One item of a list. Its parent is an ol, a ul or a menu.

  • Tokens
  • Core
  • Catalog
HTML
<ul>
  <li>Tokens</li>
  <li>Core</li>
  <li>Catalog</li>
</ul>

Styled by elements/text.css, with no class: the items of a list sit one step apart.

A list of actions the user can take, such as the buttons of a toolbar. Browsers treat it like a ul; LUZ lays it out as a row.

  • HTML
    <menu>
      <li><button class="luz-btn luz-btn--outline luz-btn--sm" type="button">Cut</button></li>
      <li><button class="luz-btn luz-btn--outline luz-btn--sm" type="button">Copy</button></li>
      <li><button class="luz-btn luz-btn--outline luz-btn--sm" type="button">Paste</button></li>
    </menu>

    Styled by elements/text.css, with no class.

    A list where the order matters, such as steps or a ranking. A list with no class gets its markers back inside the box.

    1. Install the tokens.
    2. Add the core.
    3. Add the catalog package.
    HTML
    <ol>
      <li>Install the tokens.</li>
      <li>Add the core.</li>
      <li>Add the catalog package.</li>
    </ol>

    Styled by elements/text.css, with no class.

    One paragraph of text. LUZ asks the browser to avoid leaving a single word alone on the last line.

    LUZ is a vanilla design system: tokens, components and app patterns in plain CSS and ES modules, with no framework and no build step.

    HTML
    <p>LUZ is a vanilla design system: tokens, components and app patterns in plain CSS and ES modules, with no framework and no build step.</p>

    Styled by elements/text.css, with no class.

    Text shown exactly as typed, with every space and line break, in a fixed-width font. For code, add the .luz-code-block class and a code element.

    $ pnpm add @luz-ds/tokens
                $ pnpm add @luz-ds/core
    HTML
    <pre>$ pnpm add @luz-ds/tokens
    $ pnpm add @luz-ds/core</pre>

    Styled by elements/text.css, with no class.

    A list where the order does not matter, such as features or ingredients. A list with no class gets its markers back inside the box.

    • Tokens
    • Core
    • Catalog
    HTML
    <ul>
      <li>Tokens</li>
      <li>Core</li>
      <li>Catalog</li>
    </ul>

    Styled by elements/text.css, with no class.

    Description list patterns

    Three ways to use <dl>, built on the styles above. You may group each <dt> with its <dd> in a <div>: it is valid HTML and LUZ keeps the same space between groups.

    Metadata

    Facts about one thing, such as a file or an order. One name, one value, each pair in its own div so a script or a style can reach the pair.

    File
    annual-report.pdf
    Size
    2.4 MB
    Last changed
    HTML
    <dl>
      <div>
        <dt>File</dt>
        <dd>annual-report.pdf</dd>
      </div>
      <div>
        <dt>Size</dt>
        <dd>2.4 MB</dd>
      </div>
      <div>
        <dt>Last changed</dt>
        <dd><time datetime="2026-10-09">9 October 2026</time></dd>
      </div>
    </dl>

    Use a <time> with datetime for a date. Names are short nouns, values are plain text.

    Key and value pairs

    A summary of settings or details. A name may have several values: repeat the dd, one per value.

    Plan
    Team
    Members
    Ana Ruiz
    Luis Pérez
    Billing email
    billing@example.com
    HTML
    <dl>
      <div>
        <dt>Plan</dt>
        <dd>Team</dd>
      </div>
      <div>
        <dt>Members</dt>
        <dd>Ana Ruiz</dd>
        <dd>Luis Pérez</dd>
      </div>
      <div>
        <dt>Billing email</dt>
        <dd><a href="mailto:billing@example.com">billing@example.com</a></dd>
      </div>
    </dl>

    A name with more than one value stays one group: the screen reader announces each value in turn.

    Glossary

    Terms and their meanings. Each term is a dt with a dfn inside, and gets an id so other pages can link to its entry.

    Design token
    A named value, such as a color or a space, that components read.
    Color mode
    One set of color values for the whole page.
    Light, dark and high contrast are the three LUZ ships.
    HTML
    <dl>
      <dt id="term-token"><dfn>Design token</dfn></dt>
      <dd>A named value, such as a color or a space, that components read.</dd>
      <dt id="term-mode"><dfn>Color mode</dfn></dt>
      <dd>One set of color values for the whole page.</dd>
      <dd>Light, dark and high contrast are the three LUZ ships.</dd>
    </dl>

    Link to a term with #term-token. A term may have more than one meaning: repeat the dd.

    Before you rely on it

    • Keep the default display of the <dl> and of its groups. Setting flex or grid on list elements has made some browser and screen reader pairs drop the list semantics; see CSS display properties versus HTML semantics. Lay the pairs out on a wrapper you control, and test the result.
    • HTML allows a <div> inside a <dl> only around a name and its values. A source that tested a plain div wrapper found it can cause trouble for screen readers in some browsers ( Use of div in dl, no results given there). LUZ has not tested the grouped markup with NVDA, JAWS, VoiceOver, TalkBack or Orca.
    • For a table of many values per row, use a table, not a description list.