Elements

Styling for the HTML base elements. The browser defaults are customized in the “elements”: { … } section of the theme.json. Elements not yet supported by theme.json have been adjusted in the custom CSS.

Table of Contents

Text Formatting

<p> – Paragraph

This is a paragraph with regular body text. Paragraphs are the basic building blocks of text.

<p>This is a paragraph with regular body text. Paragraphs are the basic building blocks of text.</p>

<strong> – Strong emphasis

Strongly emphasized text – semantically important text.

<strong>Strongly emphasized text</strong>

<em> – Emphasis

Emphasized text – semantic highlight.

<em>Emphasized text</em>

<mark> – Marked text

Marked text – highlighting search results or important passages.

<mark>Marked text</mark>

<del> – Deleted text

Deleted text – indicates removed content.

<del>Deleted text</del>

<ins> – Inserted text

Inserted text – indicates added content.

<ins>Inserted text</ins>

<sup> – Superscript

Superscript2 – for footnotes or mathematical exponents.

Superscript<sup>2</sup>

<sub> – Subscript

Subscript H2O – for chemical formulas or indices.

Subscript H<sub>2</sub>O

<code> – Code example

Code example – inline code or variable names.

<code>Code example</code>

<kbd> – Keyboard input

Press Ctrl + C – for keyboard inputs.

Press <kbd>Ctrl</kbd> + <kbd>C</kbd>

<abbr> – Abbreviation

HTML – abbreviations with explanation.

<abbr title="HyperText Markup Language">HTML</abbr>

<cite> – Work title

The Great Gatsby – titles of creative works.

<cite>The Great Gatsby</cite>

<q> – Inline quote

A short quote – inline quotes with automatic quotation marks.

<q>A short quote</q>

<dfn> – Definition

Definition – the defining instance of a term.

<dfn>Definition</dfn>

<time> – Date and time

– machine-readable time values.

<time datetime="2024-12-10">December 10, 2024</time>

<blockquote> – Block quote

A longer quote presented as a standalone block. The source is often specified using the cite attribute.

https://example.com
<blockquote cite="https://example.com">
  <p>A longer quote presented as a standalone block.</p>
</blockquote>

<pre> – Preformatted text

Preformatted text
  with   spaces
    and line breaks
<pre>
Preformatted text
  with   spaces
    and line breaks
</pre>

<hr> – Horizontal rule

Thematic break or section divider.


<hr>

<address> – Contact information

Contact us:
Email: info@example.com
Phone: 012345-67890
<address>
  Contact us:<br>
  Email: <a href="mailto:info@example.com">info@example.com</a><br>
  Phone: 012345-67890
</address>

Headings

<h1> – Heading level 1

Main heading level 1

<h1>Main heading level 1</h1>

<h2> – Heading level 2

Heading level 2

<h2>Heading level 2</h2>

<h3> – Heading level 3

Heading level 3

<h3>Heading level 3</h3>

<h4> – Heading level 4

Heading level 4

<h4>Heading level 4</h4>

<h5> – Heading level 5

Heading level 5
<h5>Heading level 5</h5>

<h6> – Heading level 6

Heading level 6
<h6>Heading level 6</h6>

Lists

<ul> and <li> – Unordered list

  • List item 1
  • List item 2
  • List item 3
<ul>
  <li>List item 1</li>
  <li>List item 2</li>
  <li>List item 3</li>
</ul>

<ol> and <li> – Ordered list

  1. First step
  2. Second step
  3. Third step
<ol>
  <li>First step</li>
  <li>Second step</li>
  <li>Third step</li>
</ol>

<dl>, <dt> and <dd> – Description list

Term
Definition of the term
Another term
Another definition
<dl>
  <dt>Term</dt>
  <dd>Definition of the term</dd>
  <dt>Another term</dt>
  <dd>Another definition</dd>
</dl>

<a> – Link

A link – hyperlink to another page.

<a href="https://example.com">A link</a>

<nav> – Navigation

<nav>
  <ul>
    <li><a href="#home">Home</a></li>
    <li><a href="#about">About</a></li>
    <li><a href="#contact">Contact</a></li>
  </ul>
</nav>

Media

<img> – Image

<img src="demo.jpg" alt="Example image" width="300" height="200">

<figure> and <figcaption> – Figure with caption

A beautiful autumn landscape
<figure>
  <img src="demo.jpg" alt="Landscape photo">
  <figcaption>A beautiful autumn landscape</figcaption>
</figure>

<picture> and <source> – Responsive image

Responsive image
<picture>
  <source srcset="image-large.jpg" media="(min-width: 800px)">
  <source srcset="image-medium.jpg" media="(min-width: 400px)">
  <img src="image-small.jpg" alt="Responsive image">
</picture>

<audio> and <source> – Audio

<audio controls>
  <source src="audio.mp3" type="audio/mpeg">
  <source src="audio.ogg" type="audio/ogg">
  Your browser does not support audio.
</audio>

<video>, <source> and <track> – Video

<video controls width="320" height="240">
  <source src="video.mp4" type="video/mp4">
  <source src="video.webm" type="video/webm">
  <track kind="subtitles" src="subtitles-en.vtt" srclang="en" label="English">
  Your browser does not support video.
</video>

Tables

<table> – Table

Column 1Column 2
Data 1Data 2
Data 3Data 4
<table>
  <thead>
    <tr>
      <th>Column 1</th>
      <th>Column 2</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Data 1</td>
      <td>Data 2</td>
    </tr>
  </tbody>
</table>

<colgroup> and <col> – Column formatting

ABC
123
<table>
  <colgroup>
    <col style="background-color: #f0f0f0;">
    <col span="2" style="background-color: #e0e0e0;">
  </colgroup>
  <tr><td>A</td><td>B</td><td>C</td></tr>
</table>

Forms

<form> – Form

Form
<form action="/submit" method="post">
  Form
</form>

<label> – Label

<label for="email">Email address:</label>
<input type="email" id="email" name="email">

<input> – Input field

<input type="text" name="username" placeholder="Username">

<textarea> – Multi-line text field

<textarea name="message" rows="4" cols="50" placeholder="Your message"></textarea>

<button> – Button

<button type="button">Click me</button>

<input type=”checkbox”> – Checkbox

<label>
  <input type="checkbox" name="newsletter" value="yes">
  Subscribe to newsletter
</label>

<input type=”radio”> – Radio button

<label>
  <input type="radio" name="title" value="ms">
  Ms
</label>
<label>
  <input type="radio" name="title" value="mr">
  Mr
</label>
<label>
  <input type="radio" name="title" value="other">
  Other
</label>

<select> and <option> – Select menu

<select name="country">
  <option value="de">Germany</option>
  <option value="at">Austria</option>
  <option value="ch">Switzerland</option>
</select>

<optgroup> – Option group

<select name="vehicle">
  <optgroup label="Cars">
    <option value="vw">Volkswagen</option>
    <option value="bmw">BMW</option>
  </optgroup>
  <optgroup label="Trucks">
    <option value="man">MAN</option>
    <option value="mercedes">Mercedes</option>
  </optgroup>
</select>

<fieldset> and <legend> – Form group

Personal information
<fieldset>
  <legend>Personal information</legend>
  <label>First name: <input type="text" name="firstname"></label><br>
  <label>Last name: <input type="text" name="lastname"></label>
</fieldset>

<datalist> – Autocomplete

<input list="browser" name="browser" placeholder="Choose a browser">
<datalist id="browser">
  <option value="Chrome">
  <option value="Firefox">
  <option value="Safari">
</datalist>

<progress> – Progress bar

70%
<progress value="70" max="100">70%</progress>

Interactive Elements

<details> and <summary> – Expandable content

Show more information

Here are the additional details that are initially hidden.

<details>
  <summary>Show more information</summary>
  <p>Here are the additional details that are initially hidden.</p>
</details>

<dialog> – Dialog window

This is a modal dialog window.

<dialog open>
  <p>This is a dialog window.</p>
  <button>Close</button>
</dialog>
Back to top