Use .ttf no CSS
@font-face {
font-family:"Name-Of-Font";
src: url("yourfont.ttf") format("truetype");
}
Nasty Newt
@font-face {
font-family:"Name-Of-Font";
src: url("yourfont.ttf") format("truetype");
}
<!DOCTYPE html>
<html>
<head>
<style>
@font-face {
font-family: myFirstFont;
src:url("/fonts/Harlow_Solid_Italic.ttf");
}
.harlow{
font-family: myFirstFont;
}
</style>
</head>
<body>
<div>With CSS3, websites can finally use fonts other than the pre selected "web-safe" fonts.</div>
<p><b class="harlow">Note:</b> Internet Explorer 8 and earlier, do not support the @font-face rule with the WOFF format (only support for EOT format).</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<style>
@font-face {
font-family: "myFirstFont";
src: url("C:/Users/Desktop/Website/fonts/Harlow_Solid_Italic.ttf");
}
.harlow {
font-family: "myFirstFont";
}
</style>
</head>
<body>
<div>With CSS3, websites can finally use fonts other than the pre selected "web-safe" fonts.</div>
<p><b class="harlow">Note:</b> Internet Explorer 8 and earlier, do not support the @font-face rule with the WOFF format (only support for EOT format).</p>
</body>
</html>
@font-face {
font-family: myFirstFont;
src: url(sansation_light.woff);
}
div {
font-family: myFirstFont;
}
/*Name the font-family and link the font file in the @font-face rule*/
/** Use intstead */
@font-face {
font-family: 'MyFont';
src: local('MyFont'), url(fonts/MyFont.woff) format('woff');
}
<!DOCTYPE html>
<html>
<head>
<style>
@font-face {
font-family: myFirstFont;
src:local("fonts\Harlow_Solid_Italic.ttf");
}
.harlow{
font-family: myFirstFont, sans-serif;
}
</style>
</head>
<body>
<div>With CSS3, websites can finally use fonts other than the pre selected "web-safe" fonts.</div>
<p><b class="harlow">Note:</b> Internet Explorer 8 and earlier, do not support the @font-face rule with the WOFF format (only support for EOT format).</p>
</body>
</html>