# Headings Headings help to provide a quick, organized way to organize the main sections of a website. ## Heading font family **Theme: core only** Core uses Open Sans for all headings. **Theme: cmsgov only** CMS.gov uses Lexend for all headings. **Theme: healthcare only** Healthcare.gov uses Open Sans for all headings. **Theme: medicare only** Medicare.gov uses Montserrat 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](/foundation/typography/content). 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](/utilities/font/font-size/#responsive-font-sizes). Since the base typography margins and line height is measured in `em` units, they'll automatically adjust as you change the font size. | CSS Class | 545px and below | 545px to 768px | 768px and above | | ---------------------- | --------------- | -------------- | --------------- | | `.ds-text-heading-5xl` | 36px | 48px | 60px | | `.ds-text-heading-4xl` | 36px | 36px | 48px | | `.ds-text-heading-3xl` | 30px | 30px | 36px | ## Headings Links 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. ## Specific examples ### On dark background

Example heading on dark background

Example link heading on dark background

**Theme: medicare only** ### Custom heading styles #### Teal heading Only used for landing pages and marketing material to apply emphasis to words within a header.

Example teal heading

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

```html

I'm the first child of my parent.

I'm not the first child of my parent

I'm actually the first child of my parent even though I'm not the first heading on the page

I'm the last child of my parent

I'm also the last child of my parent

``` ### 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`](/foundation/typography/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