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

Text Editors & HTML course > Code Challenge > 'Images and Lists'

Alright so here's my code: <img src="img/logo.gif" alt="Smells Like Bakin">

It is working in a separate web editor, but when I use within the interface of the challenge it says the image path isn't correct and displays a broken image.

What am I doing wrong?

6 Answers

James Barnett
James Barnett
39,199 Points

@Joyia - We can't see your code.

Remember to indent each line of code by 4 spaces so it is properly formatted by the forum.

Oh sorry but I think I see what I did wrong. Instead of putting cupcake.jpg, I did what was done in the tutorial vid and put logo.gif.

Thanks for responding James.

For some reason, putting the code in its correct formatting makes it invisible in the forum.

James Barnett
James Barnett
39,199 Points

@Joyia - There's actually 2 ways to format code for so it the forum formats it properly. You can use 3 backticks on their own line on each side of the code. The backtick is on the key to the left of the one key on the keyboard.

Example:

<img src="cupcake.jpg" alt="cupcake">

Got it! Thanks James.

James Barnett
James Barnett
39,199 Points

@Joyia - My advice is don't follow the videos too closely. They are meant descriptive not prescriptive.

Don't get tripped up by variable names and other stuff that differs between the videos and the code challenges, they aren't meant to match perfectly.