Embed Fonts in CSS

@font-face Rule

In @font-face rule you must first define a name for the font (e.g. myFirstFont), and then point to the font file.

Note: Use lowercase letters for the font URL.
Uppercase letters can give unexpected results in IE!

To use the font for an HTML element, refer to the name of the font (myFirstFont) through the font-family property:

Demofont-face-demo1

Preview
font-face-preview1


Demo
font-face-demo2

Preview
font-face-preview2

References
Using @font-face
CSS3 @font-face Rule

 

Advertisements