انتقل إلى محتوى الدرس

Table Alignment Attribute in HTML خاصية محاذاة الجدول في HTML

سوف تتعرف في هذا الدرس على جميع الخصائص التي تضاف إلى عنصر table في لغة HTML.

1 صفوف تعليمية
لغة HTML
12,715 مشاهدة

شرح صفوف ومحتوى الفقرة

الصف 1 شرح توضيحي

تُستخدم الخاصية [align] في  اصدار HTML القديم لمحاذاة الجدول أفقياً داخل صفحة الويب.

القيم التي يمكن تحديدها في خاصية align هي:

  • [center] لتوسيط الجدول في منتصف الصفحة أفقياً.
  • [left] لمحاذاة الجدول إلى اليسار.
  • [right] لمحاذاة الجدول إلى اليمين.

Align Table Center

تُستخدم center values مع خاصية align لتوسيط الجدول في منتصف الصفحة.

HTML
<table border="1" bordercolor="red" bgcolor="yellow" width="500" align="center">
  <tr>  
      <th>Firstname</th> 
      <th>Lastname</th>
      <th>Email</th>
      <th>Age</th>
      <th>Study</th>
    </tr>
</table>

Align Table Left

تُستخدم left values مع خاصية align لمحاذاة الجدول إلى يسار الصفحة.

HTML
<table border="1" bordercolor="red" bgcolor="yellow" width="500" align="left">
  <tr>  
      <th>Firstname</th> 
      <th>Lastname</th>
      <th>Email</th>
      <th>Age</th>
      <th>Study</th>
    </tr>
</table>

align table right

تُستخدم right values مع خاصية align لمحاذاة الجدول إلى يمين الصفحة.

HTML
<table border="1" bordercolor="red" bgcolor="yellow" width="500" align="right">
  <tr>  
      <th>Firstname</th> 
      <th>Lastname</th>
      <th>Email</th>
      <th>Age</th>
      <th>Study</th>
    </tr>
</table>