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 trialLynn Collins
10,080 PointsCan anyone tell me what I'm doing wrong?
I keep writing this rule and the error message still shows
<!doctype html>
<html>
<head>
<p class="main-pg">My amazing website</p>
<link href="styles.css" rel="stylesheet">
</head>
<body>
<p>My amazing website</p>
</body>
</html>
class=".main-pg"
2 Answers
Dylan Glover
2,537 PointsHey Lynn, I commented on your last question, but your class declaration belongs within you <p> tag. You also dont need a "." in the class when declaring it, only when referencing it in CSS/JavaScript. Here is what challenge step 1 should look like:
<!doctype html>
<html>
<head>
<link href="styles.css" rel="stylesheet">
</head>
<body>
<p class="main-pg">My amazing website</p>
</body>
</html>
Step 2:
.main-pg {
}
And finally the paragraph styles in step 3:
.main-pg {
border: 4px solid red;
}
Good luck, and keept at it!
Dylan
Dylan Glover
2,537 PointsThis should be the only thing inside your index.html.
<!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">My amazing website</p>
that is where the class is being referenced
Dylan Glover
2,537 PointsThese both go inside styles.css
for their respective steps. Nothing else should be in there
Step 2:
.main-pg {
}
And finally the paragraph styles in step 3:
.main-pg {
border: 4px solid red;
}
Lynn Collins
10,080 PointsLynn Collins
10,080 PointsBut where does it go??????????
Lynn Collins
10,080 PointsLynn Collins
10,080 PointsWhere in the document does it go???? Before the body tag?