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

can someone tell me how I can make my paragraph a red color and a solid font with a border of 4px please.

please help

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

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

        text-align: center;
  border: 4px
  border color: red
  border element: solid

2 Answers

Jamie Reardon
.a{fill-rule:evenodd;}techdegree seal-36
Jamie Reardon
Treehouse Project Reviewer

Hi, good answer Michael however you are also missing a syntax punctuation on your code as well.

For the correct result, try this code.

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

Right you are. I didn't add the period before the class name.

Hey Brandon, there are a few things syntactically incorrect with your code. I wouldn't be alarmed by this though. As you go on through this basic course you do other HTML and CSS courses, you will type so many lines of HTML and CSS that the proper syntax will become second nature. Try this:

  border: 4px solid red;

When you are working with the border property in CSS, you can specify all the aspects of the border in a single line like above. You could also specify aspects of your border individually, but why bother when there is a convenient single-line way of doing it? If you want to read about the border property you can here: https://developer.mozilla.org/en-US/docs/Web/CSS/border

Good luck!