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

What am I doing wrong?

What am I doing wrong?

index.html
<body>
  <style></style>

  {<h1>Nick Pettit</h1>}
</body>

2 Answers

The CSS goes within the style tag:

<body>
  <style>
    h1 { }
  </style>
    <h1>Nick Pettit</h1>
</body>
Mitchell Springer
Mitchell Springer
2,576 Points

If you are just trying to make an h1 header, then just do this:

<body>
  <style></style>

  <h1>Nick Pettit</h1>
</body>

You don't use curly braces when writing HTML code.

If you want to use CSS to edit the h1 tag, then that needs to go between the style tags.

It's CSS embedded in the html file rather than in a separate file. The task requires the h1 element to be selected for this task. The next task needs the h1 text to be set to a colour.

Steve.