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 Add Image Gallery Content

Armando Abrahamsson
Armando Abrahamsson
1,391 Points

All of my image links keep linking me back to the index.html page (top) rather than the image itself.

Here's a line of one of the image links. I only include one since they all seem to have the same issue.

   <li>
      <a href src="img/numbers-09.jpg" alt="">
        <img src="img/numbers-09.jpg" alt="">
        <p>Dripping effect</p>
      </a>
     </li>

2 Answers

Sean T. Unwin
Sean T. Unwin
28,690 Points

Change the opening of the anchor tag to:

<a href="img/numbers-09.jpg">
Mohsin Ayub
Mohsin Ayub
6,822 Points

The anchor tag do use "src" attribute to set the location it uses "href" attribute instead