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 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,700 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.