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 Resize Text

Resize Text

Did you plan beforehand the sizes of the H1 during the tutorial? I was wondering why you came up with the sizes: font-size: 1.75em, font-weight: normal, and line-height: 0.8em, Are these just random numbers or was there some serous thought on how it would be presented in the web browser, I look forward to your response.

2 Answers

John Saleigh
PLUS
John Saleigh
Courses Plus Student 13,277 Points

The values chosen are to look better for the Google font being used (Changa One). These are subjective choices, so you might want something a bit different when creating your own website.

If a browser uses the recommended standards, an H1 will have a font size of 2.0em, and a font-weight of bold. The Google font used in the course looks better in an H1 with a slightly smaller font size. The line-height of 0.8 em again just looks a bit better for this particular page.

As for the font-weight, this font only has normal and normal italic types, but both of those are already a bit bolder than most other fonts. Because of this, and just in the case of this specific font, a font-weight of normal would be used. If you choose a different font for your site, you'll want to see if the font has a bold version first, and decide if you want to change the font-weight.

I'm surprised Einstein doesn't know the answer to such a simple question.