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.

Components design versions:

  • Heading v1.1.0
  • Display v1.0.0
  • Body v1.0.0
  • Label v1.0.0
  • Code v1.0.0

Note

You can find the OUDS design guidelines here: heading guidelines, display guidelines, body guidelines, label guidelines, code guidelines.

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.
  • Code
    Code 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 the font-weight.
  • If you want to get rid of the max-width, please use our .mw-none width 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 referenceFont size from 2xs to smFont size from md to lgFont 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 referenceFont size from 2xs to smFont size from md to lgFont size for xl and upper
Display large (.display-large)
  • font-size: 2.5rem
  • line-height: 1.2
  • letter-spacing: -0.025rem
  • max-width: 55rem
  • font-size: 4rem
  • line-height: 1.125
  • letter-spacing: -0.06rem
  • max-width: 55rem
  • font-size: 4.5rem
  • line-height: 1.1111
  • letter-spacing: -0.0675rem
  • max-width: 65rem
Display medium (.display-medium)
  • font-size: 2.25rem
  • line-height: 1.2222
  • letter-spacing: -0.0225rem
  • max-width: 55rem
  • font-size: 3rem
  • line-height: 1.1667
  • letter-spacing: -0.0375rem
  • max-width: 55rem
  • font-size: 3.5rem
  • line-height: 1.1429
  • letter-spacing: -0.04375rem
  • max-width: 65rem
Display small (.display-small)
  • font-size: 2rem
  • line-height: 1.25
  • letter-spacing: -0.02rem
  • max-width: 55rem
  • font-size: 2.5rem
  • line-height: 1.2
  • letter-spacing: -0.025rem
  • max-width: 55rem
  • font-size: 3rem
  • line-height: 1.1667
  • letter-spacing: -0.0375rem
  • max-width: 65rem

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>
html

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 the font-weight.
  • If you want to get rid of the max-width, please use our .mw-none width utility.
  • If you want to get rid of the margin-bottom, please use our .mb-none spacing 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 referenceFont size from 2xs to smFont size from md to lgFont 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 referenceFont size from 2xs to smFont size from md to lgFont size for xl and upper
Heading xlarge (<h1> or .h1)
  • font-size: 1.75rem
  • line-height: 1.2857
  • letter-spacing: -0.0175rem
  • max-width: 45rem
  • font-size: 2.25rem
  • line-height: 1.2222
  • letter-spacing: -0.0225rem
  • max-width: 55rem
  • font-size: 2.5rem
  • line-height: 1.2
  • letter-spacing: -0.025rem
  • max-width: 65rem
Heading large (<h2> or .h2)
  • font-size: 1.5rem
  • line-height: 1.3333
  • letter-spacing: -0.0075rem
  • max-width: 45rem
  • font-size: 1.75rem
  • line-height: 1.2857
  • letter-spacing: -0.0175rem
  • max-width: 55rem
  • font-size: 2rem
  • line-height: 1.25
  • letter-spacing: -0.02rem
  • max-width: 65rem
Heading medium (<h3> or .h3)
  • font-size: 1.25rem
  • line-height: 1.4
  • letter-spacing: 0rem
  • max-width: 45rem
  • font-size: 1.5rem
  • line-height: 1.3333
  • letter-spacing: -0.0075rem
  • max-width: 45rem
  • font-size: 1.75rem
  • line-height: 1.2857
  • letter-spacing: -0.0175rem
  • max-width: 55rem
Heading small (<h4> or .h4)
  • font-size: 1.125rem
  • line-height: 1.3333
  • letter-spacing: 0.01125rem
  • max-width: 40rem
  • font-size: 1.25rem
  • line-height: 1.4
  • letter-spacing: 0rem
  • max-width: 45rem
  • font-size: 1.5rem
  • line-height: 1.3333
  • letter-spacing: -0.0075rem
  • max-width: 55rem
Heading 5 (<h5> or .h5)
  • font-size: 1rem
  • line-height: 1.5
  • letter-spacing: 0.0125rem
  • max-width: 40rem
  • font-size: 1rem
  • line-height: 1.5
  • letter-spacing: 0.0125rem
  • max-width: 40rem
  • font-size: 1.125rem
  • line-height: 1.3333
  • letter-spacing: 0.01125rem
  • max-width: 45rem
Heading 6 (<h6> or .h6)
  • font-size: 0.875rem
  • line-height: 1.4286
  • letter-spacing: 0.010625rem
  • max-width: 40rem
  • font-size: 0.875rem
  • line-height: 1.4286
  • letter-spacing: 0.010625rem
  • max-width: 40rem
  • font-size: 1rem
  • line-height: 1.5
  • letter-spacing: 0.0125rem
  • max-width: 45rem

Note

Heading 5 and heading 6 references do not exist in the brand guidelines; they are included here for consistency and continuity of HTML pages.

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>
html

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>
html

Heading with marker

A brand-colored marker can be displayed below the heading large (<h2> or .h2), to enhance its visual emphasis and reinforce information hierarchy, by adding the .hl-marker class.

h2. OUDS Web heading with marker

h3. OUDS Web heading looking like h2 with marker

<h2 class="hl-marker">h2. OUDS Web heading with marker</h2>

<h3 class="h2 hl-marker">h3. OUDS Web heading looking like h2 with marker</h3>
html

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 .small or <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-none width utility.
  • If you want to get rid of the margin-bottom applied on <p> elements, please use our .mb-none spacing utility.
  • You can easily add an icon with your body texts using our body text icon size utilities.

Note

By default, body medium is set on the :root element, and the max-width property is applied to <p> elements.

Here are the associated font-sizes depending on the breakpoints:

Body referenceFont size from 2xs to smFont size from md to lgFont 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 referenceFont size from 2xs to smFont size from md to lgFont size for xl and upper
Body large (.lead or .fs-bl)
  • font-size: 1rem
  • line-height: 1.5
  • letter-spacing: 0.0125rem
  • max-width: 40rem
  • font-size: 1rem
  • line-height: 1.5
  • letter-spacing: 0.0125rem
  • max-width: 40rem
  • font-size: 1.125rem
  • line-height: 1.3333
  • letter-spacing: 0.01125rem
  • max-width: 45rem
Body medium (default <p> or .fs-bm)
  • font-size: 0.875rem
  • line-height: 1.4286
  • letter-spacing: 0.010625rem
  • max-width: 40rem
  • font-size: 0.875rem
  • line-height: 1.4286
  • letter-spacing: 0.010625rem
  • max-width: 40rem
  • font-size: 1rem
  • line-height: 1.5
  • letter-spacing: 0.0125rem
  • max-width: 45rem
Body small (.small or <small> or .fs-bs)
  • font-size: 0.75rem
  • line-height: 1.3333
  • letter-spacing: 0.01125rem
  • max-width: 40rem
  • font-size: 0.75rem
  • line-height: 1.3333
  • letter-spacing: 0.01125rem
  • max-width: 40rem
  • font-size: 0.875rem
  • line-height: 1.4286
  • letter-spacing: 0.010625rem
  • max-width: 40rem

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>
html

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-none width utility.

Here are the associated font-sizes:

Label referenceFont 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 referenceFont size from 2xs to smFont size from md to lgFont size for xl and upper
Label xlarge (.fs-lxl)
  • font-size: 1.125rem
  • line-height: 1.3333
  • letter-spacing: 0.01125rem
  • max-width: 40rem
  • font-size: 1.125rem
  • line-height: 1.3333
  • letter-spacing: 0.01125rem
  • max-width: 40rem
  • font-size: 1.125rem
  • line-height: 1.3333
  • letter-spacing: 0.01125rem
  • max-width: 45rem
Label large (.fs-ll)
  • font-size: 1rem
  • line-height: 1.5
  • letter-spacing: 0.0125rem
  • max-width: 40rem
  • font-size: 1rem
  • line-height: 1.5
  • letter-spacing: 0.0125rem
  • max-width: 40rem
  • font-size: 1rem
  • line-height: 1.5
  • letter-spacing: 0.0125rem
  • max-width: 45rem
Label medium (.fs-lm)
  • font-size: 0.875rem
  • line-height: 1.4286
  • letter-spacing: 0.010625rem
  • max-width: 40rem
  • font-size: 0.875rem
  • line-height: 1.4286
  • letter-spacing: 0.010625rem
  • max-width: 40rem
  • font-size: 0.875rem
  • line-height: 1.4286
  • letter-spacing: 0.010625rem
  • max-width: 40rem
Label small (.fs-ls)
  • font-size: 0.75rem
  • line-height: 1.3333
  • letter-spacing: 0.01125rem
  • max-width: 40rem
  • font-size: 0.75rem
  • line-height: 1.3333
  • letter-spacing: 0.01125rem
  • max-width: 40rem
  • font-size: 0.75rem
  • line-height: 1.3333
  • letter-spacing: 0.01125rem
  • max-width: 40rem

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>
html

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.

For example, <section> should be wrapped as inline.
For example, <code>&lt;section&gt;</code> should be wrapped as inline.
html