CSS FONTS

The CSS font property is used to set the fonts content of HTML element. There are many font property in CSS which are discussed below:

  • font-family
  • font-style
  • font-weight
  • font-variant
  • font-size

font-family : It is used to set the font type of an HTML element.

 

Example:

 font-family:"Times New Roman"; 

font-style:  It is used to specify the font style of an HTML element. It can be “normal, italic or oblique”.

Example:

font-style:normal; 

font-weight: It is used to set the boldness of the font. Its value can be “normal, bold, lighter, bolder”.

 

Example:

font-weight:bold; 

font-size:It is used to set the font size of an HTML element. The font-size can be set in different ways like in “pixels, percentage, em or we can set values like small, large” etc.

 

Example:

font-size: 20px; ​

font-varient: It is used to create the smaller-capital effect. It can be “normal or small-caps”.

 

Example:

font-variant: small-caps; ​

DOWNLOAD LATEST PROJECTS