سمة النطاق <th> لـ HTML

❮ علامة HTML <th>

مثال

حدد أن خليتي الرأس عبارة عن رؤوس للأعمدة:

<table>
  <tr>
    <th></th>
    <th scope="col">Month</th>
    <th scope="col">Savings</th>
  </tr>
  <tr>
    <td>1</td>
    <td>January</td>
    <td>$100</td>
  </tr>
  <tr>
    <td>2</td>
    <td>February</td>
    <td>$80</td>
  </tr>
</table>

التعريف والاستخدام

تحدد السمة scopeما إذا كانت خلية الرأس عبارة عن رأس لعمود أو صف أو مجموعة أعمدة أو صفوف.

ملاحظة: السمة scopeليس لها تأثير مرئي في متصفحات الويب العادية ، ولكن يمكن استخدامها بواسطة برامج قراءة الشاشة. 


دعم المتصفح

Attribute
scope Yes Yes Yes Yes Yes

بناء الجملة

<th scope="col|row|colgroup|rowgroup">

قيم السمات

Value Description
col Specifies that the cell is a header for a column
row Specifies that the cell is a header for a row
colgroup Specifies that the cell is a header for a group of columns
rowgroup Specifies that the cell is a header for a group of rows

❮ علامة HTML <th>