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

Make sure you're selecting the h1 tag in your style?

How do I make sure I select the h1 tag in my style?

index.html
<style></style>
<h1>Nick Pettit</h1>{
}
Duane Simer
Duane Simer
2,140 Points

When they say 'select', they are talking about using the proper selector in the css. Selectors are a way of defining the rules that govern what tags will be formatted by the contained css, so

div a {}

will apply the css in the {} to all anchor tags inside a div, while

div {}

will do so to all divs.

to select your <h1> tag, use

h1 {}

5 Answers

Muhamed Asil
Muhamed Asil
7,453 Points

follow below code format:

<style> 
h1{
  // here the h1 element style code 
} 
</style> 
<h1>Nick Pettit</h1> 
Damien Watson
Damien Watson
27,419 Points

Hi Ayaz,

Inside the 'style' tags, you need to type the element, classname or id of the item you wish to style. Try this format:

<style>
  h1 {}
</style>
<h1>Nick Pettit</h1>
Anthony Stapor
Anthony Stapor
3,369 Points

Hi, you need to put the h1 inside the style tag, try this:

<style>
  h1 {

  }

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

Thank you Anthony, Muhamed, and Damien.

fuck you bitch