Most current browsers display the content of the alt attribute of an <img> tag only when the image itself is not displayed.
Note: To show a text value in a tooltip when you move the pointer over an image, use the title attribute instead.
By default, if you do not provide alt text for an image, DITA2Go includes an empty alt value, to satisfy validators. To omit empty alt attribute values:
[Graphics] ; AllowEmptyAlt = Yes (default) or No, omit empty alt attributes. AllowEmptyAlt = No
You can specify a value for the <img> tag alt attribute in any of the following ways:
Include the text in a paragraph
Insert the text with a PI marker
Assign the text to the graphic file.
Include the text in a paragraph
To use a dedicated paragraph format for alternate text, place a paragraph containing the text in your DITA document, just before the <image> tag, and assign the following properties to the paragraph format:
[HtmlStyles] AltParaFmt = Alt Delete
The Delete property prevents the alternate text from appearing as part of the HTML output. See §34.2.2 Using special paragraphs to assign WAI image attributes.
Insert the text with a PI marker
To provide alternate text with a PI marker, insert a PI marker of type GraphAlt in your DITA document, just before the <image> tag. The content of the GraphAlt PI marker becomes the value of the alt attribute for the next image. See §34.2.3 Using a PI marker to assign WAI image attributes and §38.3 Adding attributes with PI markers.
Assign the text to the graphic file
To assign alternate text to the graphic file (for example):
[GraphALT] ; Graphic file name (with or without extension) = desired alt tag ch01f853.gif = Schematic of tuner