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

adding image

If <img src="cupcake.jpg"/> doesn't work, do I need to add "alt="cupcake,jpg"" in the text

3 Answers

Justin Horner
STAFF
Justin Horner
Treehouse Guest Teacher

Hello Hongan,

Please consider posting your code. It will be much easier to help you with this provided.

Thanks.

I did type the code. Idk why it doesn't appear up there

If you want to see your code here click on the Markdown Cheetsheet

> I did type the code. Idk why it doesn't appear up there

The forum uses markdown to correctly format code, check out this thread on how to type code in the forum for some examples.

Hello 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"/

Hi, 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!