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

William Wilkerson
PLUS
William Wilkerson
Courses Plus Student 739 Points

I'm setting the border color red and I'm still coming up wrong,

You need to set the border color for <p> elements to red. p { .main-pg { border: 4px solid red; } }

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

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

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

2 Answers

Your html looks good. It seems like they want you to use the class you created in you css file to set the border properties. Your css file should look something like this.

.main-pg {
    border: 4px solid red
}
Jamie Reardon
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Jamie Reardon
Treehouse Project Reviewer

To add to Jorge's answer to point out what you are doing wrong, in your CSS you have your syntax markup incorrect, it looks like you are trying to target a p element at first and then inside the curly braces you are adding the class. This isnt the correct way on how to target elements to style. When you add a class to an element, you no longer need to target the basic html selector (in this case the p element), you can simply target the class name like so:

.main-pg {
  /* Delete this and add code inside the block of curly braces. */
}