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 trialwelly mugo
45 Pointsi dont understand this task "Now, write CSS that will select the h1. Donβt forget your curly braces!
what is required of me here
<body>
<style>
color: red;
</style>
<h1>Nick Pettit</h1>
</body>
2 Answers
Donnie Reese
17,211 PointsAll style elements should be outside of the body and, ideally, in the head of the document.
The style element contains stylesheet code. So any css would be written within it. What it's asking you to do is write CSS code that selects the h1 tag and to not forget that all CSS selectors are followed by curly brackets. The curly brackets are what contain the rules for that specific selector.
Example:
/* CSS class selector */
.greenClass {
color: green;
}
/* CSS id seletor */
#uniqueElement {
font-weight: bold;
}
/* CSS element selector */
h1 {
color: red;
}
Caleb Senechal
1,101 PointsPut your h1 inside of your style and then put your color within the h1
Luke Gwitirwa
5,487 PointsLuke Gwitirwa
5,487 PointsThank got it