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 trialGamingWithHan :)
Java Web Development Techdegree Student 1,966 PointsI don't understand how to do this challenge.
I don't understand where to add the class main-pg
<!doctype html>
<html>
<head>
<link href="styles.css" rel="stylesheet">
</head>
<body>
<p>My amazing website</p>
</body>
</html>
1 Answer
Daniel Gauthier
15,000 PointsHey Henry,
Classes are added to tags using the class attribute, so the first step of the challenge is asking for you to accomplish this by adding a class attribute to the paragraph element (it's also called a paragraph tag if that's what is causing confusion for you.
To complete this step, just turn this part:
<p>My amazing website</p>
into this:
<p class="main-pg">My amazing website</p>
Notice that we added the class attribute (left side of the equals sign) with a value of "main-pg" (right side of the equals sign) to the paragraph element. This way we'll be able to style the paragraph by targeting its class in the style.css in later steps.
Good luck with the course!
Alexander Davison
65,469 PointsI really like your nice and simple answer, so you get an upvote from me. :) ~Alex
Mike Mitchell
Courses Plus Student 27,026 PointsMike Mitchell
Courses Plus Student 27,026 PointsHey Henry, The challenge is asking you to add it to the paragraph tag. Think of a written page. Paragraphs make up the body of the content. In the example, it's not much of a paragraph. Just a sentence. Add that class right after the opening paragraph tag. Mike