CSS font-variant Property

CSS font-variant Property


CSS font-variant Property

This property sets a variation of the specified or default font family. 

Syntax -
 

font-variant: normal | small-caps | inherit 


Now we will see the value with their description -

Value

Description

normal

The browser displays a normal font, and this is the default value.

small-caps

The browser displays a small-caps font.


 

Now we will see the example -

Example-
 

<html>
  <head>
    <title>Title of the document</title>
    <style>
      h1 {
        font-variant: normal;
}
      h3 {
        font-variant:small-caps;
      }
   
    </style>
  </head>
  <body>
    <h1>This is the sample heading</h1>
    <h3>This is font-feature-settings and thsi is the sample pera here Lorem ipsum dolor sit amet consectetur adipisicing elit. Error, dolor. Lorem ipsum dolor, sit amet consectetur adipisicing elit. Odio ipsum aut totam repellendus commodi, modi unde rem fugit non voluptatum voluptas illo.</h3>
    <h3 class="two">This is font-feature-settings and thsi is the sample pera here Lorem ipsum dolor sit amet consectetur adipisicing elit. Error, dolor. Lorem ipsum dolor, sit amet consectetur adipisicing elit. Odio ipsum aut totam repellendus commodi, modi unde rem fugit non voluptatum voluptas illo.</h3>
  </body>
</html>

Output -