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.

WordPress How to Build a WordPress Blog Without Coding Working with Media in WordPress How to Add Image Galleries to a Post

Dotoria Corny
Dotoria Corny
1,867 Points

What is the importance of Alt text?

where does it show? I don't see anything. Can I just put only title and caption?

2 Answers

Joseph Anastos
Joseph Anastos
17,755 Points

This is important for two reasons. First, sometimes an image might get blocked for whatever reason and not display so the text can explain what is supposed to be there. But more importantly, for those with visual disabilities the screen reader can explain what is on the page and it makes your site more accessible.

Dotoria Corny
Dotoria Corny
1,867 Points

Alt text is for when hover the mouse over the pic, it'll have the text we type at Alt text box?

Joseph Anastos
Joseph Anastos
17,755 Points

Alt text is normally used only for accessibility when the image cannot be displayed or if the person is visually impaired. If the image is working normally the alt text will not show. Are you trying to create hover text or are you just trying to understand the function of alt text?

Dotoria Corny
Dotoria Corny
1,867 Points

I try to understand what Alt text is and you clear me now, thank you

It will not show when everything's alright! that's why I don't see it's important, but I just know from you that it has to be there for reason ^^ thanks

Joseph Anastos
Joseph Anastos
17,755 Points

No problem, my pleasure. If you don't have any more questions you can mark my answer as best answer which should show it as solved. If you have any other questions always feel free to ask. Have a great rest of the day and good luck on your coding journey!

In addition to what has already been mentioned, the ALT text also helps with Search Engine Optimisation. Search engines like Google cannot identify the content of an image visually like we are able to with our eyes. Instead they read the ALT text which is interpreted as key words