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 trialArjan Blok
Courses Plus Student 1,808 PointsImages not shown as links, neither are caption below images
Hello, I've followed the course in my Workspace step by step, however my images do not show the link, nor are the captions below every image clickable? I added part of my code below? What do I do wrong? Anyone?
<a href="index.html"> <h1>Arjan Blok</h1> <h2>Projectenkoning</h2> </a> <nav> <ul> <li><a href="index.html">CV</a></li> <li><a href="ervaring.html">Projecten</a></li> <li><a href="contact">Contact </a></li> </ul> </nav> </header> <section> <ul> <li> <a href="images/numbers-01.jpg"> <img src="images/numbers-01.jpg" alt=""> <p>gewoon ff proberen ouwe!</p> </a> </li> <li> <a href="images/numbers-02.jpg"> <img src="images/numbers-02.jpg" alt=""> <p>gewoon ff proberen ouwe!</p> </a>
3 Answers
Steven Parker
231,275 PointsUsing the code above, the images do appear as links, so everything looks good. Perhaps the problem is not in this part of the code?
Reggie's suggestion about checking the folder name for the images is a good idea, but I'm not sure it explains what you are seeing. If the folder is wrong, the images just will not appear (most browsers will substitute a little placeholder symbol for them), but the link substitute and the caption should still be clickable.
Is there perhaps some JavaScript and/or CSS that goes with this HTML code that may be causing the difference?
Arjan Blok
Courses Plus Student 1,808 PointsThank you for your effort, I will try your suggestions. Can it also has anything to do perhaps with the browser? I use Firefox.
Arjan Blok
Courses Plus Student 1,808 Points@Steven Parker & @Reggie Sibley, just solved it with your help, tnx! I indeed changed the folder into img and changed the location in code/index.html accordingly and now the captions/txt below the images changed into links?! I didn't quite expect that behaviour, but I worked!
Reggie Sibley
6,018 PointsNo problem Arjan glad i could help :)!
Reggie Sibley
6,018 PointsReggie Sibley
6,018 PointsHi Arjan Blok!
It appears to me that your file location is wrong (assuming you are following the course) your pictures should be located within the "img" folder not the "images" folder you have entered, so they browser is not able to locate those images. Try switching it around, and hopefully this helps.