Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

accessibility
empathy
seo
communitycreator

Why you should care about the alt attribute on images

Chiamaka Ikeanyi

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

When you design applications with empathy, you are a happy developer if you don’t leave anyone behind.

The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.” - Tim Berners-Lee

Always add the alt attribute to non-decorative images. If a user cannot view images on a website, the alternative text provides information about the images.

Adding descriptive text in the alt attribute is also important to boost your website’s visibility on Google Search Engine as web crawlers use it to understand image content. Always add a full stop (.) at the end of the text to improve accessibility. To clearly understand the role of a full stop, try reading a sentence without punctuation marks.

Adding a description using alt

<img src="linkToImage.png" alt="A descriptive text." />

Decorative images should have an empty alt attribute:

<img src="heroImage.png" alt="" />

RELATED TAGS

accessibility
empathy
seo
communitycreator

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring