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 CSS Foundations Selectors Type, Class, and ID Selectors

How do you select the class intro and ant its font weight to bold?

I tried it but it didn't work in a challenge.

Paulo Aguiar
Paulo Aguiar
14,120 Points

.intro { font-weight: bold }

did you try this?

1 Answer

going off Paulo's reply...

Double check that there is a semi-colon after bold to close the statement.

.intro { font-weight: bold; }

Paulo Aguiar
Paulo Aguiar
14,120 Points

good to note, that the semicolon is unnecessary on the last line of a rule list. also not needed if theres only 1 rule

Depending on the person, you can omit it or not.

I would say it's a good habit to get into to always put it in.

It may currently be the last or only declaration but you may decide later that you need to add more declarations after it.

If you don't remember to put it back in then that declaration and the one that follows will be ignored by the browser.

Yes, you'll probably figure out the problem soon enough but my opinion is to not allow this to be a possibility. One less thing to remember.