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 Responsive Web Design and Testing Adjust the Profile Page and Header

Why did you apply the "font-size: 2.5em;" on the h1 tag instead of the #logo ID that you were already working on?

Why did you apply the "font-size: 2.5em;" on the h1 tag instead of the #logo ID that you were already working on?

I wanna know if there is a reason why? because i fell like both the h1 and the logo #ID are style the same information..

1 Answer

Greg Kaleka
Greg Kaleka
39,021 Points

Hi Omar,

The key here is that #logo rules will only target that particular element, whereas h1 rules will target all h1 elements. The advantage of targeting h1 is that later on the page (or even on other pages!), your h1 elements will all be that size. It's what makes CSS so powerful - you can describe what you want hundreds of pages on your site look like.

Let me know if that answers your question.

Best,

-Greg

Yes it does answer my question. and it makes sense. I guess I was confused because i didn't see the h1 element being used anywhere in the website so far. but I guess it makes sense in case we were to add it later. thank you!!!!!!!!!!!!!

Greg Kaleka
Greg Kaleka
39,021 Points

No problem! Glad it makes sense :)