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

I am failing to understand the question and also to answer it

in the css file, create a rule for the .main-pg class. You don't need to write any style instructions yet.

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

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

. "main-pg" class

3 Answers

Piotr Manczak
Piotr Manczak
Front End Web Development Techdegree Graduate 22,810 Points

in HTML as follows: <p class="main-pg">My amazing website</p>


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

Brendan Whiting
Brendan Whiting
Front End Web Development Techdegree Graduate 84,600 Points

I don't want to give away the answer. Here is some documentation on the CSS class selector.

  • the dot should be right next to the class name, no space
  • the class name shouldn't be in quotes
  • you need to open a block with curly braces {}
  • you don't need the class keyword here

Thank you for the much clearer explanations

Roberto Rivera
Roberto Rivera
8,547 Points

The .main doesn't need {} borders or brackets does it? Cause the video shows it in the workspaces.