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 How to Make a Website Creating HTML Content Use the Navigation Element

Divya Vyas
Divya Vyas
205 Points

Why I am not getting hyper links and list items after clicking the Preview button ?

<!DOCTYPE html> <html> <head> <meta charset="utf-8">

     Ayushi Vyas | Traveller

    <a href="index.html">
    <h1>Ayushi Vyas</h1>




    <p>Gallery will go here</p>

  <p>&copy;2014 Ayushi Vyas</p></footer>



Kailash Seshadri
Kailash Seshadri
3,061 Points

Hello Ayushi!

Try remove all the unnecessary spaces from the html eg. between the last <li> and the closing </ul> tag and also check if the indentation is correct in all lines.... If you can can you please share a snapshot of your workspaces: If you dont know how to please check here

Thanks and Happy Coding!!

Nishant Kumar
Nishant Kumar
1,179 Points

Hi Divya

It's working very well. For instance, add url "www.google.com" instead of your "index.html" and it will work. i.e. replace <a href="index.html"> with <a href="http://www.google.com">. Let me know if it works.


1 Answer

Marie Loson
Marie Loson
795 Points

Hi Divya,

I think your question has to do with the nav menu that you created. If so, you don't have hyperlinks for your list items because you did not include an anchor element within them.

Using your code above, it would need to look something like this:

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

Hope this helps!

Hey Divya, I was inserting the Portfolio after the </a>, I referenced your question and was able to find out my problem. (Thanks to Marie!)