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 trialElizabeth Chipendo
Courses Plus Student 6,468 Pointscoding for color change
how do i code for a color change
<style>
h1 {
color: blue;
}
</style>
<h1>Elizabeth Chipendo</h1>
</body>
Elizabeth Chipendo
Courses Plus Student 6,468 Pointsok thank you but from the above format, where do you think i went wrong. i mearnt the format that i should follow
Tim Sweeney
15,101 Pointswhat do you mean by format? what you've done is right is it not working? whats the code challenge asking you to do?
if your changing the color of the text then do as follows;
' ' 'CSS h1 { color: type the color here; } ' ' '
i used the h1 element in this example but this applies to any text elements such as ' ' 'html <a> ' ' ' ' ' ' 'html <p> ' ' ' and so on.
5 Answers
Elizabeth Chipendo
Courses Plus Student 6,468 Pointsyah what i have done is being rejected that is the only problem
Elizabeth Chipendo
Courses Plus Student 6,468 Pointsmay be you can help me check if there is any error that i have made
Tim Sweeney
15,101 Pointsis it requiring you to write a selector and a property?
delete the color and see what happens
the selector is the h1 and the property is the color. the color itself is the value but i hasn't asked you to assign a value yet so just delete blue for now and see if that works.
Tim Sweeney
15,101 Pointsi just checked that challenge isn't it asking you to but a color of green not blue?
Elizabeth Chipendo
Courses Plus Student 6,468 Pointsok thank you, am i correct by putting my name
Tim Sweeney
15,101 Pointsahaaa I didn't realise but you've accidentally deleted your opening body tag.
the body tag back in above the h1 and it will work
Elizabeth Chipendo
Courses Plus Student 6,468 Pointsthanx hey, i am done on that one
Tim Sweeney
15,101 PointsTim Sweeney
15,101 Pointsif you want to change the color of the h1 element (which I'm guessing) just change the color blue to whatever you want like red or green for example.