ข้อมูลอ้างอิงHTML

HTML โดยตัวอักษร HTML ตามหมวดหมู่ รองรับ HTML Browser แอตทริบิวต์ HTML HTML Global Attributes เหตุการณ์ HTML HTML สี HTML Canvas HTML เสียง/วิดีโอ ชุดอักขระ HTML HTML Doctypes การเข้ารหัส URL HTML รหัสภาษา HTML รหัสประเทศ HTML ข้อความ HTTP วิธี HTTP ตัวแปลง PX เป็น EM แป้นพิมพ์ลัด


HTML rowspan Attribute


ความหมายและการใช้งาน

แอตทริบิวต์rowspanระบุจำนวนแถวที่เซลล์ควรขยาย


นำไปใช้กับ

สามารถใช้ แอตทริบิวต์rowspanกับองค์ประกอบต่อไปนี้:

องค์ประกอบ คุณลักษณะ
<td> rowspan
<th> rowspan

ตัวอย่าง

ตัวอย่าง Td

ตาราง HTML ที่มีเซลล์ตารางที่ครอบคลุมสองแถว:

<table>
  <tr>
    <th>Month</th>
    <th>Savings</th>
    <th>Savings for holiday!</th>
  </tr>
  <tr>
    <td>January</td>
    <td>$100</td>
    <td rowspan="2">$50</td>
  </tr>
  <tr>
    <td>February</td>
    <td>$80</td>
  </tr>
</table>

Th ตัวอย่าง

ตาราง HTML ที่มีเซลล์ส่วนหัวที่ครอบคลุมสามแถว:

<table>
  <tr>
    <th>Month</th>
    <th>Savings</th>
    <th rowspan="3">Savings for holiday!</th>
  </tr>
  <tr>
    <td>January</td>
    <td>$100</td>
  </tr>
  <tr>
    <td>February</td>
    <td>$80</td>
  </tr>
</table>

รองรับเบราว์เซอร์

แอตทริบิวต์rowspanมีการสนับสนุนเบราว์เซอร์ต่อไปนี้สำหรับแต่ละองค์ประกอบ:

Element
td Yes Yes Yes Yes Yes
th Yes Yes Yes Yes Yes