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 trialBright Asante
51 Pointsplease im finding it hard to solve the second challenge
please can anyone help me to solve the second challenge
<body>
<h1>Nick Pettit</h1>
</body>
2 Answers
steyoung
12,781 PointsIt would help if we understood what the objective is here. It looks like you might be trying to add some CSS. writing a CSS selector and property might look like this:
h1 {color: red;}
The h1 is the selector indicating what should be styled in your index.html and the color is a property. I hope this helps.
Jason Anders
Treehouse Moderator 145,860 PointsHi Bright,
The first part of the challenge wants you to add a style element before the h1 tags. For this you need to use an opening and closing style tag
<body>
<style></style> <!--adds the style element to be used to apply CSS to the page-->
<h1>Nick Pettit</h1>
</body>
The second part of the challenge wants you to add the selector to style the h1 tag. This selector will go between the style tags.
<body>
<style>
h1 {} <!--here you're just adding the selector and no values. That comes in part 3-->
</style>
<h1>Nick Pettit</h1>
</body>
And, finally the 3rd part wants you to style the h1 color to green. We already have the style tags, and the selector, so all that is left is to put the values in-between the curly braces.
<body>
<style>
h1 {color: green}
</style>
<h1>Nick Pettit</h1>
</body>
I hope that helps to clear things up for you. Keep Coding! :)
jennifer ray
7,875 Pointsjennifer ray
7,875 PointsWhat is the question? Is that all of your code?