Videos & Audios
Cell များကို ပေါင်းစပ်ခြင်း (Merging Cells)
Section titled “Cell များကို ပေါင်းစပ်ခြင်း (Merging Cells)”တစ်ခါတလေမှာ cell တစ်ခုတည်းကို column တွေ ဒါမှမဟုတ် row တွေ ၂ ခု စာ၊ ၃ ခုစာအထိ နေရာယူစေချင်တဲ့အခါ ရှိနိုင်ပါတယ်။
Column Span (colspan)
Section titled “Column Span (colspan)”- Cell တွေကို အလျားလိုက် (horizontally) ပေါင်းစပ်ပေးပါတယ်။
<tr> <th colspan="2">Course Info</th> <th>Level</th></tr>
Row Span (rowspan)
Section titled “Row Span (rowspan)”Cell တွေကို ဒေါင်လိုက် (vertically) ပေါင်းစပ်ပေးပါတယ်။
<tr> <td rowspan="2">HTML Basics</td> <td>Duration: 2 hours</td> <td>Level: Beginner</td></tr><tr> <td>Duration: 3 hours</td> <td>Level: Intermediate</td></tr>
Table Styling အခြေခံများ
Section titled “Table Styling အခြေခံများ”Table တွေကို CSS သုံးပြီး လှအောင်လုပ်နိုင်ပါတယ်-
-
border: table/cell တွေရဲ့ ဘေးမှာ ဘောင်တွေထည့်ပေးတယ်။ -
padding: cell တွေရဲ့ အတွင်းထဲမှာ နေရာလပ် ထည့်ပေးတယ်။ -
text-align: cell ထဲက စာသားကို နေရာချပေးတယ်။ -
background-color: row တွေ ဒါမှမဟုတ် header တွေအတွက် background color ထည့်ပေးတယ်။
ဥပမာ -
<style> table { border-collapse: collapse; width: 100%; } th, td { border: 1px solid black; padding: 8px; text-align: left; } th { background-color: lightgray; }</style>
အကောင်းဆုံးအလေ့အကျင့်များ (Best Practices)
Section titled “အကောင်းဆုံးအလေ့အကျင့်များ (Best Practices)”-
Accessibility ပိုကောင်းအောင် ခေါင်းစဉ်တွေအတွက်
<th>ကို သုံးပါ။ -
Table တွေကို ရိုးရှင်းအောင်ထားပြီး၊ table ထဲမှာ table တွေ အများကြီးထပ်ထည့်တာမျိုး ရှောင်ပါ။
-
Table က ဘာအကြောင်းလဲဆိုတာ ဖော်ပြဖို့
<caption>ကို သုံးပါ။