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 How to Make a Website Adding Pages to a Website Build the Contact Page

Eric Brackett
Eric Brackett
1,470 Points

Classes aren't being recognized

Hey everyone,

I'm having a bit of trouble with this code and I'm not sure why. For some reason, my class links aren't working. The word "class" isn't red and it shows up on my preview page as if were a paragraph or something.

I first noticed when I typed the contact class and decided to test it out since it wasn't red and sure enough, it didn't work. I tried doing the same with the phone number and the class still didn't register

Here's a snippet of my code below:

<section> <h3>General Information</h3> <p>I am currently looking for work. Please, contact me if you're interested in design work</p>

      <p>Please only use phone contact for urgent inquries. </p>
  </section>
  <section>
    <h3>Contact details</h3>
      <ul> class="contact-info">
        <li>class=phone"</li>

    </ul>
  </section>

Exactly. The right version of yours would be:

<section>
    <h3>Contact details</h3>
    <ul class="contact-info"> 
        <li class="phone"></li>
    </ul>
  </section>

2 Answers

andren
andren
28,558 Points

The class name has to be typed within the starting tag of the element, not between the starting tag and ending tag.

Correct example:

<p class="some-class"></p>

Incorrect example

<p>class="some-class"</p>
Eric Brackett
Eric Brackett
1,470 Points

Thanks, everyone. That solved it!