HTML alt Attribute
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
အကြောင်းတစ်ခုခုကြောင့် အသုံးပြုသူတစ်ဦးက ၎င်းကို မကြည့်နိုင်လျှင် (alt attribute သည် ပုံတစ်ပုံအတွက် အခြားအချက်အလက်များကို ပေးဆောင်သည် (ချိတ်ဆက်မှုနှေးကွေးခြင်း၊ src ရည်ညွှန်းချက်တွင် အမှားအယွင်းတစ်ခုကြောင့် သို့မဟုတ် အသုံးပြုသူသည် မျက်နှာပြင်ဖတ်ကိရိယာကို အသုံးပြုပါက)။
မှတ်ချက်- <img> ဒြပ်စင်အတွက် alt attribute လိုအပ်သည်။
မှတ်ချက်- <input> ဒြပ်စင်များအတွက်၊ alt attribute ကို <input type="image"> ဖြင့်သာ အသုံးပြုနိုင်ပါသည်။
အကြံပြုချက်- ပုံတစ်ပုံအတွက် ကိရိယာအကြံပြုချက်တစ်ခု ဖန်တီးရန်၊ ခေါင်းစဉ် attribute ကို အသုံးပြုပါ။
တွေပေါ့။
alt attribute ကို အောက်ပါဒြပ်စင်များတွင် အသုံးပြုနိုင်ပါသည်။
ဒြပ်စင် | ဂုဏ်ရည် |
---|---|
<ဧရိယာ> | alt |
<img> | alt |
<input> | alt |
ဥပမာများ
ဧရိယာဥပမာ
နှိပ်နိုင်သောနေရာများပါရှိသော ရုပ်ပုံမြေပုံတစ်ခု၊
<img src="planets.gif"
width="145" height="126"
alt="Planets"
usemap="#planetmap">
<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>
Img ဥပမာ
အလှည့်ကျ စာသားပါသော ရုပ်ပုံတစ်ပုံကို သတ်မှတ်ထားသည်-
<img src="smiley.gif" alt="Smiley face">
ထည့်သွင်းဥပမာ
တင်သွင်းရန်ခလုတ်ကို ကိုယ်စားပြုသည့် ပုံပါရှိသော HTML ဖောင်ပုံစံ
<form action="/action_page.php">
First name: <input type="text" name="fname"><br>
<input type="image" src="submit.gif" alt="Submit" width="48" height="48">
</form>
Browser ပံ့ပိုးမှု
alt
ရည်ညွှန်းချက်တွင် ဒြပ်စင်တစ်ခုစီအတွက် အောက်ပါဘရောက်ဆာ ပံ့ပိုးမှုပါရှိသည် ။
Element | |||||
---|---|---|---|---|---|
area | Yes | Yes | Yes | Yes | Yes |
img | Yes | Yes | Yes | Yes | Yes |
input | Yes | Yes | Yes | Yes | Yes |