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 trialAyaz Sadiq
Courses Plus Student 5,361 PointsMake sure you're selecting the h1 tag in your style?
How do I make sure I select the h1 tag in my style?
<style></style>
<h1>Nick Pettit</h1>{
}
5 Answers
Muhamed Asil
7,453 Pointsfollow below code format:
<style>
h1{
// here the h1 element style code
}
</style>
<h1>Nick Pettit</h1>
Damien Watson
27,419 PointsHi 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
3,369 PointsHi, you need to put the h1 inside the style tag, try this:
<style>
h1 {
}
</style>
<h1>Nick Pettit</h1>
Ayaz Sadiq
Courses Plus Student 5,361 PointsThank you Anthony, Muhamed, and Damien.
Jason Tse
Courses Plus Student 59 Pointsfuck you bitch
Duane Simer
2,140 PointsDuane Simer
2,140 PointsWhen 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 {}