Skip to main content

An official website of the United States government

Here's how you know

An official website of the United States government

Here's how you know

Theme:

Design system switcher

Version:

Design system switcher

Theme:

Design system switcher

Version:

Design system switcher

Headings

Headings help to provide a quick, organized way to organize the main sections of a website.

Heading font family

Core uses Open Sans for all headings.

The design system doesn't style base HTML typography elements (like h1, h2, p, etc.) unless they're inside an element with the ds-content class. Instead, it provides heading classes (available on this page) corresponding to visual sizes. These classes can be applied to any heading elements, irrespective of their semantic heading level (h1 to h6). This approach allows teams to first choose the semantic heading level that make the most sense for the document and its accessibility and then choose a visual heading size class that fits the page's visual hierarchy.

Responsive typography

.ds-text-heading-5xl, ds-text-heading-4xl, and ds-text-heading-3xl classes are responsive by default.

To apply responsive typography elsewhere, use the font size utility class. Since the base typography margins and line height is measured in em units, they'll automatically adjust as you change the font size.

All / Small breakpoints
CSS classFigma tokenExample
ds-text-heading--smHeadings/SmallTuscaloosa
ds-text-heading--mdHeadings/MediumTuscaloosa
ds-text-heading--lgHeadings/LargeTuscaloosa
ds-text-heading--xlHeadings/XLTuscaloosa
ds-text-heading--2xlHeadings/2xl/2xlTuscaloosa
ds-text-heading--3xlHeadings/3xl/3xl - MD-SMTuscaloosa
ds-text-heading--4xlHeadings/4xl/4xl - MD-SMTuscaloosa
ds-text-heading--5xlHeadings/5xl/5xl - SMTuscaloosa
Medium breakpoints
CSS classFigma tokenExample
ds-text-heading--3xlHeadings/3xl/3xl - MD-SMTuscaloosa
ds-text-heading--4xlHeadings/4xl/4xl - MD-SMTuscaloosa
ds-text-heading--5xlHeadings/5xl/5xl - MDTuscaloosa
Large breakpoints and up
CSS classFigma tokenExample
ds-text-heading--3xlHeadings/3xl/3xl - LGTuscaloosa
ds-text-heading--4xlHeadings/4xl/4xl - LGTuscaloosa
ds-text-heading--5xlHeadings/5xl/5xl - LGTuscaloosa
CSS Class545px and below545px to 768px768px and above
.ds-text-heading-5xl36px48px60px
.ds-text-heading-4xl36px36px48px
.ds-text-heading-3xl30px30px36px
Scale: 0.22

Links nested within elements styled with heading tags, or styled directly as headings, will render as links in the appropriate size and weight. There is no additional CSS class to apply, but Figma contains tokens specific to rendering links. Medium breakpoints are given as an example below.

Please note that in Figma, the color token is separate from the font token and needs to be applied independently.

All / Small breakpoints as links
CSS classFigma tokenExample
ds-text-heading--smLinks/Headings/SmallTuscaloosa
ds-text-heading--mdLinks/Headings/MediumTuscaloosa
ds-text-heading--lgLinks/Headings/LargeTuscaloosa
ds-text-heading--xlLinks/Headings/XLTuscaloosa
ds-text-heading--2xlLinks/Headings/2xl/2xlTuscaloosa
ds-text-heading--3xlLinks/Headings/3xl/3xl - MD-SMTuscaloosa
ds-text-heading--4xlLinks/Headings/4xl/4xl - MD-SMTuscaloosa
ds-text-heading--5xlLinks/Headings/5xl/5xl - SMTuscaloosa
Medium breakpoints as links
CSS classFigma tokenExample
ds-text-heading--3xlLinks/Headings/3xl/3xl - MD-SMTuscaloosa
ds-text-heading--4xlLinks/Headings/4xl/4xl - MD-SMTuscaloosa
ds-text-heading--5xlLinks/Headings/5xl/5xl - MDTuscaloosa
Large breakpoints and up as links
CSS classFigma tokenExample
ds-text-heading--3xlLinks/Headings/3xl/3xl - LGTuscaloosa
ds-text-heading--4xlLinks/Headings/4xl/4xl - LGTuscaloosa
ds-text-heading--5xlLinks/Headings/5xl/5xl - LGTuscaloosa

Specific examples

On dark background

Example heading on dark background

Example link heading on dark background

Eyebrow/Eyelash header

In some cases, it is better to group header elements into a header component. This can be referred to as the Eyelash/Eyebrow header where you have the main header and an optional top header (eyebrow) or bottom header (eyelash) header.

This is an optional header design.

Example eyebrow header

Example main header

Example eyelash header

Code

Style customization

The following CSS variables can be overridden to change the type sizes:

  • --font-size-5xl
  • --font-size-4xl
  • --font-size-3xl
  • --font-size-2xl
  • --font-size-xl
  • --font-size-lg
  • --font-size-md, uses --font-size-base
  • --font-size-sm

Guidance

The ds-content class

For pages that are mainly about written content or places where you want to use a standard mapping of heading-level styles to semantic heading levels, consider using the ds-content class.

Layout dos and don'ts

There should always be a parent/child relationship between headers and content on the page. Every header should have a relationship to something else on the page. This can apply to many different relationships like a header and a form group or a header and list of links. Stray headers or content should be reevaluated.

  • Paragraph styles should never be used as a parent to another text element.
  • Header elements should never have equal or smaller font size than the paragraph element.
  • Not all paragraphs need a header, but all headers need children.
  • Every page should have one heading 1 (H1)
  • Headings style appearing under H1 should follow a logical order for information design and supporting various assistive technology devices/software.
  • Don't use a smaller header font size than the body font size
  • Don't use stray headers