How to use @font-face in Internet Explorer

Hi guys, today I want to explain to you how you can use @font-face in Internet Explorer.

I will show you a simple example with a simple code:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<style>
@font-face {
font-family:MYRIADPRO-BOLD;
src:url(font/MYRIADPRO-BOLD.OTF);
}
h3{
font-family:MYRIADPRO-BOLD;
}
</style>
</head>

<body>
<h3>New document</h3>
</body>
</html>

All browsers supports this code, but Internet Explorer doesn't recognize .

Now I want to explain how you can solve this problem.

You just need to add this code ", sans-serif" after the name of
the font.

Full example:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<style>
@font-face {
font-family:MYRIADPRO-BOLD;
src:url(font/MYRIADPRO-BOLD.OTF);
}
h3{
font-family:MYRIADPRO-BOLD, sans-serif;
}
</style>
</head>

<body>
<h3>New document</h3>
</body>
</html>









Leave a Comment