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

srilatha challa
srilatha challa
845 Points

add a <style> element just above the <h1>

add a <style> element just above the <h1>

index.html
<style>
  <h1>Nick Pettit</h1>

2 Answers

Hannah Gaskins
Hannah Gaskins
14,572 Points

Hey there Srilatha,

It looks like the challenge is asking you to first add an empty style tag above the h1 tag. To add in an empty style tag you can do so like this:

<style></style>

You'll want to remember the closing </style> tag as well.

The second part of that challenge is asking to select the h1 tag. To do so you will use a CSS selector and curly braces, it will look something like this:

h1 {}

Note that nothing has been done to the h1 tag yet, we have only signified the selector as h1. This will go within that style tag you added previously.

The final step is to change the color of the text. You'll add in the CSS property and value declaration here. It goes like this:

h1 {color: green}

Hope that helps!

Cindy Lea
PLUS
Cindy Lea
Courses Plus Student 6,497 Points

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

Just did the challenge & this works. Theyre not asking for any setails, just want the elements.