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

I'm LOST.....

Help ME I'm desperate!!!!!!!!

index.html
<!doctype html>
<html>
  <head>

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

  </head>
  <body>

    <p>My amazing website</p>


.main-pg
</body>

</html>
styles.css

<!doctype HTML>

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

Here you go. That might be the start of it. Just a heads up, the head is where the stylesheet link goes and the body is where everything you want to see on the page goes.

And in the css file

.main-pg {
// this is where your styling goes
}

Oh, and if it's close to your first code challenge. On the top bar of the code challenge are two tabs with the file names, click the style.css file and that's where you can input your css code.

Hope you stick with it!

1 Answer

Hi Lynn,

in the css file add CSS .main-pg followed by {}. You don't need to put it in the body of the webpage.

I hope that helps you out :)