Web Fonts in CSS

CSSWeb DevelopmentFront End Technology

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:

Live Demo

<html>
   <head>
      <style>
         @font-face {
            font-family: myFirstFont;
            src: url(/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

raja
Updated on 20-Jun-2020 13:51:17

Advertisements