alt

object alt extends Attr

img - This attribute defines the alternative text describing the image. Users will see this text displayed if the image URL is wrong, the image is not in one of the <a href="#Supported_image_formats">supported formats</a>, or if the image is not yet downloaded.

Browsers do not always display the image referenced by the element. This is the case for non-graphical browsers (including those used by people with vision impairments), if the user chooses not to display images, or if the browser cannot display the image because it is invalid or an <a href="#Supported_image_formats">unsupported type</a>. In these cases, the browser may replace the image with the text defined in this element's <code>alt</code> attribute. You should, for these reasons and others, provide a useful value for <code>alt</code> whenever possible.

Omitting this attribute altogether indicates that the image is a key part of the content, and no textual equivalent is available. Setting this attribute to an empty string (<code>alt="")</code> indicates that this image is <em>not</em> a key part of the content, and that non-visual browsers may omit it from rendering. area - A text string alternative to display on browsers that do not display images. The text should be phrased so that it presents the user with the same kind of choice as the image would offer when displayed without the alternative text. In HTML4, this attribute is required, but may be the empty string (""). In HTML5, this attribute is required only if the <strong>href</strong> attribute is used.

trait Attr
class Object
trait Matchable
class Any

Type members

Classlikes

object tag extends TagElement

Types

Inherited types

type supports[T <: Tag] = AttrPair[attrType] => AttrPair[tagType]
Inherited from
Attr

Value members

Concrete methods

@inline
def :=(v: String): AttrPair[_alt_attr]
@inline
def :=(v: Option[String]): OptionalAttrPair[_alt_attr]