VOOZH about

URL: https://www.geeksforgeeks.org/css/css-font-variant-property/

⇱ CSS font-variant Property - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

CSS font-variant Property

Last Updated : 27 Aug, 2024

The font-variant property is used to convert all lowercase letters into uppercase letters. However, the converted upper letters appear too small compared to the original uppercase letters. 

Syntax:

font-variant: normal|small-caps|initial; 

Default Value: normal 

Property Values:

  • normal: It has a default value. It specifies a normal font size.
  • small-caps: It converts all the lowercase letters into uppercase letters.
  • initial: It sets the property to its default value.

Example: In this example, we use font-variant: normal; property.

Output:

👁 Image

Example: In this example, we are using font-variant:small-caps; property.

Output:

👁 Image

Example:  In this example, we use font-variant: initial; property.

Output:

👁 Image

Supported Browsers: The browser supported by CSS font-variant property are listed below: 

  • Google Chrome 1.0 and above
  • Edge 12.0 and above
  • Internet Explorer 4.0 and above
  • Firefox 1.0 and above
  • Opera 3.5 and above
  • Apple Safari 1.0 and above
Comment