HTML <style> မှာ Attribute လို့ ရိုက် ထည့်ပါ။
ဥပမာ
<style> tag ၏ မီဒီယာအမျိုးအစားကို သတ်မှတ်ရန် အမျိုးအစား attribute ကိုသုံးပါ ။
<style type="text/css">
h1 {color:red;}
p {color:blue;}
</style>
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
ရည်ညွှန်းချက်သည် တဂ် ၏ type
အင်တာနက် မီဒီယာ အမျိုးအစား (ယခင် MIME အမျိုးအစား) ကို သတ်မှတ်သည် ။<style>
ရည်ညွှန်းချက်သည် tag နှင့်
tag အ type
ကြား အကြောင်းအရာကို ခွဲခြားသတ်မှတ်သည် ။
<style>
</style>
အကြောင်းအရာသည် CSS ဖြစ်ကြောင်း ညွှန်ပြသော မူရင်းတန်ဖိုးမှာ "text/css" ဖြစ်သည်။
Browser ပံ့ပိုးမှု
Attribute | |||||
---|---|---|---|---|---|
type | Yes | Yes | Yes | Yes | Yes |
အထားအသို
<style type="media_type">
ရည်ညွှန်းတန်ဖိုးများ
Value | Description |
---|---|
media_type | The Internet media type of the style sheet. For now, the only supported value is "text/css". Look at IANA Media Types for a complete list of standard media types |
❮ HTML <style> တဂ်