document.classes.fontSize
JavaScript 1.2+ Nav4+ Syntax
document.classes.className.tagName.fontSize
Description
The fontSize property specifies the size of fonts used by an element when associated with the class called className. The definition can also specify a tag or the word all for tagName. The values that can be used to set font size can divided into four categories, as shown in Table 7.12.
Category | Value |
---|---|
Absolute | xx-small |
x-small | |
small | |
medium | |
large | |
x-large | |
xx-large | |
Relative | smaller (relative font size of parent) |
larger (relative font size of parent) | |
Length | A number followed by a unit of measurement |
Percentage | The size relative to font size of parent |
Example
Listing 7.74 uses absolute font sizing ...
Get Pure JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.