Using alt text for images
Alt text (alternative text) is a short, descriptive attribute added to images to improve accessibility and SEO. It ensures that screen readers can convey image content to users with visual impairments and helps search engines understand your site’s visuals.
Why alt text matters
Accessibility: Alt text allows visually impaired users to understand the purpose and content of images through screen readers.
SEO: Search engines use alt text to index images, which can drive additional traffic to your website and improve overall search rankings.
User experience: Well-written alt text provides context if images fail to load.
Writing effective alt text
Be concise and specific: Describe the image clearly, focusing on its purpose in the page's context. Keep alt text under 125–150 characters.
Front-load important information: Place the most relevant details at the beginning for quick comprehension.
Avoid redundancy: Don’t start with “image of” or “photo of”—screen readers already identify images.
Context matters: Tailor the description to the image’s role on the page. If the image is purely decorative, use an empty alt attribute (alt="").
Use relevant keywords naturally: If appropriate, include keywords that match the page’s content, but avoid keyword stuffing.
Related resources
Learn more about how alt text supports SEO in optimizing meta tags.
For tips on improving your site’s performance, see how to optimize your PageSpeed Insights score.
To track image-related engagement and user behavior, learn how to set up Google Analytics.
Explore additional strategies for improving page load speed1.
If you need help implementing or reviewing alt text, the Ycode support team is here to help.
Our support team is ready to help.