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

Richard Xavier
Richard Xavier
3,633 Points

I put tag <style> and </style>, but the editor is not accept. Why?

<style>

h1{

}

</style> <h1>Nick Pettit</h1>

index.html
<style>

  h1{

  }

</style>  
<h1>Nick Pettit</h1>

2 Answers

Dane Parchment
MOD
Dane Parchment
Treehouse Moderator 11,076 Points

Oh, my bad I didn't notice this until just now.....ooops.

The style tag needs to be in the head tag in html:

<!DOCTYPE html>
<html>
<head>
<style>
<!-- STYLES GO HERE -->
</style>
</head>
<body>
</body>
</html>
Richard Xavier
Richard Xavier
3,633 Points

Yes I finished!Thank you very much!

Dane Parchment
MOD
Dane Parchment
Treehouse Moderator 11,076 Points

It seems to me that your h1 selector is empty so it wouldn't really do anything, and unless you are getting an error (the style tag and text appearing on the webpage) or some type of console error. I would say that you need to place some styles for the selector and see if it does anything then.

Richard Xavier
Richard Xavier
3,633 Points

Is not possible, same I putting a style at tag h1 the editor show me error. But thanks for your help.