CSS3 Custom Fonts

CSS3 allows the use of custom fonts trough the @font-face rule. They are really easy to add and the syntax looks like this:

@font-face {
	font-family: someFont;
	src: url('path/font.ttf');
}

This declares a font for use within your web page. An example would be:

@font-face {
    font-family: CODEBold;
    src: url('../fonts/CODEBold.otf');
}

Now to apply the custom font to your text you can use the font-family property:

<h1 style="font-family: CODEBold;">Start Debugging</h1>

A great source for custom fonts would be dafont.com
Check out a demo here: Custom Fonts Demo




No Comments


You can leave the first : )



Leave a Reply

Your email address will not be published. Required fields are marked *

Are you a human? * Time limit is exhausted. Please reload the CAPTCHA.