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

CSS Treehouse Club: CSS My First Web Page Introduction to My First Web Page

after giving source of image what is work of alt="name" ?

when i do make changes in alt="name". that doesn't make any changes to the result. so what alt attribute do there?

1 Answer

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,858 Points

Hey there,

alt stands for "alternative" and is used for two main reasons.

  1. Many people have auto-loading for images disabled in their browsers, so when the image doesn't load (or can't load) the "alternative text" you provide is what will be displayed instead of the image. So, the users may not see the image, but they will see what the image is about.

  2. For screen readers used by the visually impaired. A screen reader will use the "alternative text" to provide an audio description of the image.

So, both those are the reason you use the alt, and both those show why it is very important to provide a short but specific description in the alt attribute.

Hope that clears it up for you. :dizzy:

thanks a lot jason.