Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

Font in html ?

I now learn about adding fonds via google fonts and add those via the given links. What I don't understand is why one should define fonts in html (being about the structure) and not so much in css (being about presence, seems more relevant to fonts)? Is there a rationale for this that I might miss?

2 Answers

Daniel Čupak
Daniel Čupak
6,602 Points

Hi Arjan,

you just write path of a given font - in other words you just tell google google "Hey, I am gonna use that font" and later in CSS you use it as you normally would

You just write the source of that font into your html. Google fonts are not standard in any browser. So the Browser need to know the external source (like a path) of that font.