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?

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

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

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

    }
</body>

</html>
styles.css

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
176,365 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.