# Using named font sizes

ID: C13

Technology: css

Type: Technique

## When to Use

CSS

## Description

The objective of this technique is to specify a named font size that expresses the relative font size desired. These values provide hints so that the user agent can choose a `font-size` relative to the inherited `font-size`.

## Examples

### Named font sizes in CSS

This example selects a larger font size for `strong` elements so that their text will always be larger than the surrounding text, in whatever context they are used. Assuming that headings and paragraphs use different font sizes, the emphasized words in this example will each be larger than their surrounding text.

    <style>
      strong {font-size: larger}
    </style>
    ...
    <h1>Letting the <strong>user</strong> control text size</h1>
    <p>Since only the user can know what size text works for them,
     it is <strong>very</strong> important to let them configure the text size.
    ...

## Tests

### Procedure

1. Check that the value of the CSS property that defines the font size is one of `xx-small`, `x-small`, `small`, `medium`, `large`, `x-large`, `xx-large`, `smaller`, or `larger`.

### Expected Results

- Check #1 is true

## Related Techniques

- C12
- C14

## Resources

- CSS Fonts Module Level 3.
- CSS 3 `font-size` Property.