Jump to content

@font-face isn't working


V0uk

Recommended Posts

I've got a file named "index.html":

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <style>
            @font-face
            {
                font-family: Azonix;
                src: url(azonix-webfont.woff);
            }
        </style>
    </head>
    <body>
        <p style="font-family: Azonix;">Hello!</p>
    </body>
</html>

But it's displayed with default font, not Azonix.

What should I do?

Link to comment
Share on other sites

Does the file "azonix-webfont.woff" exist in the same directory as the HTML file?

You can check the network tab in your browser's developer tools to see if the font failed to load. Most browsers will display the developer tools when you press the F12 key on your keyboard.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...