HTML <img> alt Özelliği

❮ HTML <img> etiketi

Örnek

Belirtilen alternatif metne sahip bir resim:

<img src="img_girl.jpg" alt="Girl in a jacket" width="500" height="600">

Tanım ve Kullanım

Gerekli altöznitelik, resim görüntülenemiyorsa, resim için alternatif bir metin belirtir.

Öznitelik , altbir kullanıcı herhangi bir nedenle görüntüleyemiyorsa (yavaş bağlantı, srcöznitelikteki bir hata veya kullanıcı bir ekran okuyucu kullanıyorsa) resim için alternatif bilgiler sağlar.

İpucu: Bir resim için araç ipucu oluşturmak için titleözniteliği kullanın!


Tarayıcı Desteği

Attribute
alt Yes Yes Yes Yes Yes

Sözdizimi

<img alt="text">

Özellik Değerleri

Value Description
text Specifies an alternate text for an image.

Guidelines for the alt text:

  • The text should describe the image if the image contains information
  • The text should explain where the link goes if the image is inside an <a> element
  • Use alt="" if the image is only for decoration

❮ HTML <img> etiketi