Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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