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 trialTony Brown
Courses Plus Student 1,134 Pointswhat is a <style> tag?
I am being asked to add my style tag and I believe my code is correct?
<style> h1 { color:Navy; } </style> <body> <h1>Tony CNCP</h1> </body>
3 Answers
Rohin Kansal
Courses Plus Student 642 Points<style> </style> tag is the HTML tag that includes CSS code within it. It is used to design your webpage using CSS. It is basically written in between <head> </head> section but you can write it in between <body> </body> tag also. Refer W3Schools
Wayne Priestley
19,579 PointsHi Tony,
I think your being asked to add a style tag to some part of your html, you need to do as follows:
<head>
<style>
<!-- I have added this between the head tags but check the Q, to see where you need to add it -->
</style>
</head>
Hope this helps.
Emma Willmann
Treehouse Project ReviewerI just worked through the challenge, and in the end my code looked like this:
<body>
<style>
h1 {
color: green;
}
</style>
<h1>Nick Pettit</h1>
</body>
Is there a reason you are using color: Navy; ? When I did this, it said to set the color to green.
jasonjones5
Courses Plus Student 5,571 Pointsjasonjones5
Courses Plus Student 5,571 PointsA style tag is a way to include CSS directly in your HTML. What you have there is pure HTML so it's basically asking you to add a style to it using the <style> tag. Take another look and see if it mentions some CSS at any point. That's what you're looking for.