on the
Lynx web browser, displaying the text of the alt attribute in orange in place of the images The text in the alt attribute is used to replace the image when the image cannot be loaded, without changing the intended meaning of the page's contents. The W3C's web content accessibility guidelines state that the alt attribute is used to convey the meaning and intent of the image, rather than being a literal description of the image itself. For example, an alt attribute for an image of an institution's logo should convey that it is the institution's logo rather than describing details of what the logo looks like. The alt attribute is intended to be used for short and concise descriptions of the image. Longer descriptions can be given using the longdesc attribute, which provides more detailed information and complements but does not replace the alt attribute. A text-based web browser such as
Lynx will display the alt text instead of the image (or will display the value attribute if the image is a
clickable button). A graphical browser typically will display only the image, and will display the alt text only if the user views the image's properties, or has configured the browser not to display images, or if the browser was unable to retrieve or to decode the image. The use of descriptions in the alt attribute improves search engine optimization and allows image-specific search engines, such as
Google Images, to search for and display relevant images that are used on websites in search results. For non-image search results, the text within the alt attribute is read by search engines the same way that regular text on the page is read. The W3C recommends that images that convey no information, but are purely decorative, be specified in
CSS rather than in the HTML markup. If decorative images are rendered using HTML that do not add to the content and provide no additional information, then the W3C recommends that a blank alt attribute be included in the form of alt="". This makes the page more navigable for users of screen readers or non-graphical browsers by skipping over images that do not convey any meaning. If no alt attribute has been supplied, then browsers that cannot display the image will not overlook the image but instead will read or display the URL or another identifying marker. This creates ambiguity since the user is generally unable to determine from a bare reading of a URL if the image is relevant to the text or if it is a purely decorative element of the webpage. A 2021
Google Lighthouse audit showed that 27% of alt text attributes audited were empty, despite the fact that the majority of those images were non-decorative informational images. ==Lawsuits==