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

CSS exercise Style tag

I have a style tag and getting error to add a style tag: whats suppp

<style>
  h1 {color: blue;}
</style>
<body>
    <h1>PSG</h1>
</body>

2 Answers

Stone Preston
Stone Preston
42,016 Points

your style tag needs to go inside the body but above the h1. you also need to set the color to green, not blue

<body>
    <style>
     h1 {color: green;}
    </style>
    <h1>PSG</h1>
</body>

FYI: Best Practices, put your

<head><style>
h1 {
color: green;
}
</style></head>

This is an example link hope this helps for future understanding of HTML and style tags.

The challenge is asking you to add style to h1 within the <body> tag. Not sure where in the challenge you are at. you had your '<style>' tags on the outside of the <body> tag and the color should be green.