Defining and applying new fonts in our CSS

In the CSS, right underneath our reset, let's add a new section called fonts. Add the @font-face; and this will allow us to declare a new font:

/****************Fonts****************/@font-face {    font-family: 'League-Gothic';}

I'm going to declare the font name first, which can be anything. So even if the font is called League Gothic-Regular, you can name it Bananas Serif if you want. Let's call it League Gothic because that makes the most sense.

I've put it in single quotes for two reasons. One, it's a web font, and two, it has more than one word, which should always be quoted, just like you would quote 'Times New Roman'. Next, we're going to declare where this font exists using the src property: ...

Get Mastering CSS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.