سمة colspan في HTML
مثال
جدول HTML بخلية جدول تمتد على عمودين:
<table>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
<tr>
<td colspan="2">Sum: $180</td>
</tr>
</table>
التعريف والاستخدام
تحدد السمة colspan
عدد الأعمدة التي يجب أن تمتد الخلية.
دعم المتصفح
Attribute | |||||
---|---|---|---|---|---|
colspan | Yes | Yes | Yes | Yes | Yes |
ملاحظة: يدعم Firefox فقط colspan="0"
، والذي له معنى خاص (انظر أدناه في جدول "Attribute Values").
بناء الجملة
<td colspan="number">
قيم السمات
Value | Description |
---|---|
number | Specifies the number of columns a cell should span. Note: colspan="0" tells the browser to span the cell to the last column of the column group (colgroup) |
❮ علامة HTML <td>