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

HTML How to Make a Website Beginning HTML and CSS Write a CSS Selector and Property

Adeniyi Aderibigbe
Adeniyi Aderibigbe
327 Points

curly braces

Write CSS that will select the h1

index.html
<h1>Nick Pettit</h1>
<h1>Adeniyi Aderibigbe <style></h1>

4 Answers

Steven Parker
Steven Parker
231,198 Points

Your tag syntax is not correct.

Also, the instructions didn't say to add an additional h1 element. You should probably not do that.

But they do say "Add a <style> element just above the <h1>." So be sure to put it first, and also remember to close it with a matching </style> end tag. Then when you get to task 2, put the CSS code between those tags.

Adeniyi Aderibigbe
Adeniyi Aderibigbe
327 Points

Thanks Steven. I got ahead of myself. Now its asking me to: Set the Color of the h1 element to green. I am lost?..

Steven Parker
Steven Parker
231,198 Points

I hope not! Remember that the general syntax for a CSS rule is:
selector { property: value; ...(more properties and values) }

And you can always review the video if you need a refresher.

Adeniyi Aderibigbe
Adeniyi Aderibigbe
327 Points

Steve, This is what I have below. However, it's still not allowing me to proceed further.

<h1>Nick Pettit</h1> <h1>Adeniyi Aderibigbe <style></h1> <h1>Adeniyi Aderibigbe <style> {CSS} </style> <style> h1 { Color; Green; }

</style> <h1> Adeniyi Aderibigbe </h1>

Adeniyi Aderibigbe
Adeniyi Aderibigbe
327 Points

It's not allowing me to proceed further: <style> h1 { Color; Green; }

</style> <h1> Adeniyi Aderibigbe </h1>

Steven Parker
Steven Parker
231,198 Points

You nearly had it this time. But the character that separates a property from its value is a colon (":").

Adeniyi Aderibigbe
Adeniyi Aderibigbe
327 Points

Thanks Steve. I appreciate your help!