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 How to Make a Website Creating HTML Content Add Social Media Links

Help with code challenge

So it says I need to add the alt text to the twitter image. This is what I am typing:

<img src="img/twitter-wrap.png"> alt="Twitter Logo">

Isn't "Twitter Logo" the alt text? What am I missing?

3 Answers

Tommy Gebru
Tommy Gebru
30,164 Points

Here is Nick's code :

       <a href="http://twitter.com/nickrp">
<img src="img/twitter-wrap.png" alt="Twitter Logo" class="social-icon">
</a>
Tommy Gebru
Tommy Gebru
30,164 Points

Here you can see the alt text describe the code before it, almost in plain english, this is just a straightforward way of knowing what your image is inside your text editor, when reading code :-)

Tommy Gebru
Tommy Gebru
30,164 Points

Alt or alternative text is in addition to src or source and href or hyperlink reference, to describe the html element.

Right. I typed that into the original post, but only the last part showed up. Assuming that the img src is correct, does the alt text look correct as well?

alt="twitter logo">

Tommy Gebru
Tommy Gebru
30,164 Points

Select Best Answer to close out the discussion