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 Introduction to HTML and CSS CSS Fundamentals Text and Fonts

Error with the # selector after pasting the font code

Hi Laura,

I followed the steps in your notes. But after pasting the following code in the styles.css file. "@import url('https://fonts.googleapis.com/css2?family=Playpen+Sans:wght@100..800&display=swap')",

The #ingredients{} and #intro {} selectors become red, and the font displayed in the mockup does match the displayed style. Could you help me ? Thanks ! Yida

2 Answers

Laura Coronel
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Laura Coronel
Treehouse Teacher

Hey Yida Yin, I took a look at your workspace. It looks like you're getting an error for the #ingredients and #intro is because you are missing the semicolon (;) at the end of your font import statement on line one. Once you add the semicolon to the end that should make the errors disappear.

@import url('https://fonts.googleapis.com/css2?family=Playpen+Sans:wght@100..800&display=swap');

oh! It did! Thank you Larua. How come missing the ";" only caused the error to the #ingredients and #Intro selectors, but not the other though?

Here is the link of the snapshot: https://w.trhou.se/e8p5bp2c3l