Overview - Image source and alt attribute
What is it?
The image source and alt attribute are parts of the HTML
tag. The source (src) tells the browser where to find the image file to show. The alt attribute provides a text description of the image for people who cannot see it or when the image fails to load. Together, they help display images properly and make websites accessible.
Why it matters
Without the image source, the browser wouldn't know which picture to show, so the page would look broken or empty. Without the alt text, people using screen readers or with slow connections would miss important information. This makes websites less friendly and harder to use for many people. Good use of these attributes improves user experience and accessibility.
Where it fits
Before learning this, you should understand basic HTML tags and attributes. After this, you can learn about responsive images, image optimization, and accessibility best practices in web development.
will show the picture named cat.jpg.
. This text explains the image's content.

