The font-size property indicates the desired height of glyphs from the font. For scalable fonts, it is a scale factor on the EM unit. Supports absolute/relative size keywords, numeric units, and math for math text. Percentages refer to the parent's font-size.p {
font-size: 16px;
}h1 {
font-size: clamp(1.5rem, 2vw + 1rem, 3rem);
}min:0max:9999step:1units:px | em | rem | % | pt | vw | vhxx-small: scale factor 3/5 (extra-extra-small).x-small: scale factor 3/4.small: scale factor 8/9.medium: scale factor 1 (default).large: scale factor 6/5.x-large: scale factor 3/2.xx-large: scale factor 2/1.xxx-large: scale factor 3/1.larger: larger than parent (per table or ratio ~1.2-1.5x).smaller: smaller than parent.mathSpecial math scaling rules for mathematical text (MathML).CSS Fonts Module Level 4Editor's Draft<length-percentage>W3CMDNCSS css aBcDeFShow all codeEdit CSS onlineThe plugin that remembers hundreds of CSS items for youEvery CSS property — in a live demonstrationThe bilingual CSS referencedefinitionexamplessyntaxmodulespecificationvalue typessourcesvisual demonstrationpreviousnext