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

i am stuck trying to create a rule for the .main page class

styles.css

index.html
<!doctype html>
<html>
  <head>
    <link href="styles.css" rel="stylesheet">
  </head>
  <body> <p class="main-pg"></p>

    <p>My amazing website</p>

  </body>
</html>
styles.css
.my-class-boarder {  
}

dsx

1 Answer

Hi Michelle, you did very well in the first step. You achieved adding a class called "main-pg" to the paragraph element. In the second step, you should create a rule for this class. To select elements with a specific class, write a period (.) character, followed by the class name. Check this for CSS Selector

.main-pg{

}

Then in the last step, you can give the paragraph a border like this.

.main-pg {
  border: solid 4px red;
}