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

Set the font variant with CSS


To set the font variant, use the font-variant property. Set the font to small-caps and normal.

You can try to run the following code to set the font-variant to small-caps with CSS −

<html>
   <head>
   </head>
   
   <body>
      <p style = "font-variant:small-caps;">
         This text will be rendered as small caps
      </p>
   </body>
</html>