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

Prateek Pant
Prateek Pant
1,238 Points

For some reason, when i click on the hyperlink or image it doesn't open the image and instead gives a 404 error.

Everything else mirror the lesson besides the same indentation pattern

1 Answer

Austin Whipple
Austin Whipple
29,725 Points

Hi Prateek,

In general, a 404 when clicking on a link suggests the URL you're using in the href="" attribute is invalid or doesn't exist. I'd recommend double checking the spelling of everything and making sure relative paths (../my-image.jpg or /my-image.jpg) are accurate to the location of the file you're editing.

Without seeing the code in question, it's difficult to be more precise. You can either paste your code into your question or share your entire workspace to help the community members troubleshoot more precisely.