Styling Web Fonts and Managing File Size

Web fonts are a bit more complicated than working with regular fonts, so there are a few things you might want to watch out for when working with them.

One potential risk with Web fonts, especially when using more than one or two of them, is that they can start to weigh down the page. I’m not talking about bacon and doughnuts here—I’m talking about kilobytes and megabytes.

All of those fonts need to be downloaded to the user’s computer before they can be rendered on the page. If you have half a dozen fonts on a page, this can slow down the Web site, especially for mobile users. My recommendation to you is to be prudent with your Web font choices. If you find yourself using seven Web fonts, then look for ...

Get HTML5 and CSS3: Visual QuickStart Guide, Seventh Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.