Computer >> Computer tutorials >  >> Programming >> Javascript

Set the font size with CSS


The font-size property is used to increase or decrease the size of a font. The font-size property is used to control the size of fonts. Possible values could be xx-small, x-small, small, medium, large, x-large, xx-large, smaller, larger, size in pixels or in %.

<html>
   <head>
   </head>
   <body>
      <p style = "font-size:10px;">This font size is 10 pixels</p>
      <p style = "font-size:small;">This font size is small</p>
      <p style = "font-size:large;">This font size is large</p>
   </body>
</html>