Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
- CSS and HTML 4:37
- CSS Selectors 6:26
- CSS Properties 5:20
- CSS Selectors and Properties Quiz 6 questions
- CSS Colors 4:19
- CSS Box Model 12:47
- Text and Fonts 7:32
- Colors, Box Model, Text, and Font Quiz 6 questions
- CSS Positioning 6:06
- CSS Images 3:31
- The Magic of CSS 2:31
- CSS Fundamentals Quiz 6 questions

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
Discover font-related CSS properties, the power of font stacks, and importing Google Fonts. Explore text styling techniques and apply them practically by aligning headers and footers, adjusting heading sizes, and enhancing text readability with increased line-height.
Update!
Google Fonts has updated their website since the recording of this video. Please follow the instructions below to add the font to your website.
Step 1
Visit fonts.google.com and search "Playpen Sans". There should only be one result, so click through to that page.
Step 2
Click the "Get font" blue button. It should be either on the top right or bottom right of the page.
Step 3
Click the "Get embed code" blue button. This will generate the code you need to add the font to your website.
Step 4
Make sure the Web tab is selected and click on the "@import" radio button. Instead of importing a couple of font weights we'll now import all of the font weights by making sure the "Full axis" weight option is selected.
Step 5
Copy the "@import url(..)" from the top section and paste it to the top of the styles.css
file. You can also copy the code snippet below.
@import url('https://fonts.googleapis.com/css2?family=Playpen+Sans:wght@100..800&display=swap');
Step 6
Back to the Google Fonts page, copy over the "font-family" line of code in the second section and paste it in the body
selector as shown in the video at 07:32.
font-family: "Playpen Sans", cursive;
Resources
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
erics38
1,178 PointsI fully dont see how you just selected two weights. when i am on google, it only gives me an option to embed thewholefam
Posted by erics38erics38
1,178 Points1 Answer
-
Benjamin Joiner
303 Points1 Answer
-
Yida Yin
606 Points2 Answers
-
Brittany Halterman
11,320 Points1 Answer
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up