Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML Introduction to HTML and CSS 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!