HTML <area> alt属性

❮HTML<area>タグ

alt属性を使用して、画像マップの各領域の代替テキストを指定します。

<map name="planetmap">
<area shape="rect" coords="0,0,82,126" href="sun.htm" alt="Sun">
<area shape="circle" coords="90,58,3" href="mercur.htm" alt="Mercury">
<area shape="circle" coords="124,58,8" href="venus.htm" alt="Venus">
</map>

定義と使用法

画像を表示できない場合、属性は領域のalt代替テキストを指定します。

このalt属性は、ユーザーが何らかの理由で画像を表示できない場合(接続が遅い、src属性のエラー、またはユーザーがスクリーンリーダーを使用している場合)に、画像の代替情報を提供します。

alt属性が存在する場合は、属性が必要ですhref


ブラウザのサポート

Attribute
alt Yes Yes Yes Yes Yes

構文

<area alt="text">

属性値

Value Description
text Specifies the alternate text for the area, if the image cannot be displayed

❮HTML<area>タグ