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

Design Web Typography How to Choose and Use Webfonts Self-hosted Webfonts

sankyeat kumar
sankyeat kumar
5,468 Points

Why did you have to specify font-style and font-weight each time?

Just wondering because I thought that there was a different type for normal, bold, italic and bold italic that you link to. Even in the code, each url is linking to a specific type.

So why did you have to include font-weight:bolid; font-style:italic; when linking to the bold italic font style of this font, for instance?

I hope my question makes sense.

1 Answer

Emmanuel Molina
Emmanuel Molina
9,268 Points

Because the browser needs to know which is which. Of course you have the information into the url in this case but it's not mandatory. You could have a name with "font-1" "font-2" etc.. That's why there are a standardized way to declare it. Computers likes clear things :)