HTML Introduction to HTML and CSS 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

Todd Teese
Todd Teese
22,679 Points
<!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

Chris Chavez
Chris Chavez
787 Points

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 :)