HTML <fieldset> Tag
ဥပမာ
ဆက်စပ်ဒြပ်စင်များကို ပုံစံတစ်ခုဖြင့် အုပ်စုဖွဲ့ပါ-
<form action="/action_page.php">
<fieldset>
<legend>Personalia:</legend>
<label for="fname">First
name:</label>
<input type="text" id="fname" name="fname"><br><br>
<label for="lname">Last name:</label>
<input
type="text" id="lname" name="lname"><br><br>
<label
for="email">Email:</label>
<input type="email"
id="email" name="email"><br><br>
<label
for="birthday">Birthday:</label>
<input type="date"
id="birthday" name="birthday"><br><br>
<input
type="submit" value="Submit">
</fieldset>
</form>
အောက်တွင် နောက်ထပ် "စမ်းသုံးကြည့်ပါ" ဥပမာများ။
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
တက် <fieldset>
ဂ်အား ဖောင်တစ်ခုတွင် ဆက်စပ်ဒြပ်စင်များကို အုပ်စုဖွဲ့ရန် အသုံးပြုသည်။
tag သည် <fieldset>
သက်ဆိုင်ရာဒြပ်စင်များပတ်ပတ်လည်တွင် အကွက်တစ်ခုဆွဲသည်။
အကြံပြုချက်များနှင့် မှတ်စုများ
အကြံပြုချက်- ဒြပ်စင် အတွက် စာတန်းတစ်ခုကို သတ်မှတ်ရန် <legend> tag ကို
အသုံးပြု ပါသည်<fieldset>
။
Browser ပံ့ပိုးမှု
Element | |||||
---|---|---|---|---|---|
<fieldset> | Yes | Yes | Yes | Yes | Yes |
ဂုဏ်တော်
Attribute | Value | Description |
---|---|---|
disabled | disabled | Specifies that a group of related form elements should be disabled |
form | form_id | Specifies which form the fieldset belongs to |
name | text | Specifies a name for the fieldset |
ကမ္ဘာလုံးဆိုင်ရာ အရည်အချင်းများ
<fieldset>
tag သည် HTML တွင် Global Attributes ကို ပံ့ပိုး ပေးပါသည်။
ဖြစ်ရပ်ဂုဏ်တော်များ
<fieldset>
tag သည် HTML ရှိ Event Attributes ကိုလည်း ပံ့ပိုး ပေးပါသည် ။
နောက်ထပ် ဥပမာများ
ဥပမာ
<fieldset> နှင့် <legend> ပုံစံပြုလုပ်ရန် CSS ကိုသုံးပါ-
<html>
<head>
<style>
fieldset {
background-color: #eeeeee;
}
legend {
background-color: gray;
color: white;
padding: 5px 10px;
}
input {
margin: 5px;
}
</style>
</head>
<body>
<form action="/action_page.php">
<fieldset>
<legend>Personalia:</legend>
<label for="fname">First
name:</label>
<input type="text" id="fname" name="fname"><br><br>
<label for="lname">Last name:</label>
<input
type="text" id="lname" name="lname"><br><br>
<label
for="email">Email:</label>
<input type="email"
id="email" name="email"><br><br>
<label
for="birthday">Birthday:</label>
<input type="date"
id="birthday" name="birthday"><br><br>
<input
type="submit" value="Submit">
</fieldset>
</form>
</body>
</html>
ဆက်စပ်စာမျက်နှာများ
HTML DOM ရည်ညွှန်းချက်- Fieldset Object
မူရင်း CSS ဆက်တင်များ
ဘရောက်ဆာအများစုသည် <fieldset>
အောက်ဖော်ပြပါ ပုံသေတန်ဖိုးများဖြင့် အစိတ်အပိုင်းကို ပြသလိမ့်မည်-
fieldset {
display: block;
margin-left: 2px;
margin-right: 2px;
padding-top: 0.35em;
padding-bottom: 0.625em;
padding-left: 0.75em;
padding-right: 0.75em;
border: 2px groove (internal value);
}