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
Hongan Jin
Courses Plus Student 368 Pointsadding image
If <img src="cupcake.jpg"/> doesn't work, do I need to add "alt="cupcake,jpg"" in the text
3 Answers
Justin Horner
Treehouse Guest TeacherHello Hongan,
Please consider posting your code. It will be much easier to help you with this provided.
Thanks.
Abhishek Serjam
422 PointsHello Hongan,
In the image tag you need to specify the path to the image 'cupcake.jpg' which is in the 'img' folder. So the source attribute inside the img tag will be like this: img src="img/cupcake.jpg"/
Micol Bellantoni
3,061 PointsHi, you have to specify the folder whereyou saved your image. For example if your image is in a folder called images, you have to write this code
<img src="images/cupcake.jpg">
```
If you have any question, please don't exitate to ask me!
Hongan Jin
Courses Plus Student 368 PointsHongan Jin
Courses Plus Student 368 PointsI did type the code. Idk why it doesn't appear up there
Micol Bellantoni
3,061 PointsMicol Bellantoni
3,061 PointsIf you want to see your code here click on the Markdown Cheetsheet
James Barnett
39,199 PointsJames Barnett
39,199 Points>I did type the code. Idk why it doesn't appear up thereThe forum uses markdown to correctly format code, check out this thread on how to type code in the forum for some examples.