Typography
Typography is a set of UI elements that structure and style text content, including headings, display text, body text, labels, and code, used to establish visual hierarchy and ensure consistent, accessible reading across OUDS Web.
On this page
- Heading v1.1.0
- Display v1.0.0
- Body v1.0.0
- Label v1.0.0
- Code v1.0.0
Overview
Component types
Display
Display is a UI element that styles typography for impactful content like landing pages, marketing campaigns, and key messages.Heading
Heading is a UI element that styles typography to structure content and define the hierarchy of information within an interface.Body
Body is a UI element that styles typography for common text content like paragraphs, descriptions, and informational messages.Label
Label is a UI element that styles typography for compact interface components such as buttons, form fields, badges, and other small elements.CodeCode is a UI element that styles typography for technical content like code snippets, commands, system values, and identifiers.
Approach
Typography elements are provided as components that include the font-family, font-size, line-height, letter-spacing, max-width, and for some of them, font-weight. However, certain elements can be modified using our utilities. Take a look at our font weight utilities, icon sizing utilities, color utilities, and the .mw-none class in width utilities.
Accessibility
To ensure accessibility, make sure you choose the HTML tags you use, based on their semantic meaning; whether it is a heading, plain text, or a snippet of code, you should not use the same tag, regardless of how it appears on screen. Each tag conveys its own semantic meaning, which is communicated to screen readers.
Display
Display is a UI element that styles typography for impactful content like landing pages, marketing campaigns, and key messages.
The display features large type sizes that capture attention and create strong visual emphasis. Variants automatically adjust across breakpoints to maintain a consistent visual hierarchy on all screen sizes. Use it sparingly to preserve its impact and effectiveness.
Display has three size levels: large, medium, and small. Each one sets font-size, and also line-height, letter-spacing, font-weight: bold, and max-width. Display uses the OUDS Web font stack.
Please note that:
- You have to use the appropriate HTML tag to convey the right semantic meaning.
- The
.display-*classes are equivalent to the font size text utilities.fs-dl,.fs-dm, and.fs-ds, except for thefont-weight. - If you want to get rid of the
max-width, please use our.mw-nonewidth utility. - You should not use any icon with our
.display-*font sizes, because we prefer to keep the place for the text.
Here are the associated font-sizes depending on the breakpoints:
| Display reference | Font size from 2xs to sm | Font size from md to lg | Font size for xl and upper |
|---|---|---|---|
Display large (.display-large) | 2.5rem (40px) | 4rem (64px) | 4.5rem (72px) |
Display medium (.display-medium) | 2.25rem (36px) | 3rem (48px) | 3.5rem (56px) |
Display small (.display-small) | 2rem (32px) | 2.5rem (40px) | 3rem (48px) |
See more details about the display classes
| Display reference | Font size from 2xs to sm | Font size from md to lg | Font size for xl and upper |
|---|---|---|---|
Display large (.display-large) |
|
|
|
Display medium (.display-medium) |
|
|
|
Display small (.display-small) |
|
|
|
Display large
Display medium
Display small
<h1 class="display-large">Display large</h1>
<h1 class="display-medium">Display medium</h1>
<h1 class="display-small">Display small</h1>
Heading
Heading is a UI element that styles typography to structure content and define the hierarchy of information within an interface.
The heading features multiple sizes options, to help users quickly understand the organization of a page or section. Variants automatically adjust across breakpoints to ensure optimal readability on all devices. Heading serve as the primary entry point for visual navigation.
All HTML headings, <h1> through <h6>, are available. Each one sets font-size, and also line-height, letter-spacing, font-weight: bold, and max-width. .h1 through .h6 classes are also available, for when you want to match the font styling of a heading but cannot use the associated HTML element. Heading uses the OUDS Web font stack.
Please note that:
- You have to use the appropriate HTML tag to convey the right semantic meaning. A heading tag meaning is not reflected by the corresponding class on a
<p>tag. - The heading tags and classes are equivalent to the font size text utilities
.fs-hxl,.fs-hl,.fs-hm,.fs-hs,.fs-bl, and.fs-bm, except for thefont-weight. - If you want to get rid of the
max-width, please use our.mw-nonewidth utility. - If you want to get rid of the
margin-bottom, please use our.mb-nonespacing utility. - You can easily add an icon with your headings using our heading icon size utilities.
Here are the associated font-sizes depending on the breakpoints:
| Heading reference | Font size from 2xs to sm | Font size from md to lg | Font size for xl and upper |
|---|---|---|---|
Heading xlarge (<h1> or .h1) | 1.75rem (28px) | 2.25rem (36px) | 2.5rem (40px) |
Heading large (<h2> or .h2) | 1.5rem (24px) | 1.75rem (28px) | 2rem (32px) |
Heading medium (<h3> or .h3) | 1.25rem (20px) | 1.5rem (24px) | 1.75rem (28px) |
Heading small (<h4> or .h4) | 1.125rem (18px) | 1.25rem (20px) | 1.5rem (24px) |
Heading 5 (<h5> or .h5) | 1rem (16px) | 1rem (16px) | 1.125rem (18px) |
Heading 6 (<h6> or .h6) | 0.875rem (14px) | 0.875rem (14px) | 1rem (16px) |
See more details about the heading classes
| Heading reference | Font size from 2xs to sm | Font size from md to lg | Font size for xl and upper |
|---|---|---|---|
Heading xlarge (<h1> or .h1) |
|
|
|
Heading large (<h2> or .h2) |
|
|
|
Heading medium (<h3> or .h3) |
|
|
|
Heading small (<h4> or .h4) |
|
|
|
Heading 5 (<h5> or .h5) |
|
|
|
Heading 6 (<h6> or .h6) |
|
|
|
h1. OUDS Web heading
h2. OUDS Web heading
h3. OUDS Web heading
h4. OUDS Web heading
h5. OUDS Web heading
h6. OUDS Web heading
<h1>h1. OUDS Web heading</h1>
<h2>h2. OUDS Web heading</h2>
<h3>h3. OUDS Web heading</h3>
<h4>h4. OUDS Web heading</h4>
<h5>h5. OUDS Web heading</h5>
<h6>h6. OUDS Web heading</h6>
h2. OUDS Web heading looking like h1
h3. OUDS Web heading looking like h2
h2. OUDS Web heading looking like h3
h2. OUDS Web heading looking like h4
h2. OUDS Web heading looking like h5
h2. OUDS Web heading looking like h6
<h2 class="h1">h2. OUDS Web heading looking like h1</h2>
<h3 class="h2">h3. OUDS Web heading looking like h2</h3>
<h2 class="h3">h2. OUDS Web heading looking like h3</h2>
<h2 class="h4">h2. OUDS Web heading looking like h4</h2>
<h2 class="h5">h2. OUDS Web heading looking like h5</h2>
<h2 class="h6">h2. OUDS Web heading looking like h6</h2>
Body
Body is a UI element that styles typography for common text content like paragraphs, descriptions, and informational messages.
The body features multiple size options, to allow content importance to be expressed while maintaining consistency. Variants automatically adjust across breakpoints to ensure optimal readability on all devices. Body prioritize readability and provide a comfortable reading experience.
Body text has three size levels: large (for emphasis), medium (default), and small (for supporting information). Each one sets font-size, line-height, letter-spacing, and max-width. Body has a font-weight: normal by default and it uses the OUDS Web font stack.
Please note that:
- You have to use the appropriate HTML tag to convey the right semantic meaning, generally a
<p>. - The
.lead,<p>and.smallor<small>texts are equivalent to the font size text utilities.fs-bl,.fs-bm, and.fs-bs. - You can use other font weights as needed through our font weight utilities.
- If you want to get rid of the
max-width, please use our.mw-nonewidth utility. - If you want to get rid of the
margin-bottomapplied on<p>elements, please use our.mb-nonespacing utility. - You can easily add an icon with your body texts using our body text icon size utilities.
Here are the associated font-sizes depending on the breakpoints:
| Body reference | Font size from 2xs to sm | Font size from md to lg | Font size for xl and upper |
|---|---|---|---|
Body large (.lead or .fs-bl) | 1rem (16px) | 1rem (16px) | 1.125rem (18px) |
Body medium (default <p> or .fs-bm) | 0.875rem (14px) | 0.875rem (14px) | 1rem (16px) |
Body small (.small, <small> or .fs-bs) | 0.75rem (12px) | 0.75rem (12px) | 0.875rem (14px) |
See more details about the body classes
| Body reference | Font size from 2xs to sm | Font size from md to lg | Font size for xl and upper |
|---|---|---|---|
Body large (.lead or .fs-bl) |
|
|
|
Body medium (default <p> or .fs-bm) |
|
|
|
Body small (.small or <small> or .fs-bs) |
|
|
|
This is a body large paragraph. It stands out from regular paragraphs.
This is another body large paragraph.
This is a regular body medium paragraph.
This is a body small paragraph.
This is another body small paragraph.
<p class="lead">
This is a body large paragraph. It stands out from regular paragraphs.
</p>
<p class="fs-bl">
This is another body large paragraph.
</p>
<p>This is a regular body medium paragraph.</p>
<p class="small">This is a body small paragraph.</p>
<p><small>This is another body small paragraph.</small></p>
Label
Label is a UI element that styles typography for compact interface components such as buttons, form fields, badges, and other small elements.
The label is non-responsive and maintains a fixed size across all breakpoints. This ensures visual consistency and predictable behavior within space-constrained UI elements. Labels are preferred when content is displayed within small components.
Labels have four size levels: xlarge, large, medium, and small. Each one sets font-size, line-height, letter-spacing, and max-width. Label uses the OUDS Web font stack.
Please note that:
- You have to use the appropriate HTML tag to convey the right semantic meaning, generally a
<p>. - You can use other font weights as needed through our font weight utilities.
- If you want to get rid of the
max-width, please use our.mw-nonewidth utility.
Here are the associated font-sizes:
| Label reference | Font size |
|---|---|
Label xlarge (.fs-lxl) | 1.125rem (18px) |
Label large (.fs-ll) | 1rem (16px) |
Label medium (default .fs-lm) | 0.875rem (14px) |
Label small (.fs-ls) | 0.75rem (12px) |
See more details about the label classes
| Label reference | Font size from 2xs to sm | Font size from md to lg | Font size for xl and upper |
|---|---|---|---|
Label xlarge (.fs-lxl) |
|
|
|
Label large (.fs-ll) |
|
|
|
Label medium (.fs-lm) |
|
|
|
Label small (.fs-ls) |
|
|
|
Label xlarge text
Label large text
Label medium text
Label small text
<p class="fs-lxl">Label xlarge text</p>
<p class="fs-ll">Label large text</p>
<p class="fs-lm">Label medium text</p>
<p class="fs-ls">Label small text</p>
Code
Code element is a UI element that styles typography for technical content like code snippets, commands, system values, and identifiers.
The code employs a monospace typeface to maintain character alignment and enhance the readability of structured content. Offered in one size, it ensures a uniform presentation of technical information across the product. Its application should be restricted to content that necessitates a precise code-like representation.
Use the <code> element to mark short code snippets within text. The <code> element uses the monospace code font stack and is styled to stand out from surrounding text.
<section> should be wrapped as inline.
For example, <code><section></code> should be wrapped as inline.