The font-size CSS property specifies the size of the font. Setting the font size may, in turn, change the size of other items, since it is used to compute the value of em and ex length units.
Syntax
font-size: xx-small /*
font-size: x-small
font-size: small
font-size: medium
font-size: large
font-size: x-large
font-size: xx-large
font-size: larger /*
font-size: smaller
font-size: 12px /*
font-size: 0.8em
font-size: 80% /*
font-size: inherit
<!DOCTYPE html> <html> <head> <style> .small { font-size: xx-small; } .larger { font-size: larger; } .point { font-size: 24pt; } .percent { font-size: 200%; } </style> </head> <body> <h1 class="small">Small H1</h1> <h1 class="larger">Larger H1</h1> <h1 class="point">24 point H1</h1> <h1 class="percent">200% H1</h1> </body> </html>