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

CSS How to Make a Website Customizing Colors and Fonts Pick Fonts and Set Relative Units

zoe yan
zoe yan
3,298 Points

I cannot see the change of font on my website

after I coded the same on my workspace, I refreshed my website but the font of the headline 1 didn't change at all

Here is the code I did in CSS

h1{ font-family: 'Changa One', sans-serif; margin: 15px 0; font-size:1.75em; font-weight:normal; line-height:0.8em; } h2{ font-size:0.75em; margin:-5px 0 0; font-weight:normal; }

in html:

<link rel="stylesheet" href="css/normalize.css"> <link href='http://fonts.googleapis.com/css?family=Changa+One|Open+Sans:400italic,700italic,400,700,800' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="css/main.css">

any reply will be appreciated .

5 Answers

Font families rely on fonts installed on the local computer. There appears to be a way around that, but it has not been covered yet. See:

https://developer.mozilla.org/en-US/docs/Web/CSS/font-family?redirectlocale=en-US&redirectslug=CSS%2Ffont-family

Timothy Winters
Timothy Winters
12,926 Points

Did you use a link to Google Fonts for the Changa One font in your HTML?

Is that what it takes to be downloaded on the computer?

Timothy Winters
Timothy Winters
12,926 Points

If you use a link to Google Fonts it doesn't get downloaded to your computer until you load it on the page. This also means that the person viewing the webpage doesn't need the font installed on their computer since it will download with the page as their viewing it.

zoe yan
zoe yan
3,298 Points

According to your statement, I have to download the font to my computer? I thought just click 'use' and then the css file link provided by google fonts ,then I can apply that font to my website.... thanks for your reply.

Timothy Winters
Timothy Winters
12,926 Points

You click use and get the link and add it to your page. It is applied to your website. You don't download it to your computer directly, the .html , .css and .js is downloaded when you see it on your screen and then during that step is when the font is also temporarily downloaded to be rendered on the screen.

zoe yan
zoe yan
3,298 Points

I see what you mean. but it still didn't work, I cannot see the font change on the preview website... Still thanks for your help, I will take a good look at it myself.

Please post both the html and CSS. Read the Markdown Cheatsheet for how to format it.