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 trial

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.