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 trialSherreka Burton
288 PointsWhy is this not right?
The preview looks fine, but it keeps giving me the error that I didn't add the style tag.
<style>
h1 {color: red;
}
</style>
<body>
<h1>Sherreka Burton</h1>
</body>
2 Answers
Saskia Lund
5,673 PointsOk, well I think they want you to place the style element right above the header. That is in this case the h1.
Try placing the style tags between body and h1 :)
Saskia Lund
5,673 PointsHi Sherreka,
what exactly is the challenge asking from you? Word by word?
Usually, if you place style tags within the html, you'd either place them within the
<head>
<style></style>
</head>
or as a style attribute right with the corresponding item that needs styling. In this case like that:
<h1 style="color: red;">Sherreka Burton</h1>
But I do not know the exact task you need to fulfill, so it is hard fo rme to answer your question ;)
Sherreka Burton
288 PointsHere are the instructions: "We're starting out with an <h1> element and a <body> element. Add a <style> element just above the <h1>."
Saskia Lund
5,673 PointsPardon?
Half of the text is erased by the forum software...please use the Markdown Cheatsheet that is linked to below the comment field ;)
Sherreka Burton
288 PointsThe instructions are "We're starting out with a h1 element and a body element. Add a style element just above the header."
Sherreka Burton
288 PointsSherreka Burton
288 PointsThanks, Saskia! That was it!
Saskia Lund
5,673 PointsSaskia Lund
5,673 Pointsyou are welcome :)