Alt Text
The text attribute on an <img> tag (alt="...") that describes the image for screen readers and search engines.
Alt text, short for "alternative text," is the descriptive text you add to an <img> tag in HTML using the alt attribute, written as alt="your description here". It serves two equally important purposes: accessibility and SEO.
For accessibility, alt text is read aloud by screen readers like JAWS, NVDA, and VoiceOver, allowing blind and low-vision users to understand the content and purpose of images on a page. The W3C Web Content Accessibility Guidelines (WCAG 2.2, success criterion 1.1.1) require non-text content to have a text alternative, making alt text a legal and ethical requirement for public-facing websites in most jurisdictions.
For SEO, alt text helps search engines understand what an image depicts, which improves the page's chances of ranking in Google Images (which accounts for roughly 22% of all web searches per SparkToro's 2024 data) and contributes to the page's overall topical relevance. Google's image search documentation explicitly states that good alt text is a key ranking factor for image search results.
Best practices: write 5-125 characters, describe the image's purpose in context, avoid starting with "image of" or "picture of" (screen readers already announce it as an image), and use alt="" (empty string) for purely decorative images to signal "skip this, it's ornamentation." Avoid keyword stuffing ("SEO SEO best SEO practices") — Google has penalized stuffed alt text since the 2007 Florida update era. Per WebAIM's 2024 survey of the top 1 million homepages, 31.3% of images have alt text issues — either missing, empty, or uninformative.