HTML Introduction to HTML and CSS Make It Beautiful With CSS Test: Styling by Element and Class

James Bryant
James Bryant
585 Points

Having problems setting my border

Something I'm doing wrong. Keep asking about <p>. What is it asking or telling me?

index.html
<!doctype html>
<html>
  <head>
    <link href="styles.css" rel="stylesheet">
  </head>
  <body>

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

  </body>
</html>
styles.css
.main-pg{ 
border: style: solid; color: red; width: 4px;
}

2 Answers

Gabriel Pierce-Lackey
MOD
Gabriel Pierce-Lackey
Treehouse Moderator 10,995 Points

Your CSS looks great outside of some formatting I would recommend getting accustomed to. However your html is not correct. Specifically this part.

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

You have not closed the paragraph tag and instead have your paragraph inside of the p tag. Below is the correct syntax.

<p class="main-pg">My amazing website</p>
James Bryant
James Bryant
585 Points

border: 4px solid red;