Style fontSize Property
Style fontSize Property
The fontSize property is used to either set or return the font size of the text.
Syntax:-
Its syntax is:- object.style.fontSize OR object.style.fontSize = value|initial|inherit
Return:-
Its return is:- string having font size of the text in the element
Further Explanation:-
Value | Description |
---|---|
xx-small x-small small medium large x-large xx-large |
Sets size of font to different fixed sizes. |
smaller | Decreases font-size by one relative unit. |
larger | Increases font-size by one relative unit. |
length | Defines font-size in length units. |
% | Sets font-size to a % of parent element font size |
initial | Sets property to its default value. |
inherit | Inherits property from its parent element. |