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 trialOmar Suriel
5,403 PointsWhy 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
39,021 PointsHi 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
Omar Suriel
5,403 PointsOmar Suriel
5,403 PointsYes 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
39,021 PointsGreg Kaleka
39,021 PointsNo problem! Glad it makes sense :)