Answered by
Oliver Hall
Image alt text, also known as "alt tags" or "alt descriptions," is a crucial aspect of website optimization, especially concerning SEO (Search Engine Optimization). Here are some best practices for using image alt text effectively:
<img src="puppy.jpg" alt="A brown puppy playing with a ball">
<!-- Good --> <img src="seo-tips.jpg" alt="SEO tips and strategies"> <!-- Bad --> <img src="seo-tips.jpg" alt="SEO SEO SEO SEO SEO">
<input type="image" src="submit.png" alt="Submit Form">
Keep it short but meaningful: While there's no specific length limit for alt text, it's generally recommended to keep it under 125 characters since screen reading tools typically stop reading alt text after this point.
Don't use 'image of,' 'picture of,' etc.: Screen-reading tools already announce an image, so it's redundant and unhelpful to include phrases like these in your alt text.
Leave alt text empty for decorative images: If an image is purely decorative and does not contain information, context, or functionality, you should use an empty alt text (i.e., alt=""
).
<img src="decorative-border.png" alt="">
Remember, the goal of alt text is to make content accessible and improve your site's SEO. Thus, it's essential to strike a balance between these two objectives while adhering to these best practices.