Building Your Learning Module...
Getting things ready for you!
Find videos you like?
Save to resource drawer for future reference!
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Alt Text Best Practices</title>
</head>
<body>
<div class="container">
<h1>🖼️ Alt Text Best Practices</h1>
<!-- Informative Images -->
<div class="category-section">
<h2>1. Informative Images</h2>
<p style="color: #6b7280; margin-bottom: 20px;">
Images that convey important information need descriptive alt text.
</p>
<div class="comparison">
<div class="example-card bad">
<h3>❌ Bad Alt Text</h3>
<div class="image-container">
<div class="placeholder-img">📊</div>
<img src="chart.png" alt="image" style="display: none;">
</div>
<div class="code-display">
<img src="chart.png" alt="image">
</div>
<p class="explanation">
"image" tells screen reader users nothing useful. What does the chart show?
</p>
</div>
<div class="example-card good">
<h3>✅ Good Alt Text</h3>
<div class="image-container">
<div class="placeholder-img">📊</div>
<img src="chart.png" alt="Bar chart showing 50% increase in sales from 2023 to 2024" style="display: none;">
</div>
<div class="code-display">
<img src="chart.png"
alt="Bar chart showing 50% increase
in sales from 2023 to 2024">
</div>
<p class="explanation">
Describes what the chart conveys. Screen reader users get the same information as sighted users.
</p>
</div>
</div>
</div>
<!-- Decorative Images -->
<div class="category-section">
<h2>2. Decorative Images</h2>
<p style="color: #6b7280; margin-bottom: 20px;">
Images that don't add information should have empty alt attributes.
</p>
<div class="comparison">
<div class="example-card bad">
<h3>❌ Bad</h3>
<div class="image-container">
<div class="placeholder-img">⭐</div>
<h4 style="margin-top: 10px;">Premium Features</h4>
</div>
<div class="code-display">
<img src="star.png" alt="star icon">
<h2>Premium Features</h2>
</div>
<p class="explanation">
Screen readers announce "star icon" and "Premium Features" - redundant!
</p>
</div>
<div class="example-card good">
<h3>✅ Good</h3>
<div class="image-container">
<div class="placeholder-img">⭐</div>
<h4 style="margin-top: 10px;">Premium Features</h4>
</div>
<div class="code-display">
<img src="star.png" alt="">
<h2>Premium Features</h2>
</div>
<p class="explanation">
Empty alt="" tells screen readers to skip the image. Clean and concise!
</p>
</div>
</div>
</div>
<!-- Functional Images -->
<div class="category-section">
<h2>3. Functional Images (Buttons/Links)</h2>
<p style="color: #6b7280; margin-bottom: 20px;">
Images that are clickable should describe the action, not the image.
</p>
<div class="comparison">
<div class="example-card bad">
<h3>❌ Bad</h3>
<div class="image-container">
<a href="#" style="display: inline-block;">
<div class="placeholder-img" style="width: 60px; height: 60px; font-size: 2rem;">🔍</div>
</a>
</div>
<div class="code-display">
<a href="/search">
<img src="icon.png" alt="magnifying glass">
</a>
</div>
<p class="explanation">
"Magnifying glass" describes the image, not what it does. Confusing!
</p>
</div>
<div class="example-card good">
<h3>✅ Good</h3>
<div class="image-container">
<a href="#" style="display: inline-block;">
<div class="placeholder-img" style="width: 60px; height: 60px; font-size: 2rem;">🔍</div>
</a>
</div>
<div class="code-display">
<a href="/search">
<img src="icon.png" alt="Search">
</a>
</div>
<p class="explanation">
Describes the action. Screen reader announces "Search, link" - perfect!
</p>
</div>
</div>
</div>
<div style="background: #fef3c7; padding: 25px; border-radius: 12px; margin-top: 40px; border-left: 4px solid #f59e0b;">
<h3 style="color: #78350f; margin-bottom: 15px;">⚡ Quick Alt Text Rules</h3>
<ul style="list-style: none; line-height: 2; color: #92400e;">
<li>✓ Describe the content/function, not the image</li>
<li>✓ Keep it concise (150 characters or less)</li>
<li>✓ Don't start with "Image of" or "Picture of"</li>
<li>✓ Use alt="" for decorative images</li>
<li>✓ Never leave alt attribute empty (no alt="")</li>
<li>✓ For complex images, provide long description nearby</li>
</ul>
</div>
</div>
</body>
</html>Loading preview...
Convey important content or information
<img src="chart.png" alt="Sales increased 50% from Q1 to Q2">Purely visual, don't add information (borders, spacers, design elements)
<img src="decoration.png" alt="">Clickable (buttons, links) - describe the action, not the image
<a href="/cart"><img src="cart.png" alt="View shopping cart"></a>Detailed (infographics, diagrams) - use short alt + long description
<img src="diagram.png" alt="Website architecture" aria-describedby="desc"> <p id="desc">Detailed description...</p>For complex images like infographics, charts, or diagrams: