HTML Attribute မ်ား
Attribute ေတြက HTML Element ေတြအတြက္ လုိအပ္တဲ့ သီးျခား အခ်က္အလက္ေတြ ပ့ံပိုးေပးပါတယ္။
HTML Attribute မ်ား
- HTML element ေတြမွာ attribute ေတြပါတတ္ပါတယ္။
- Attribute ေတြက Element ေတြအတြက္ additional အခ်က္အလက္ ပ့ံပိုးေပးပါတယ္။
- Attribute ေတြကုိ start tag ထဲမွာအျမဲရွိပါတယ္။
- Attribute ေတြ က name/value စုံတြဲအျဖစ္လာတတ္ပါတယ္။ ဥပမာ — name="value"
Attribute နမူနာမ်ား
HTML link ေတြကုိ  <a> tag ေတြနဲ႔ သတ္မွတ္ၾကတယ္။ သူ႔ကုိ href attribute နဲ႔အထူးျပဳထားပါတယ္။
နမူနာ
  <a href="http://www.soemoeaung.com">  ဒါက link တစ္ခုျဖစ္ပါတယ္။</a>
  
Attribute တန္ဖုိးေတြကုိ အျမဲ မ်က္ေတာင္အဖြင့္ အပိတ္ နဲ႔ထည့္တယ္။
Attribute တန္ဖုိးေတြကုိ Tag  ေတြထဲမွာ ထည့္ထားတတ္ပါတယ္။ ႏွစ္ခုပါတဲ့ 
quote (“ ”) ေတြကုိ  အသုံးေတြျပီး quote တစ္ခုတည္း (‘ ’) လည္း 
သုံးႏိုင္ပါတယ္။
 မွတ္ခ်က္
 — ျဖစ္ေတာင့္ျဖစ္ခဲ တစ္ခါတစ္ေလမွာ  attribute တန္ဖုိး ေတြကုိယ္တုိင္က 
quote ေတြပါေနတတ္ပါတယ္။ အဲဒီအခ်ိန္မွာေတာ့  Single Quote (‘ ’) 
ကုိသုံးရမွာျဖစ္ပါတယ္။ နမူနာ — name='John  "ShotGun" Nelson'
မွတ္ခ်က္
 — ျဖစ္ေတာင့္ျဖစ္ခဲ တစ္ခါတစ္ေလမွာ  attribute တန္ဖုိး ေတြကုိယ္တုိင္က 
quote ေတြပါေနတတ္ပါတယ္။ အဲဒီအခ်ိန္မွာေတာ့  Single Quote (‘ ’) 
ကုိသုံးရမွာျဖစ္ပါတယ္။ နမူနာ — name='John  "ShotGun" Nelson'
HTML မွာ စာလုံးအေသး Attribute ေတြကုိသုံးပါ။
Attribute အမည္ေတြနဲ႔ attribute  တန္ဖုိးေတြဟာ စာလုံးအေသးအၾကီး လြဲလုိ႔ျပႆနာမရွိတဲ့ case-insensitive ေတြျဖစ္ပါတယ္။
ဒါေပမယ့္ World Wide Web Consortium (W3C) က lowercase Attribute ေတြ/attribute တန္ဖုိးေတြကုိ HTML 4 မွာသုံးဖုိ႔ တိုက္တြန္းထားပါတယ္။ အသစ္ထြက္တဲ့ (X)HTML ကလည္း စာလုံးအေသး lowercase Attribute ေတြ ကုိပဲ အဆင္ေျပေစႏိုင္မွာပါ။
ဒါေပမယ့္ World Wide Web Consortium (W3C) က lowercase Attribute ေတြ/attribute တန္ဖုိးေတြကုိ HTML 4 မွာသုံးဖုိ႔ တိုက္တြန္းထားပါတယ္။ အသစ္ထြက္တဲ့ (X)HTML ကလည္း စာလုံးအေသး lowercase Attribute ေတြ ကုိပဲ အဆင္ေျပေစႏိုင္မွာပါ။
HTML Attribute အညႊန္းမ်ား
ေအာက္က စာရင္းကေတာ့ HTML  Element ေတြထဲက အသုံးမ်ားဆုံး Attribute အခ်ိဳ႕ျဖစ္ပါတယ္။
| Attribute | တန္ဖုိး | အေၾကာင္းအရာ | 
|---|---|---|
| class | classname | Element တစ္ခုရဲ့ classname ကုိအထူးျပဳပါတယ္။ | 
| id | Id | element တစ္ခုရဲ့ သီးျခားစီရွိတဲ့ id တစ္ခုကုိ အထူးျပဳပါတယ္။ | 
| style | style_definition | element တစ္ခုရဲ့ Inline Style တစ္ခုကုိ အထူးျပဳပါတယ္။ | 
| title | tool မွတ္စု_စာသား | Element တစ္ခုရဲ့ အပုိအခ်က္အလက္ေတြကုိ တစ္ခုကုိ အထူးျပဳ ပါတယ္။ (tool မွတ္ခ်က္ အျဖစ္ေဖာ္ျပ) | 
အေသးစိပ္ Standard  attribute ေတြအတြက္ — HTML Standard Attribute အညႊန္းမ်ား
ေအာက္မွာ ဆက္လက္ေလ့လာနိဳင္ပါတယ္ 
HTML / XHTML Standard Attribute မ်ား
ေအာက္က Attribute ေတြက Standard  Tag ေတြျဖစ္ျပီး HTML/XHTML အားလုံးနီးပါးမွာသုံးႏုိင္ပါတယ္။
Core Attribute မ်ား
<base>, <head>,  <html>, <meta>, 
<param>, <script>, <style> နဲ႔  <title> 
တုိ႔ကလြဲျပီး က်န္ element ေတြအားလုံးမွာသုံးလို႔႔ရပါတယ္။
| Attribute | အေၾကာင္းအရာ | 
|---|---|
| class | element တစ္ခုရဲ့ classname တစ္ခု ဒါမွ မဟုတ္ တစ္ခုထက္ပုိတဲ့ classname ေတြ အတြက္ အထူးျပဳရန္ (style sheet တစ္ခုထဲမွာ class တစ္ခုကုိရည္ညႊန္းပါတယ္)။ | 
| id | Element တစ္ခုရဲ့ unique id အတြက္သုံးပါတယ္။ | 
| style | element တစ္ခု အတြက္ inline CSS style ကုိအထူးျပဳရန္ | 
| title | element တစ္ခုအေၾကာင္း အပုိအခ်က္အလက္ ေတြျဖည့္ရန္ | 
Language Attribute မ်ား
<base>, <br>, <frame>,  <frameset>, 
<hr>, <iframe>, <param> နဲ႔<script>  
တုိ႔ကလြဲျပီး က်န္ element ေတြအားလုံးမွာသုံးလို႔႔ရပါတယ္။
| Attribute | အေၾကာင္းအရာ | 
|---|---|
| dir | element တစ္ခုရဲ့ content ေတြအတြက္ စာသား direction အတြက္ျဖစ္ပါတယ္။ | 
| lang | Element ရဲ့ content အတြက္ ဘာသာစကား သတ္မွတ္ဖုိ႔ျဖစ္ပါတယ္။ | 
| xml —lang | Element ရဲ့ content အတြက္ ဘာသာစကား သတ္မွတ္ဖုိ႔ျဖစ္ပါတယ္။(XHTML document ေတြ အတြက္)။ | 
Keyboard Attribute မ်ား
| Attribute | အေၾကာင္းအရာ | 
|---|---|
| accesskey | element တစ္ခုကုိ ဦးစားေပး/အာရုံစုိက္ေစရန္ Shortcut key တစ္ခုထည့္ရန္။ | 
| tabindex | Element တစ္ခုကို စီစဥ္ေနရာခ်ရန္။ | 
 http://www.soemoeaung.com
ခုလိုအားေပးတဲ့အတြက္ အထူးေက်းဇဴးတင္ပါေၾကာင္း ေျပာၾကားပါရေစ..ဘေလာ့ခရီးသည္မွ  နည္းပညာမ်ားအား မည္သူမဆို လြတ္လပ္စြာ ကူးယူသုံးစြဲနိဳင္ပါတယ္.. ကြ်န္ေတာ္ ပိုင္ဆိုင္ေသာေနရာေလးမ်ားအား ဆက္လက္ လည္ပါတ္လိုပါက
***************************************
ဘေလာ့ခရီးသည္သို႕ {  ဒီမွာ  } သြားလိုက္ပါ
လယ္တီေျမသားသို႕{  ဒီမွာ  } သြားလိုက္ပါ
စာေပနန္းေတာ္သို႕{  ဒီမွာ  } သြားလိုက္ပါ






 


0 comments:
Post a Comment