HTML <colgroup> span السمة
مثال
اضبط لون الخلفية لأول عمودين باستخدام سمة الامتداد <colgroup>:
<table>
<colgroup span="2" style="background:red"></colgroup>
<tr>
<th>ISBN</th>
<th>Title</th>
<th>Price</th>
</tr>
<tr>
<td>3476896</td>
<td>My first HTML</td>
<td>$53</td>
</tr>
<tr>
<td>5869207</td>
<td>My first CSS</td>
<td>$49</td>
</tr>
</table>
التعريف والاستخدام
تحدد السمة
span
عدد الأعمدة التي
<colgroup>
يجب أن يمتدها العنصر.
نصيحة: لتحديد خصائص مختلفة لعمود داخل a
<colgroup>
، استخدم <col>
العلامة الموجودة داخل
<colgroup>
العلامة.
دعم المتصفح
Attribute | |||||
---|---|---|---|---|---|
span | Yes | Yes | Yes | Yes | Yes |
بناء الجملة
<colgroup span="number">
قيم السمات
Value | Description |
---|---|
number | Sets the number of columns a column group should span |
❮ علامة HTML <colgroup>