Communities

(DEV) Codidact Meta
(DEV) Codidact Meta
(DEV) Writing
(DEV) Writing
Proposals
Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Post History

#1: Initial revision by (deleted user) · 2021-01-01T05:17:30Z (about 4 years ago)
How to write good alt text
<h3 id="what-is-alt-text-and-why-should-i-care-about-it-">What is alt text and why should I care about it?</h3>
<p>Alt text, or an image description, is what shows up in place of an image when that image fails to load. It&#39;s also what a screen reader will read out when someone is using a screen reader to browse the site, as well as what search engines and feeds display. With that in mind, it&#39;s an important part of <a href="https://webaim.org/">web accessibility</a> to include good alt text.</p>
<h3 id="how-do-i-write-good-alt-text-">How do I write good alt text?</h3>
<p>Everything depends on the context of the image, but there are a few basic guidelines to keep in mind.</p>
<ul>
    <li><p><strong>The alt text should serve the exact same purpose as the image</strong></p>
        <p>When you&#39;re using an image, it&#39;s almost always to serve a purpose. Whether that&#39;s for demonstration, or to show an example, you&#39;re including an image for a reason.
            The alt text should serve the exact same purpose in your post as the image. Anything that&#39;s important and <em>relevant to your post</em> that&#39;s contained in your image should also be contained in the alt text.</p>
    </li>
    <li><p><strong>Don&#39;t include unnecessary or redundant details</strong></p>
        <p>If you&#39;ve already stated something in the text of your post, there&#39;s usually no need to repeat it in the alt text.
            Don&#39;t get bogged down trying to include <em>every bit of detail</em> in the image. Only include whatever details from the image are actually relevant to your post - focus on the important parts.</p>
    </li>
</ul>
<p>As a general rule, if it would be theoretically possible for you to entirely replace your image with the alt text, without your post losing usefulness or clarity, you&#39;re good to go. </p>