Computer >> Computer tutorials >  >> Programming >> CSS

Web Fonts in CSS


Web fonts are used to allow the fonts in CSS, which are not installed on a local system. 

Example

The following code shows the sample code of font face:

<html>
   <head>
      <style>
         @font-face {
            font-family: myFirstFont;
            src: url(/https/www.wsxdn.com/css/font/SansationLight.woff);
         }
         div {
            font-family: myFirstFont;
         }
      </Style>
   </head>
   <body>
      <div>This is the example of font face with CSS3.</div>
      <p><b>Original Text :</b>This is the example of font face with CSS3.</p>
   </body>
</html>

Output

Web Fonts in CSS