Showing posts with label local font. Show all posts
Showing posts with label local font. Show all posts

Monday, 18 July 2016

How to use local font on your website

font-face

I will show you how you can change text to any font placed locally in your hard drive.


Code:
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
<style>
@font-face {
font-family: 'myfont';
src: url('Beyond Wonderland.ttf');
}

h1 {
font-family: 'myfont'
}
</style>
</head>
<body>
<h1>This is how we can change font.</h1>
</body>
</html>


Output:

font-face output