flâneur — a map of the web's best reading

font-size - CSS: Cascading Style Sheets | MDN

developer.mozilla.org · 1,434 words · saved by 1 readers

The font-size CSS property sets the size of the font. Changing the font size also updates the sizes of the font size-relative units, such as em, ex, and so forth. The font-size property is specified in one of the following ways: Absolute-size keywords, based on the user's default font size (which is medium). Relative-size keywords. The font will be larger or smaller relative to the parent element's font size, roughly by the ratio used to separate the absolute-size keywords above. A positive value. For most font-relative units (such as em and ex), the font size is relative to the parent element's font size. For font-relative units that are root-based (such as rem), the font size is relative to the size of the font used by the (root) element. A positive value, relative to the parent element's font size. Note: To maximize accessibility, it is generally best to use values that are relative to the user's default font size. Scaling rules are applied when

font-size CSS property - CSS | MDN Skip to main content Skip to search font-size CSS property Baseline Widely available * This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015. * Some parts of this feature may have varying levels of support. Learn more See full compatibility The font-size CSS property sets the size of the font. Changing the font size also updates the sizes of the font size-relative <length> units, such as em , ex , and so forth. Try it font-size: 1.2rem; font-size: x-small; font-size: smaller; f

Explore this link on the map →

related reading