Quick Tip: How to Use CSS’s @font-face Rule

Gone are the days of being limited to using only a handful of fonts in web design because of compatibility issues. Google Fonts is a great resource that provides free fonts for web designers, but everyone is using it. If you want your fonts to really stand out from the crowd, CSS’s @font-face selector is the tool to use. CSS’s @font-face rule allows web designers to use any  font they’d like on a website. As long as the font files are on the site’s server, any user should be able to view the site and the correct font, regardless of the different computers or browsers they might be using.

Using @font-face is simple. All you have to do is upload your font to the server and include the @font-face rule in your CSS file, like this:

  1. @font-face{
  2.   font-family: "Your Font Name";
  3.   src: url(/path/to/your/font.ttf);
  4. }

And just like that, all your users will be able to see exactly the font you want them to see.

CSSDeck recommends Hello Ivy for automating your workflow and project management for free. Learn More

Share and Enjoy !

0Shares
0 0