--- url: "https://www.w3.org/WAI/WCAG22/Techniques/css/C14" titulek: "C14: Using em units for font sizes | WAI | W3C" h1: "Technique C14:Using em units for font sizes" popis: "" jazyk: "en" kanonicka: "" drobecky: [] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-14 04:44:20" znaku: 2267 slov: 325 kodovani: "utf-8" sha256: "f69da1feebe4e6abac267836cde1ca8dc1e3bf20099e5d9c9faec2ead2c00f6b" --- # Technique C14:Using `em` units for font sizes ## About this Technique This technique relates to: - [1.4.4 Resize Text](https://www.w3.org/WAI/WCAG22/Understanding/resize-text) ( **Sufficient** when used for techniques for relative measurements) - [1.4.5 Images of Text](https://www.w3.org/WAI/WCAG22/Understanding/images-of-text) ( **Advisory** ) - [1.4.8 Visual Presentation](https://www.w3.org/WAI/WCAG22/Understanding/visual-presentation) ( **Sufficient** when used with [G146: Using liquid layout](../general/G146) ) - [1.4.9 Images of Text (No Exception)](https://www.w3.org/WAI/WCAG22/Understanding/images-of-text-no-exception) ( **Advisory** ) This technique applies to CSS. Techniques are examples of ways to meet Web Content Accessibility Guidelines (WCAG). They are **not required** to meet WCAG. Content can satisfy the normative requirements of WCAG even if it does not use any of the documented techniques. See [About WCAG Techniques](https://www.w3.org/WAI/WCAG22/Techniques/about). ## Description The objective of this technique is to specify text font size in `em` units so that user agents can scale content effectively. Since the `em` is a property of the font, it scales as the font changes size. If a `font-size` is specified for the `body` element, all other elements inherit that value, unless overridden by a more specific selector. ## Examples ### Example 1: `em` font sizes in CSS This example defines the font size for strong element so that its text will always be larger than the surrounding text, in whatever context it is used. Assuming that headings and paragraphs use different font sizes, the strong words in this example will each be larger than their surrounding text. ``` ...
Since only the user can know what size text works for them, it is very important to let them configure the text size.
… ``` ## Related Resources *No endorsement implied.* - [CSS Fonts Module Level 3](https://www.w3.org/TR/css-fonts-3/) . - [CSS 3 `font-size` Property](https://www.w3.org/TR/css-fonts-3/#font-size-prop) . ## Tests ### Procedure 1. Check that the value of the CSS property that defines the font size is expressed in em units. ### Expected Results - Check #1 is true Back to Top