Typography
On this page
Typography system
Lato for headings and Noto Sans for body text. These fonts are part of the visual identity of the Government of Canada. Noto Sans Mono is available for code examples. Different combinations of font size, weight, and line height create a consistent typographic hierarchy. Using typography
Structure content with headings
- All headings and subheadings need a heading tag (
<h1>-<h6>). - Start main content with an
H1. Use no more than oneH1for each page. - Order heading levels numerically.
H3followsH2,H2followsH1, and so on. - Avoid skipping hierarchical heading levels.
- Match an
H1font size with anH1line height, anH2font size with anH2line height, etc. - Make each heading distinctive and make it obvious what the content is about.
Choose the font family based on content
- Only use the heading tokens for headings. Everything else can be set in text.
- Use the body font family for most purposes.
- Opt to use monospace when citing code to give specific code examples.
Keep text readable
- For font size, keep text line length below 65 characters for a comfortable, accessible reading length.
- Use the CSS unit
65ch (--gcds-text-character-limit)or lower to set the maximum width of your paragraphs.
Use font weights in a accessible way
- Limit the quantity of font weights to two or three in the same space to avoid compromising contrast.
- Use font weights to emphasize words within a table, at the start of a paragraph, or in long blocks of text when you’ve exhausted available headings and other style elements.
- Be mindful in establishing emphasis in an accessible way, as many assistive technologies ignore font weights.
Limit bold text and italics
- Use bold text sparingly, as it can create cognitive processing difficulties for sighted readers.
- Use italics when referencing a Canadian law, as in Accessible Canada Act.
- Limit your use of italics to short strings of text. Long passages in italics can create cognitive processing difficulties for sighted readers.
Choose how to apply typography
- Use CSS Shortcuts when you need to adjust the typography or presentation of your own content. CSS Shortcuts are available for properties such as font family, font size, font style, font weight, line height, and text alignment.
- If a CSS Shortcuts class does not cover your need, use a global typography token in your custom CSS.
Apply typography
Typography token reference
Heading font
| Preview | Token name | Value |
|---|---|---|
| Heading 1 | --gcds-font-h1 | 700 2.56rem/117% 'Lato', sans-serif |
| Heading 2 | --gcds-font-h2 | 700 2.44rem/123% 'Lato', sans-serif |
| Heading 3 | --gcds-font-h3 | 700 1.81rem/137% 'Lato', sans-serif |
| Heading 4 | --gcds-font-h4 | 700 1.69rem/133% 'Lato', sans-serif |
| Heading 5 | --gcds-font-h5 | 700 1.5rem/133% 'Lato', sans-serif |
| Heading 6 | --gcds-font-h6 | 700 1.38rem/145% 'Lato', sans-serif |
Text font
| Preview | Token name | Value |
|---|---|---|
| Text | --gcds-font-text | 400 1.25rem/160% 'Noto Sans', sans-serif |
| Text small | --gcds-font-text-small | 400 1.13rem/155% 'Noto Sans', sans-serif |
Font families
| Preview | Token name | Value |
|---|---|---|
| Heading | --gcds-font-families-heading | 'Lato', sans-serif |
| Text | --gcds-font-families-body | 'Noto Sans', sans-serif |
| Monospace | --gcds-font-families-monospace | 'Noto Sans Mono', monospace |
| --gcds-font-families-icons | 'gcds-icons' |
Font weights
| Preview | Token name | Value |
|---|---|---|
| Light | --gcds-font-weights-light | 300 |
| Regular | --gcds-font-weights-regular | 400 |
| Medium | --gcds-font-weights-medium | 500 |
| Semibold | --gcds-font-weights-semibold | 600 |
| Bold | --gcds-font-weights-bold | 700 |