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 Introduction to HTML and CSS Make It Beautiful With CSS Test: Styling by Element and Class

Where is my error?????

Can someone please tell me what I am doing wrong?

<!doctype html>

   <p class="main-pg">My amazing website</p> 
    <link href="styles.css" rel="stylesheet">

    <p>My amazing website</p>
.main-pg {



Lynn, check the answers on your last couple of questions, I posted the answers that will work for each step and where you went wrong. your error is the CSS should be in your styles.css and your .main-pg class declaration needs to be within the <p> tag.

1 Answer

Steven Parker
Steven Parker
215,939 Points

You won't start writing CSS until task 2. For task 1, you need to add the class to the paragraph element in the HTML. That will look something like this:

    <p class="main-pg">My amazing website</p>

Then, when you do get to the CSS tasks, all the CSS code should go on the "styles.css" tab instead of mixing it in with the HTML.