# Text Spacing: Room to Adjust Lines and Letters

Source: https://allyway.ai/glossary/text-spacing

Text Spacing is WCAG success criterion 1.4.12. When users set line height to 1.5, paragraph spacing to 2, letter spacing to 0.12 and word spacing to 0.16 times the font size, no content or functionality may be lost.

Text Spacing is the WCAG rule that a page must keep working when visitors increase the space between lines, paragraphs, letters and words. Many people with [dyslexia](https://allyway.ai/glossary/dyslexia) or low vision read faster with more white space and apply it with a browser extension or their own stylesheet. The website does not have to use these values – it only must not break when someone else does.

## What it means

[WCAG 1.4.12 Text Spacing](https://www.w3.org/WAI/WCAG22/Understanding/text-spacing.html) is a Level AA criterion of [WCAG 2.2](https://allyway.ai/regulations/wcag-2-2). In content built with markup languages that support these properties, no loss of content or functionality may occur when the user sets all of the following – and nothing else:

| Property | Minimum value | At a 16 px font |
|---|---|---|
| Line height (line spacing) | 1.5 × font size | 24 px |
| Spacing after paragraphs | 2 × font size | 32 px |
| Letter spacing (tracking) | 0.12 × font size | 1.92 px |
| Word spacing | 0.16 × font size | 2.56 px |

**Exception:** languages and scripts that do not use one or more of these properties may conform using only the ones that apply to them.

W3C stresses that these values are a minimum baseline for users, not a design rule for authors. Typical failures (F104) are text that is clipped by a box with a fixed height, text that overlaps the next element, and buttons whose label no longer fits.

> **Note:** > **Inline `!important` blocks users**
> A user stylesheet cannot override a `style="letter-spacing: 0 !important"` written into the HTML. W3C's ACT rules (for example [important letter spacing in style attributes](https://www.w3.org/WAI/standards-guidelines/act/rules/24afc2/)) flag important letter spacing, word spacing and line height in style attributes when they are below the 1.4.12 values.

Text spacing goes hand in hand with [resize text](https://allyway.ai/glossary/resize-text) and [reflow](https://allyway.ai/glossary/reflow): all three check whether a layout survives the adjustments people with low vision really make.

## Examples

```html title="Example"
<style>
  /* Good: boxes grow with their text */
  .card { min-height: 10rem; padding: 1rem; }
  .button { padding: 0.5em 1em; white-space: normal; }

  /* Bad: fixed height and hidden overflow cut off spaced-out text */
  .card-title { height: 48px; overflow: hidden; }
</style>

<!-- Bad: inline !important users cannot override -->
<p style="line-height: 1.1 !important; letter-spacing: -0.02em !important">
  Free shipping on all orders
</p>

<!-- Good: spacing set in the stylesheet, without !important -->
<p class="promo">Free shipping on all orders</p>
```

**Do:** Do

Let containers size themselves to their content (`min-height`, padding, flexible widths), allow labels to wrap onto a second line, set spacing in stylesheets instead of inline styles and leave room in navigation bars, tabs and badges (W3C techniques C36 and C35).

**Don't:** Don't

Give text boxes a fixed `height` with `overflow: hidden`, force buttons onto one line with `white-space: nowrap` in a tight space, or use `!important` on spacing in `style` attributes.

## How to check text spacing



## Questions

Q: What are the WCAG text spacing values?
A: Line height 1.5 times the font size, spacing after paragraphs 2 times, letter spacing 0.12 times and word spacing 0.16 times the font size. Users must be able to apply all four at once without losing content.

Q: Do I have to use 1.5 line height on my website?
A: No. WCAG 1.4.12 does not set your design values. It only requires that the page still works when users increase spacing to these values themselves.

Q: Why does inline !important fail text spacing?
A: An `!important` declaration in a `style` attribute wins over user stylesheets, so visitors cannot add the spacing they need. Move spacing into your stylesheet and drop the `!important`.

Q: Who benefits from more text spacing?
A: W3C names people with low vision, people with dyslexia who read faster with more spacing, and people with cognitive disabilities who find it easier to tell blocks of text apart.
