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

Jordan Bass
Jordan Bass
3,183 Points

Day 1 for me. This question says I need to set the border color for <p> elements to red... How?

In CSS I've already put in border= solid red 3px

but then it says what my question is asking

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

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

  </body>
</html>
styles.css
.main-pg {
  border= solid red 4px;
}

1 Answer

Jon Myzzle
Jon Myzzle
6,279 Points

Hello Jordan and let me be one of many to welcome you to the Treehouse community!!

That being said, the mistake in your code is a simple one and extremely easy to remedy! See below for the solution, and an explanation:

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

In your code, you used an equals instead of the colon inside of the css property. Remember in most cases when using CSS, your syntax will look like the following at its most basic:

selector {
  property: value;
}

I hope this helps, if you have further questions or want me to further explain something, please don't hesitate to respond to this answer with a comment!

Cheers, Happy Coding and Welcome to Treehouse! :beers:

-Jon

Jordan Bass
Jordan Bass
3,183 Points

Man, thank you so much!! That was it.

Jon Myzzle
Jon Myzzle
6,279 Points

Not a problem Jordan,

Always feel free to ask questions and somebody will be around to answer!

Additionally, don't forget to up-vote and mark best answer as well!