<style>
/* include the font here using @font-face */
@font-face {
font-family: 'myFontName'; /* this value can be anything you wish - it gets used in the class definition below */
src: url('path/to/font/myfont.woff'); /* add the file path to your font here */
}
/* define a class and add the new font */
#customFont {
font-family: myFontName; /* property value must match value in @font-face*/
}
</style>
<div>
<!-- To use the custom font, simply add your new class to the element -->
<p id="customFont">Hello, World!</p>
</div>
<!-- Happy coding <3 -->
/*default version*/
@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');
}
/*bold version*/
@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;
}
/*container element*/
div { font-family: 'lovelyFont', sans-serif; }
/*span elements inside the container div*/
span { font-weight: bold; }
font-family: