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

about the task 2

I was reading: We've placed an image named 'cupcake.jpg' in a directory named 'img'. Add the image to the body of the document. I got kind of confused about the directory???? What does it mean when you put an image in a directory and give it a name? the code I wrote is: <img src= "cupcake.jpg" alt="img"> I am not sure about the alt part, and the system keeps telling me I wrote it wrong.

2 Answers

Okay, I'm not seeing any code but I can answer the rest of your questions. When you hear the term 'directory' it is referring to your folder structure of the site. If your index.html page is located on the root of your site, then you would have a folder named 'img' (also known as a directory) where you would have your image assets located. The 'alt' attribute of an image tag is used for providing additional information for those that might not be able to see the image. Whether it is due to physical disabilities or your image might not have been loaded correctly. It is always good to use 'alt' attributes to remain ADA (Americans with Disabilities Act) compliant.

ohhhhhhh, I got it!. Thank you so much, :)

ohhhhhhh, I got it!. Thank you so much, :)

No problem.