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 Adding a Style to several Elements using Class

does any one know how to solve this problem ?

does any one know how to solve this problem ?

index.html
<!doctype html>
<html>
  <head>
    <title>List Example</title>
    <link rel="stylesheet" href="styles.css">
  </head>
  <body>

    <a class="#social links"Follow me on Twitter!</a>
    <a class="#social links"Send me an Email!</a>

  </body>
</html>
styles.css

2 Answers

Steven Parker
Steven Parker
221,295 Points

It looks like you mistyped the class name.

The challenge asked you to add the class "social-links" (with a hyphen), but you wrote "#social links" (with a "#" and a space) instead.

It also appears that you erased the href attributes and the closing ">" symbol of the tags.

Try again, and be careful not to remove anything as you add the class attributes with the correct name.

Matthew Tran
Matthew Tran
16,343 Points

To assign a class, it only has to go inside the quotes. It does not need the # symbol. Also, they should be one string without spaces, so you would need a dash or underscore.

Also, your anchor element isn't being closed properly. Typically, links look like this: <a></a> or <a href="www.facebook.com">Follow Me on Facebook</a>

Your code should look as below:

<a class="social-links">Follow me on Twitter!</a>
<a class="social-links">Send me an Email!</a>
Steven Parker
Steven Parker
221,295 Points

Actually, no. That would still be removing the provided attributes. And it must be a dash in the name for the challenge to accept it.