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 trialKaren Rae
1,963 PointsCupcakes Code Challenge 5-5
Something's supposedly not correct with my alternate text here but I can't see what ...<img src="img/featured-cupcake.jpg" alt"Avocado Chocolate Cupcake">
7 Answers
Charles Gray
19,470 Pointswhat does the challenge ask for?
Karen Rae
1,963 PointsI have correctly added an image <img src="img/featured-cupcake.jpg"> and the next step is to add the alternate text "Avocado Chocolate Cupcake" to the image tag I just added. When I add as above i get the response "Bummer! Did you add an 'alt' attribute to your image?" I have tried adding a space after the alt but then get that my alternate text isn't quite right ...
Matthew Mascioni
20,444 PointsHi Karen,
Are you sure you're forming the rest of your 'img' tag properly? To define alternate text, make sure your 'img' tag is set up as follows:
<img src="path/to/img.png" alt="Alternate Text" />
In this situation, "Alternate Text" would be replaced with "Avocado Chocolate Cupcake".
Could you post the code that's giving you the error?
Karen Rae
1,963 Points<img src="img/featured-cupcake.jpg" alt "Avocado Chocolate Cupcake">
Matthew Mascioni
20,444 PointsPress space four times before pasting the code :)
marsha spell
Courses Plus Student 5,555 Pointsi'm having the same problem
Matthew Mascioni
20,444 PointsSorry to hear that! Could you post the code (press space four times before pasting) that's giving you an error?
Karen Rae
1,963 Points<img src="img/featured-cupcake.jpg" alt"Avocado Chocolate Cupcake">
Matthew Mascioni
20,444 PointsSeems to still not be formatting properly. Could you paste the code into a Gist, and post the URL for it here?
Karen Rae
1,963 PointsI had another go just typing straight into the forum but still no go? Matthew, I don't know what a Gist is!
Matthew Mascioni
20,444 PointsAre you sure you're pressing [Space] four times before pasting your code in? It's required, or else your code won't show up.
Karen Rae
1,963 Points<img src="img/featured-cupcake.jpg" alt"Avocado Chocolate Cupcake">
Karen Rae
1,963 PointsYes! I'm sure!
James Barnett
39,199 PointsFor HTML/CSS/JS an interactive code playground like codepen is a better solution for troubleshooting instead of a static file like a gist.
Matthew Mascioni
20,444 PointsGreat idea :)
Karen Rae
1,963 Points<img src="img/featured-cupcake.jpg" alt"Avocado Chocolate Cupcake">
Karen Rae
1,963 PointsHumility prevails ... My young son just came home & typed in an = sign after alt ... and I'm through! Thanks everyone for your time!