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


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

    <p>My amazing website</p>

.my-class-boarder {  


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



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

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