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 trialp siddhu
268 Points<a href="img/numbers-06.html .jpg"> <img src="img/numbers-06.html.jpg" alt""> this is righ
this code was wrong pls tell me right answer
1 Answer
Matthew Smart
12,567 PointsAn anchor tag cannot link to an image like you are trying to.
<a href="img/numbers-06.html .jpg"> - incorrect
<a href="another-page.html"> - correct (example page)
You have linked to the image correctly as seen:
<img src="img/numbers-06.html.jpg" alt"">
Although you have got the file name messed up i assume, as you have put .html.jpg. It should just be img/numbers-06.jpg
However, it is advised that you get into the habit of putting relevant alt descriptions on your images for SEO purposes.
Also, just in case you do not know, an anchor link needs to be closed. see below example:
<a href="another-page.html">
<img src="img/numbers-06.html.jpg" alt"releveant alt description here" width="50" height="50">
</a>