Linking font-family in HTML vs. importing in CSS?

I’ve been wondering about the difference between linking to an outside font in HTML versus importing it in CSS and couldn’t find much info other than this stack overflow thread from 2009:

In it, someone links to this article, also from 2009:

that states that linking to the font in HTML is better for performance than importing into CSS. So knowing that, I guess my question now is, is this still relevant today, 10 years later? Are there any other reasons why you might want to use one method or the other?

For web fonts I think using the link method is still preferable, it’s what Google fonts gives you by default.

But unless you see an actual performance issue I guess it really isn’t worth worrying too much about. If you want to optimize the font loading there are some pretty extensive articles out there on it.

1 Like