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

I can't get the img to go while I'm taking the quiz.

How do you code an image? Cause apparently I'm doing it wrong. I tried doing <img src="cupcake.jpg" alt=""/> and nothing happens! What am I doing wrong? I reallyl want to finish the quiz!

4 Answers

<img src="image.png" />

It still says that I'm doing something wrong. It says "Double check your image path."

Karen Yeung
Karen Yeung
5,889 Points

You need to identify where your image is located. So if it is in the img folder you will have to put it as such:

<img src="img/image.png">
Karen Yeung
Karen Yeung
5,889 Points

You need to identify where you image is located. For example, if it is in the 'img' folder you would type in: <img src="img/image.png">

Jeremy Smith
Jeremy Smith
1,395 Points

You may want to try removing the trailing forward slash (/) as it's not needed in HTML5 plus you're missing the alt="" and title="" parts.

Hope this helps? Jeremy.

PS the trailing slash is used in XHTML for web standards as far as I know.

Thanks so much guys! I got that cleared up! Now I'm having trouble listing things in an unordered list! haha.

Jeremy Smith
Jeremy Smith
1,395 Points

That response made me smile :)

Aww best of luck with them though, you'll do fine! Taking notes on this stuff can help massively though! Helped me anyway and I have been working with HTML since I was... well really young. Learnt the hard way so to speak.