Answers for "using font in html from another site"

CSS
0

how to add font otf format in html

/*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; }
Posted by: Guest on December-05-2020
0

how to include a new font website

/*Add custom fonts to your website w/ @font-face, most common approach

Step 1: Download the font
Step 2: Create a WebFont Kit for cross-browsing
Step 3: Upload the font files to your website
Step 4: Update and upload your CSS file
Step 5: Use the custom font in your CSS declarations
Posted by: Guest on August-30-2021

Code answers related to "using font in html from another site"

Browse Popular Code Answers by Language