Definition
Alt Text is the alternate text description declared inside the alt attribute of an image tag.
Why It Matters
It is the core requirement of web accessibility (A11y) and image SEO, allowing screen readers to describe images.
Core Concepts
src: URL of the image file (required).alt: Descriptive alternative text (required for accessibility).
<img src="mountain-sunset.jpg" alt="A vibrant orange sunset over snow-capped mountain peaks">
width/height: Reserve layout space before download to prevent layout shift.- Decorative Images: Use
alt=""so screen readers skip them. <figure>/<figcaption>: Group image with caption for semantic association.- Formats: GIF, JPEG, PNG, SVG, WebP—each with different tradeoffs.