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 trialNurbol Mynbayev
655 PointsNow, write CSS that will select the h1. Don’t forget your curly braces!
<h1></h1> <style> </style>
{<h1>Nick Pettit</h1>
<style></style>}
2 Answers
Frederico Graciano
Courses Plus Student 2,768 PointsHello Nurbol.
So the curly braces are what you use to open a CSS Rule and close a CSS Rule. What a CSS Rule is? Is a block with tons of code inside consisting of a selector in this case h1, a property, and a value.
Example:
h1 {
property: value;
property: value;
property: value;
}
So in this challenge they want you to select the h1 tag element. Using the style tags that is used inside an html file meaning it is internal. So it would look like this:
<style>
</style>
<h1>Nick Pettit</h1>
and then in the second part they will ask you to select the h1 tag and add a color property and set the value to green.
<style>
h1 {
color: green;
}
</style>
<h1>Nick Pettit</h1>
Pretty simple, I hope it helped you, if you have anymore questions feel free to ask me.
Silviu Popovici
20,433 PointsYour CSS has to go in between the style tags. Style tags are what allow you to write CSS code within an HTML file. The challenge wants you to write a CSS selector for the h1 element, so within the style tags it would look like this:
<style> h1{ } </style>