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

William Wilkerson
William Wilkerson
Pro 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; } }

<!doctype html>
    <link href="styles.css" rel="stylesheet">

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

P {
   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
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. */