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 HTML Basics Going Further with HTML Links and Paths Challenge

Can anyone assist me with this code? I Greatly appreciate it.

Any assistance is appreciated.

index.html
<!DOCTYPE html> 
<html>
  <head>
    <title>Portfolio Page</title>
  </head>
  <body>
    <img src="../img/logo.png" alt="Site logo">

    <ul>
      <li><a href"#" Home>Home</a></li>
      <li><a href"#" portfolio>Portfolio</a></li>
    </ul>
    <Section>
    <h1 id="portfolio">My Portfolio</h1>
      </section>
  </body>
</html>

1 Answer

Jamie Reardon
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Jamie Reardon
Treehouse Project Reviewer

You seem to be getting your attribute syntax wrong in your element tag, for example, your anchor (a) element tag the href attribute just like any other attribute, needs to have an = sign after the attribute name then a set of double quotes and a value inside it. So it looks like so: href="value". The value for the Home link is "/" as it wants you to point the location of the href attribute to the root.

You also seem to be adding the words Home and portfolio after the href attribute, dont do this as this is incorrect. You have already defined the text in between the element opening and closing tag which is correct. You can only add attributes inside of element's opening tags.

To use an element's id in the href value, you use the # sign followed by the id name. In this challenge, it's #portfolio.

Check my answer below:

<!DOCTYPE html> 
<html>
  <head>
    <title>Portfolio Page</title>
  </head>
  <body>
    <img src="../img/logo.png" alt="Site logo">

    <ul>
      <li><a href="/">Home</a></li>
      <li><a href="#portfolio">Portfolio</a></li>
    </ul>
    <section>
    <h1 id="portfolio">My Portfolio</h1>
     </section>
  </body>
</html>