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 trialChandler C
6,662 PointsI need help for the third time this week I am sorry
In the CSS file, create a rule for the .main-pg class. You don't need to write any style instructions yet.
Bummer! You need to include a dot (to indicate a class) followed by "main-pg" (without quotes) when specifying your CSS rule.
I tried to put a ''dot''; what I interpret as a period in several places. None have worked.
<!doctype html>
<html>
<head>
<link href="styles.css" rel="stylesheet">
</head>
<body>
<p class="main-pg"> My amazing website</p>
</body>
</html>
<p class="main-pg">
1 Answer
Jennifer Nordell
Treehouse TeacherHi there! It seems like you're getting your html and your css confused a bit. What you have in the css file is code for an html paragraph. Here's what it needs:
.main-pg {
}
We "select" a class by putting a dot in front of the name in our css. Then we add an opening and closing curly braces. Any styling such as background-color, color, font-size etc will go inside the curly braces. Hope this helps!