Custom Fonts

CSS can also use custom fonts other than the generic fonts. Users can only see the fonts that are already installed on their computers.

Conventional way of using custom fonts for headings and logos etc. is creating the text in a graphic editor and then using the image file.

CSS gives facility to use custom fonts or downloadable fonts on the website. Download the font as needed, like ‘vskills_font.ttf’, and upload it to web server. Then refer to that custom font in the following manner:

@font-face {

font-family: vskills_font;

src: url(‘vskills_font.ttf’);

}

Using of the custom font on different text elements is done as a normal CSS declaration like

p.custom_font{

font-family: vskills_font;

}

This method of using custom fonts doesn’t work with Internet Explorer.

Go To- Certified CSS3 Developer Tutorial

Get industry recognized certification – Contact us

Menu