font-size

The font-size property specifies the size of the font.

font-size: <absolute-size> | <relative-size> | <length> | <percentage> | inherit
Initial: medium
Applies To: all elements
Inherited: yes
Percentages: refer to parent element's font size
Media: visual

Values

Δ

font-size: value;
 
Value: Description:
absolute-size Index to a table of font sizes: xx-small | x-small | small | medium | large | x-large | xx-large
inherit Takes the same computed value as the property for the element's parent
length Horizontal or vertical measurements: em | ex | px | in | cm | mm | pt | pc
percentage Value relative to the inital value
relative-size Relative to the table of font sizes and the font size of the parent element: smaller | larger

DOM

Δ

[window.]document.getElementById("element-id").style.fontSize = "font-size";

Example | Values | absolute-size

Δ

Example | Values | length

Δ

Example | Values | percentage

Δ

Example | Values | relative-size

Δ

Example | DOM

Δ

References

Δ