Menu Home

font-size

osbo.com | CSS | Properties | font-size

The font-size CSS property indicates the desired height of glyphs from the font.

Syntax

CSS

font-size: value;

JS

object.style.fontSize = "value";

Values

<'font-size'> = <absolute-size> | <relative-size> | <length-percentage>
<absolute-size> = [ xx-small | x-small | small | medium | large | x-large | xx-large ]
<relative-size> = [ larger | smaller ]
<length-percentage> = [ <length> | <percentage> ]
<length>

Specifies the length using a number followed by a unit of measurement.

<percentage>

Specifies the percentage using a number followed by a percent sign (%).

Initial

medium

Examples

absolute-size

length

percentage

relative-size

JS

Internal

font

font-family

font-stretch

font-style

font-variant

font-weight

line-height

External

World Wide Web Consortium (W3C)