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 Build a Simple Website Text Editors and HTML Images and Lists

I am blocked at this 2 to 4 task : placing an image into a body

I typed this <body> <img src=¨img/cupcake.jpg¨ alt= ¨cupcake¨>

</body>

Is it because this file does not exists on my computer? Thanks

8 Answers

code is not showing but usually syntax is the issue. Double check your syntax and make sure its in the proper element of the html page.

Should look something like this

<img src="foldername/picture.jpg" alt="whatever text here">

(hint: foldername aka directory)

Ok I got it, but whats weird is that they say they put in the folder of the tutorial this image, and actually it s not on it ! So should I rename an image with that name?

Nick I reused what you typed and rewrite into your code, and it worked out !! Thanks <body> <img src="img/cupcake.jpg" alt="whatever text here">

</body>

cool beans grats!

The code you typed didn't make it into your post. Can you edit your posting and put in the code you have so far?

Since you're in a code challenge you wouldn't need to have the image they are referring to on your computer.

Conrad Beach
Conrad Beach
24,063 Points

Your code didn't show up in your post. Try posting it again.

Whether or not the file exists on your computer won't affect how the code runs in the challenge. Double check your syntax for the image tag.

Ok, so I had to do this : We've placed an image named 'cupcake.jpg' in a directory named 'img'. Add the image to the body of the document.

My idea was to do this :

<body> <img src = ¨img/cupcake.jpg¨> </body>

It s not working ...

Got my code that time?

Ok, so I had to do this : We've placed an image named 'cupcake.jpg' in a directory named 'img'. Add the image to the body of the document.

My idea was to do this :

<body> <img src = ¨img/cupcake.jpg¨> </body>

It s not working ...

Got my code that time?

It seems that they haven´t places this image named cupcake.jpg, I can't find it in the folder they asked me to download. So dontknow what to do....

What you download is not linked with the code challenge. They are simply simulating that you have the files and folders needed to complete the challenge. All you are worried about is the code.

Ok that s what I thought ! So it s definitely weird ! :)