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 HTML Basics Images, Text and Links Understanding File Paths

Stephanie Oakes
Stephanie Oakes
8,427 Points

I'm wondering why my "home" button in my workspace is not linking back to "index.html" per the video's instructions.

I keep reviewing and following along with the video and finding that when I put the practice website to the test, my "home" button is not linking to the index.html file from the "articles" linked page. Here is my code: <html> <head> <title>Experience VR</title> </head>

<body> <div> <header> <h1>Experience VR</h1> <p>A simple blog about virtual reality experiences</p>

    <nav>
      <ul>
        <li><a href="../index.html">Home</a></li>
        <li><a href="#">About</a></li>
        <li><a href="#">Articles</a></li>
        <li><a href="#">Contact</a></li>
      </ul>
    </nav>
  </header>

  <div>
    <p>Virtual Reality is becoming well known as a form of entertainment, but it's also finding its way into fields like education, industrial design, healthcare and so much more!</p>
    <a href="https://teamtreehouse.com/vr" target="_blank">Start Your VR Journey</a>
  </div>

  <main>
    <section>
      <h2>About this Site</h2>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse vehicula metus in bibendum laoreet. Aenean libero est, egestas eu eros pretium, sodales iaculis est.</p>
    </section>

    <section>
      <h2>Latest VR Articles</h2>

      <article>
        <header>
          <h3>How Schools Use Virtual Reality to Improve Education</h3>
          <p>By: Nick Pettit</p>
        </header>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus ultrices euismod turpis eget porta. Etiam nulla massa, pretium et massa nec, ornare dignissim nisi.</p>
        <a href="articles/article.html">Read more</a>
        <footer>Published: June 12, 2017</footer>
      </article>

      <article>
        <header>
          <h3>The Advantages of VR Simulation</h3>
          <p>By: Author McAuthorFace</p>
        </header>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus ultrices euismod turpis eget porta. Etiam nulla massa, pretium et massa nec, ornare dignissim nisi.</p>
        <a href="articles/article.html">Read more</a>
        <footer>Published: June 19, 2017</footer>
      </article>
    </section>

    <section>
      <h2>Contact</h2>
      <p>Email us at coolvrexperience@gmail.com</p>
    </section>      
  </main>

  <aside>
    <h3>Top VR Resources</h3>
    <ol>   
      <li><a href="#">Learn to create educational experiences in VR</a></li>
      <li><a href="#">Virtual Reality in entertainment</a></li>
      <li><a href="#">Interact with buildings and products in VR</a></li>
      <li><a href="#">Use VR for teleconferencing and social media</a></li>
    </ol>
    <blockquote>
      "Virtual reality was once the dream of science fiction. But the internet was also once a dream, and so were computers and smartphones. The future is coming." 
      <footer>
      - <cite><a href="https://www.facebook.com/zuck/posts/10101319050523971">Mark Zuckerberg</a></cite>
      </footer>
    </blockquote>
  </aside>

  <footer>
    <p>&copy;2017 Experience VR, The Blog</p>
  </footer>
</div>

</body> </html>

thank you for your help.

2 Answers

Is your article.html in a sub folder? Articles (folder) 2017 (sub folder) article.html

if so you just need to add another ../ to your link.

 <nav>
           <ul>
             <li><a href="../../index.html">Home</a></li> 
             <li><a href="#">About</a></li>
             <li><a href="#">Articles</a></li>
             <li><a href="#">contact</a></li>
           </ul>
     </nav>
Stephanie Oakes
Stephanie Oakes
8,427 Points

Hi there, my article.html is not in a sub folder. It's in the "articles" folder. I'm really not sure what I'm doing wrong...

Stephanie Oakes
Stephanie Oakes
8,427 Points

It is working now...thank you!

You're welcome. ^_^ Glad it's working