programplug Logo




CSS Fonts

CSS fonts properties is used to make the fonts attractive according to your style, it allows you to set the fonts style like font family,sizes,color and boldness etc.

There are some important font attributes:

  • CSS Font Family:
    The CSS font family property is allow to change the face of a font.
    here are some example-

<!DOCTYPE html>  
   <html>  
    <head>  
    <style> 
  body  
 {  
   font-size: 80%;  
 }  
 h1
 { 
 font-family: Arial;
 }  
 h2 
 {
 font-family: Sans-serif; 
 }    
   </style>
 </head> 
 <body> 
  <h1>My Font style 1</h1>  
  <h2>My Font Family style 2</h2>  

</body> 							
</html>
 

  • CSS font-style:

  • The css foont-style property is used to change a font in italic or oblique. example:

<p> 
 {
    font-family: "Arial", Times, serif;
 }
</p> 

  • CSS Font-variant:

  • The css font-variant property is to creates a small-caps effect. example:

<p style="font-variant:small-caps;">
      This text  became small caps
   </p>

  • CSS Font weight:
  • This property is used to make changes in increases or decreases the boldness and lightness of a font .
    example:

<p style="font-weight:normal;">This font is normal.</p>
<p style="font-weight:bold;">This font is change into bold.</p>
   


  • CSS Font size:
  • The css font size property is allow you to make change in font size with increase or decrease their size according to your demand. example:

<p style="font-style:bold;">
 This text will change into bold
</p>

  • CSS Font color
  • This property gives you to change the color of text. example:

<!DOCTYPE html>
   <html> 
    <head>  
    <style>  
    body
    {  
        font-size: 80%;  
    }  
    h1 { color: green; }  
    h2 { color:#ff6347; }   
    </style>  
    </head>  
    <body> 
    <h1>My font color 1</h1>  
    <h2>My font color 2</h2>  
     </body> 
    </html>  





Our Services

Developing Cheapest Websites
Offer Digital Marketing
Provide College Projects
Attractive Website Developing
Summer Training,Industrial Training
SCO,SMO

Contact Us

Dehradun Uttarakhand India
www.programplug.com
info@programplug.com
08534019974
Designed By : Mridul Gupta

Other Link

About Us

Contact Us

Disclaimer

Privacy Policy