HTML <label> Tag
ဥပမာ
အညွှန်းများပါရှိသော ရေဒီယိုခလုတ်သုံးခု-
<form action="/action_page.php">
<input type="radio" id="html" name="fav_language" value="HTML">
<label for="html">HTML</label><br>
<input type="radio" id="css" name="fav_language"
value="CSS">
<label for="css">CSS</label><br>
<input type="radio"
id="javascript" name="fav_language" value="JavaScript">
<label for="javascript">JavaScript</label><br><br>
<input type="submit" value="Submit">
</form>
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
တဂ် သည် <label>
အစိတ်အပိုင်းများစွာအတွက် အညွှန်းတစ်ခုကို သတ်မှတ်သည်-
- <input type="checkbox">
- <input type="color">
- <input type="date">
- <input type="datetime-local">
- <input type="email">
- <input type="file">
- <input type="month">
- <input type="number">
- <input type="password">
- <input type="radio">
- <input type="range">
- <input type="search">
- <input type="tel">
- <input type="text">
- <input type="time">
- <input type="url">
- <input type="week">
- <မီတာ>
- <တိုးတက်မှု>
- <select>
- <textarea>
အထက်ဖော်ပြပါအချက်များပါရှိသော အညွှန်းများကို မှန်ကန်စွာအသုံးပြုခြင်းသည် အကျိုးရှိစေသည်-
- စခရင်ဖတ်သူအသုံးပြုသူများ (အသုံးပြုသူသည် ဒြပ်စင်ကိုအာရုံစိုက်သောအခါ အညွှန်းကို ကျယ်လောင်စွာဖတ်ပါမည်)
- အလွန်သေးငယ်သောဒေသများ ( checkbox များကဲ့သို့သော) ကိုနှိပ်ရန်အခက်အခဲရှိသောအသုံးပြုသူများ - အဘယ်ကြောင့်ဆိုသော်အသုံးပြုသူတစ်ဦးသည်ဒြပ်စင်အတွင်းရှိစာသားကိုနှိပ်သောအခါ
<label>
ထည့်သွင်းမှုကိုပြောင်းပစ်သည် (၎င်းသည် hit ဧရိယာကိုတိုးစေသည်)။
အကြံပြုချက်များနှင့် မှတ်စုများ
အကြံပြုချက်- ၎င်းတို့ကို ပေါင်းစည်းရန် ဆက်စပ်ဒြပ်စင်၏ id attribute <label>
နှင့် တူညီရပါမည်။ ဒြပ်စင်အတွင်း ဒြပ်စင်ကို နေရာချထားခြင်းဖြင့် အညွှန်းတစ်ခုကိုလည်း ဒြပ်စင်တစ်ခုထံ ချည်နှောင်နိုင်သည် <label>
။
Browser ပံ့ပိုးမှု
Element | |||||
---|---|---|---|---|---|
<label> | Yes | Yes | Yes | Yes | Yes |
ဂုဏ်တော်
Attribute | Value | Description |
---|---|---|
for | element_id | Specifies the id of the form element the label should be bound to |
form | form_id | Specifies which form the label belongs to |
ကမ္ဘာလုံးဆိုင်ရာ အရည်အချင်းများ
<label>
tag သည် HTML တွင် Global Attributes ကို ပံ့ပိုး ပေးပါသည်။
ဖြစ်ရပ်ဂုဏ်တော်များ
<label>
tag သည် HTML ရှိ Event Attributes ကိုလည်း ပံ့ပိုး ပေးပါသည် ။
ဆက်စပ်စာမျက်နှာများ
HTML DOM ရည်ညွှန်း- အညွှန်းအရာဝတ္တု
မူရင်း CSS ဆက်တင်များ
ဘရောက်ဆာအများစုသည် <label>
အောက်ဖော်ပြပါ ပုံသေတန်ဖိုးများဖြင့် အစိတ်အပိုင်းကို ပြသလိမ့်မည်-
ဥပမာ
label {
cursor: default;
}