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 Creating HTML Content Create Navigation with Lists

hi im having trouble adding links can anyone help

hi im trying to complete the exercise navigation and am stuck on links

index.html
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Nick Pettit</title>
  </head>
  <body>
    <header>
      <a href="index.html">
        <h1>Nick Pettit</h1>
        <h2>Designer</h2>
      </a>
      <nav>
        <ul><li><a href="index.html">Portfolio</a></li>
          <li><a href="About.html"></a></li>
          <li><a href="Contact.html"></a> </li>

        </ul>

        </nav>
    </header>
    <section></section>
    <footer>
      <p>&copy; 2013 Nick Pettit.</p>
    </footer>
  </body>
</html>

Hi Adam, what bit exactly are you having trouble with?

dan lematy
dan lematy
4,157 Points

here

<ul>
<li><a href="index.html">Portfolio</a></li>
<li><a href="About.html">About</a></li>
<li><a href="Contact.html">Contact</a> </li>
</ul>

Hi solved it I was not using correct syntax I made a mistake with the spelling thanks for all your replies going over the learning materials helped immensely thank you

6 Answers

Mr.adam radcliffe, Your html is not clear

<ul>
     <li><a href="index.html">Portfolio</a></li>
     <li><a href="About.html"></a></li>
     <li><a href="Contact.html"></a> </li>
</ul>

I think it should be :

<ul>
     <li><a href="#">Portfolio</a></li>
     <li><a href="#">About</a></li>
     <li><a href="#">Contact</a> </li>
</ul>  

If you want to link in the same page:

<ul>
     <li><a href="#portfollio">Portfolio</a></li>
     <li><a href="#about">About</a></li>
     <li><a href="#contact">Contact</a> </li>

</ul>

note:You have to put: <a name="about "> <div class="About "> <div class="container">
<h2 <a name="#about ">About </a></h2> </div> </div>

After then click on About button then your screen will stop on the About .elements.

I don't know what your folder structure looks like , but do you have all the pages saved in the same folder, and named correctly?

you link structure looks right , but I would check capitalization on your link names....JS

What exactly are you stuck on?

Hi,

In the following section you don't appear to have any link text for the about and contact links:

<ul><li><a href="index.html">Portfolio</a></li>
          <li><a href="About.html"></a></li>
          <li><a href="Contact.html"></a> </li>

        </ul>

You may also need to check the casing on the links themselves for this challenge. Based on them needing to be lowercase, this section would become:

<ul><li><a href="index.html">Portfolio</a></li>
          <li><a href="about.html">About</a></li>
          <li><a href="contact.html">Contact</a> </li>

        </ul>

If this is for the second stage of the challenge, please note that you don't require the anchor tags until the third stage.

Hope that helps.

-Rich

Mr.adam radcliffe, Your html is not clear <nav> <ul> <li><a href="index.html">Portfolio</a></li> <li><a href="About.html"></a></li> <li><a href="Contact.html"></a> </li>

    </ul>

    </nav>

I think it should be : <nav> <ul> <li><a href="#">Portfolio</a></li> <li><a href="#">About</a></li> <li><a href="#">Contact</a> </li>

    </ul>

    </nav>

If you want to link in the same page: <nav> <ul> <li><a href="#portfollio">Portfolio</a></li> <li><a href="#about">About</a></li> <li><a href="#contact">Contact</a> </li>

    </ul>

    </nav>

note:You have to put: <a name="about "> <div class=About> <div class="container" > <h2 <a name="#about">About </a></h2>

After then click on About nav button your screen will stop on the About .elements.