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

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

Killeon Patterson
Killeon Patterson
18,528 Points

Which line is incorrect for this challenge?

Which line is incorrect for this challenge?

index.html
<style></style>

  h1 {
  color: blue;
}
    <h1>Nick Pettit</h1>
Killeon Patterson
Killeon Patterson
18,528 Points

Thank you for your help, Emil. I got pass the challenge.

2 Answers

Hello there Killeon

The incorrect line is actually the first line. Your style tag is at the right place, but the /style (i.e. the ending tag for the style tag), should be placed after your CSS. This way, the browser will know the difference between CSS and HTML.

Your CSS is the styling of the webpage (i.e. the h1 tag reference). So your code should instead look more similar to this:

<style>
h1 {
  color: blue;
}
</style>

<h1>Nick Pettit</h1>

I hope this helps.

Angela Martin
Angela Martin
346 Points

Hi, I am at the same challenge, wrote the code exactly like Nick did on the video, but it did not change the font color to blue. I wrote it again like your example above exactly, still no color change. I also notice that in the video, Nick says that highlighting the word "blue" will show the color blue, but that also does not happen for me. I'm in Firefox. Any ideas? Thanks!