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

David Taber
PLUS
David Taber
Courses Plus Student 3,574 Points

this works in the dashboard but not on the webpage why

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

<body> <h1> something lese </h1> </body>

5 Answers

Stone Preston
Stone Preston
42,016 Points

your style tags need to go inside the body tags, but above the h1

<body>
<style> 
 h1 { color: blue; 
  } 
</style>
  <h1> something lese </h1>
  </body>
Stone Preston
Stone Preston
42,016 Points

try using a lowercase c

h1 { color: blue; }

CSS attributes are case insensitive, but the challenge might be expecting you to use color and not Color since using lowercase letters is the convention

David Taber
PLUS
David Taber
Courses Plus Student 3,574 Points

If they are case sensitive then why would it work in the dashboard?

Stone Preston
Stone Preston
42,016 Points

what do you mean by dashboard?

Stone Preston
Stone Preston
42,016 Points

also I said they are case insensitive, which means in the browser your code would be correct syntax. However the challenge engine is probably expecting your code to use a lowercase c, and since you used an upper case it said it was not correct (even though technically it was, just against convention)

David Taber
PLUS
David Taber
Courses Plus Student 3,574 Points
<style> 
 h1 { color: blue; 
  } 
</style>


<body>
  <h1> something lese </h1>
  </body>

says I am forgetting style

Stone Preston
Stone Preston
42,016 Points

in order for HTML code to show up well in the forum, you must format it using markdown. Have a look at the tips for asking questions video on the right side of the page to see how to do that, or have a look at this post

Stone Preston
Stone Preston
42,016 Points

ah ok. yeah your style tags need to go inside the body tags but above the h1. that could have been the problem the whole time, or it could have been the capital C in combination with the style tags as well.

Stone Preston
Stone Preston
42,016 Points

also in the challenge you are asked to set the color to green, not blue.