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

Sadam Maruapey
Sadam Maruapey
4,221 Points

you need to set the border color

i dont know what is wrong abput my challange i already finish my code, but keep mention that i you need to set border color for <p> which i did, please help

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

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

  </body>
</html>
styles.css
p { border= 4px solid red ;
    text-align = centre;
}


.main-pg { border =  4px solid red 
  text-align = centre ;
}

1 Answer

Michael Hulet
Michael Hulet
47,913 Points

CSS doesn't use an equals sign (=) to set properties, but rather a colon (:). For example, to set the height of all divs on a page, you'd do something like this:

div{
    height: 2em;
}

Also, CSS uses American spelling for everything, so it recognizes center, but not centre