Typography
µTypography covers native HTML typographic elements styled by µCSS. No additional CSS file is needed: headings, paragraphs, lists, quotes, code and inline semantic elements are styled automatically.
Headings
The six HTML heading levels are styled with progressive sizes and weights.
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
Heading group
The <hgroup> element allows associating a main heading with a subtitle or tagline.
Main heading
Subtitle or tagline below the heading.
<hgroup>
<h2>Main heading</h2>
<p>Subtitle or tagline below the heading.</p>
</hgroup>
The paragraph inside <hgroup> is displayed in a muted style (secondary color, reduced size).
Paragraphs
Paragraphs use the default µCSS style with harmonious vertical spacing.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.</p>
<p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
dolore eu fugiat nulla pariatur.</p>
Blockquotes
The <blockquote> element displays a quote with a distinct visual style (side border, indentation). A <footer> with <cite> allows attributing the source.
"Design is not just what it looks like and feels like. Design is how it works."
<blockquote>
"Design is not just what it looks like and feels like. Design is how it works."
<footer><cite>Steve Jobs</cite></footer>
</blockquote>
Lists
Unordered list
- First item
- Second item
- Nested item A
- Nested item B
- Third item
<ul>
<li>First item</li>
<li>Second item
<ul>
<li>Nested item A</li>
<li>Nested item B</li>
</ul>
</li>
<li>Third item</li>
</ul>
Ordered list
- Step one
- Step two
- Step three
<ol>
<li>Step one</li>
<li>Step two</li>
<li>Step three</li>
</ol>
Definition 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>
Inline semantic text
µCSS automatically styles inline semantic elements:
| Element | Rendering | Usage |
|---|---|---|
<strong> |
Bold | Strong importance |
<em> |
Italic | Emphasis |
<u> |
Underlined | Annotation |
<small> |
Small text | Legal mentions, notes |
<del> |
Deleted text | |
<ins> |
Underlined | Inserted text |
<abbr> |
Dotted | Abbreviation (with title) |
<mark> |
Highlighted | Highlighted text |
<sub> |
Textsubscript | Formulas, notes |
<sup> |
Textsuperscript | References, powers |
Bold text and italic text and underlined text.
Small text and deleted text and inserted text.
CSS is an abbreviation.
Highlighted text using the mark element.
Text with subscript and superscript.
<p><strong>Bold text</strong> and <em>italic text</em> and <u>underlined text</u>.</p>
<p><small>Small text</small> and <del>deleted text</del> and <ins>inserted text</ins>.</p>
<p><abbr title="Cascading Style Sheets">CSS</abbr> is an abbreviation.</p>
<p><mark>Highlighted text</mark> using the mark element.</p>
<p>Text with <sub>subscript</sub> and <sup>superscript</sup>.</p>
Code
Inline code
The <code> element displays code in a monospace font with a slightly colored background.
Inline code element within text.
<p>Inline <code>code element</code> within text.</p>
Code block
The <pre><code> combination displays a preformatted code block with a distinct background and horizontal scrolling if needed.
<div class="container">
<h1>Hello World</h1>
<p>This is a code block.</p>
</div>
<pre><code><div class="container">
<h1>Hello World</h1>
<p>This is a code block.</p>
</div></code></pre>
Keyboard
The <kbd> element represents a key or key combination with a physical key style.
Press Ctrl + C to copy, Ctrl + V to paste.
<p>Press <kbd>Ctrl</kbd> + <kbd>C</kbd> to copy, <kbd>Ctrl</kbd> + <kbd>V</kbd> to paste.</p>
Horizontal separator
The <hr> element displays a thin line separating two content blocks.
Content above the separator.
Content below the separator.
<p>Content above the separator.</p>
<hr>
<p>Content below the separator.</p>
Figure
The <figure> element wraps content (table, image, etc.) with a caption via <figcaption>.
| Name | Value |
|---|---|
| Alpha | 100 |
<figure>
<table>
<thead><tr><th>Name</th><th>Value</th></tr></thead>
<tbody><tr><td>Alpha</td><td>100</td></tr></tbody>
</table>
<figcaption>Figure 1 — A table inside a figure element.</figcaption>
</figure>
Accessibility
- Use heading levels in hierarchical order (
h1>h2>h3...) for screen reader navigation. - The
titleattribute on<abbr>provides the full form of the abbreviation to assistive technologies. <blockquote>with<cite>allows screen readers to identify the source of a quote.- The
<mark>element is announced as "highlight" by screen readers.