CSS <absolute-size> Data Type
The CSS <absolute-size> data type represents a set of keyword values used to specify absolute font sizes. These keywords provide predefined font-size steps based on the browser's font-size table and the user's preferred medium font size.
Syntax
The <absolute-size> data type accepts one of eight predefined keyword values:
<absolute-size> = xx-small | x-small | small | medium | large | x-large | xx-large | xxx-large
Values
| Value | Description |
|---|---|
xx-small |
Represents the smallest absolute font-size keyword. |
x-small |
Represents a font size larger than xx-small and smaller than small. |
small |
Represents a font size smaller than medium. |
medium |
Represents the reference middle font size used by the browser. |
large |
Represents a font size larger than medium. |
x-large |
Represents a font size larger than large. |
xx-large |
Represents a font size larger than x-large. |
xxx-large |
Represents the largest absolute font-size keyword. |
How <absolute-size> Works
The absolute-size keywords correspond to entries in a font-size table maintained by the browser. The medium value is the reference middle size, while the other keywords represent progressively smaller or larger font sizes.
The exact rendered size can vary depending on the browser, font, device, and user settings. For this reason, an absolute-size keyword should not be treated as a fixed pixel measurement.
<absolute-size> Example
The following example applies each absolute-size keyword using the font-size property:
.xx-small { font-size: xx-small; }
.x-small { font-size: x-small; }
.small { font-size: small; }
.medium { font-size: medium; }
.large { font-size: large; }
.x-large { font-size: x-large; }
.xx-large { font-size: xx-large; }
.xxx-large { font-size: xxx-large; }
xx-small font size
x-small font size
small font size
medium font size
large font size
x-large font size
xx-large font size
xxx-large font size
Related CSS Properties
The <absolute-size> data type can be used with the following CSS properties:
Specifications
The <absolute-size> data type is defined in the CSS Fonts Module Level 4 .
