how to link font file in html code example
Example 1: how to link fonts css
@font-face {
font-family: myFirstFont;
src: url(sansation_light.woff);
}
div {
font-family: myFirstFont;
}
Example 2: css font face
@font-face {
font-family: thisSpecialFont;
src: url(linkToFontFile.woff);
}
body {
font-family: thisSpecialFont;
}
Example 3: how to add font otf format in html
@font-face {
font-family: 'lovelyFont';
src: url('fonts/lovely_font.eot');
src:
local('Lovely Font'),
local('Lovely-Font'),
url('fonts/lovely_font.otf')
format('opentype');
}
@font-face {
font-family: 'lovelyFont';
src: url('fonts/lovely_font_bold.eot');
src:
local('Lovely Font Bold'),
local('Lovely-Font-Bold'),
url('fonts/lovely_font_bold.otf')
format('opentype');
font-weight: bold;
}
div { font-family: 'lovelyFont', sans-serif; }
span { font-weight: bold; }
Example 4: how to link fonts css
@import url(
Example 5: how to change font in html
<font face="yourfont">
Lorem Ipsum
</font>
Example 6: how to change font in html
<font face="yourfont">
Lorem Ipsum
</font>