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!
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
jerimiah gibbons1,811 Points
what am i doing wrong?
i cant figure out how to get past the part where your supposed to add 'cupcake.jpg'
To add an image with html you would use
in your index.html file.
If this image is in a folder (called img in this case) and that folder is in the same location as your index.html file you would need to use
That's the basics of adding an image, it can get a little more complicated depending on where the image is in relation to the html file. Check out this article for a good explanation on file paths.
Hope this helps if not please post your code so we can take a look :)
Larry Goodhue4,246 Points
<img src="img/cupcake.jpg" width="[insert width here]" height="[insert height here]" alt="Cupcake">
Like James said, we would appreciate if you would share your code so we can identify the problem further. :)