--- url: "https://www.w3.org/WAI/WCAG22/Techniques/html/H37" titulek: "H37: Using alt attributes on img elements | WAI | W3C" h1: "Technique H37:Using alt attributes on img elements" popis: "" jazyk: "en" kanonicka: "" drobecky: [] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-14 03:49:48" znaku: 2443 slov: 362 kodovani: "utf-8" sha256: "954f862548e8c42e58da8563f0c5cb80eb4b28478b6bdfbb438fc94fdc12066e" --- # Technique H37:Using `alt` attributes on `img` elements ## About this Technique This technique relates to [1.1.1 Non-text Content](https://www.w3.org/WAI/WCAG22/Understanding/non-text-content) (**Sufficient**). This technique applies to images used within HTML documents. Techniques are examples of ways to meet Web Content Accessibility Guidelines (WCAG). They are **not required** to meet WCAG. Content can satisfy the normative requirements of WCAG even if it does not use any of the documented techniques. See [About WCAG Techniques](https://www.w3.org/WAI/WCAG22/Techniques/about). ## Description When using the `img` element, specify a short text alternative with the `alt` attribute. Note. The value of this attribute is referred to as "alt text". When an image contains words that are important to understanding the content, the alt text should include those words. This will allow the alt text to play the same function on the page as the image. Note that it does not necessarily describe the visual characteristics of the image itself but must convey the same meaning as the image. ## Examples ### Example 1 An image on a Website provides a link to a free newsletter. The image contains the text "Free newsletter. Get free recipes, news, and more. Learn more." The alt text matches the text in the image. ``` Free newsletter. 
 Get free recipes, news, and more. Learn more. ``` ### Example 2 An image on a website depicts the floor plan of a building. The image is an image map with each room an interactive map area. The alt text is "The building's floor plan. Select a room for more information about the purpose or content of the room." The instruction to "select a room" indicates that the image is interactive. ## Related Resources *No endorsement implied.* - [HTML - `img` element](https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element) . - [HTML - `alt` attribute](https://html.spec.whatwg.org/multipage/embedded-content.html#attr-img-alt) . - [HTML - Requirements for providing text to act as an alternative for images](https://html.spec.whatwg.org/multipage/images.html#alt) . ## Tests ### Procedure 1. Examine each `img` element in the content. 2. Check that each `img` element which conveys meaning contains an `alt` attribute. 3. If the image contains words that are important to understanding the content, the words are included in the text alternative. ### Expected Results Checks #2 and #3 are true. Back to Top