---
# System prepended metadata

title: 35  table表格的變化

---

# 35  table表格的變化

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>table...合併格位 </title>
</head>
<body>
  <h3>1.合併欄位(colSpan) </h3>
  <table border="1"  cellpadding="5">
    <tr><th colspan="2" >平地原住民</th><th colspan="2">山地原住民</th></tr>
    <tr><th>男</th><th>女</th><th>男</th><th>女</th></tr>
    <tr><td>100</td><td>200</td><td>300</td><td>400</td></tr>
  </table>
  
  <h3>2.合併列 </h3>
  <table border="1" cellpadding="5">
    <tr><th rowspan="2">平地原住民</th><th>男</th><td>100</td></tr>
    <tr>                        <th>女</th><td>200</td></tr>
    <tr><th rowspan="2">山地原住民</th><th>男</th><td>300</td></tr>
    <tr>                        <th>女</th><td>400</td></tr>
  </table>
  
  
  
  
  <h3>3.合併欄與列 </h3>
  <table border="1"  cellpadding="5">
    <tr><th rowspan="1" colspan="2">類別</th><th colspan="2">就業人口</th><th colspan="2">未就業人口</th> <th rowspan="2">合計</th></tr>
    <tr>                    <th>平地原住民</th><th>山地原住民</th><th>平地原住民</th><th>山地原住民</th><th>山地原住民</th><th>平地原住民</th><th></th></tr>
    <tr><th rowspan="2">男</th><th>40歲以下</th><td>100</td><td>150</td><td>110</td><td>160</td><td bgcolor="mistyRose">520</td></tr>
    <tr>                    <th>40歲以上</th><td>200</td><td>250</td><td>210</td><td>260</td><td bgColor="mistyRose">920</td></tr>
    <tr><th rowspan="2">女  </th><th>40歲以下</th><td>300</td><td>350</td><td>310</td><td>360</td><td bgColor="mistyRose">1320</td></tr>
    <tr>                    <th>40歲以上</th><td>400</td><td>450</td><td>410</td><td>460</td><td bgColor="mistyRose">1720</td>
    <tr><th colspan="2">合計</th><td bgColor="mistyRose">1000</td><td bgColor="mistyRose">1200</td><td bgColor="mistyRose">1040</td><td bgColor="mistyRose">1240</td><td bgColor="lightSteelBlue">4480</td></tr>
  </table>
    
</body>
</html>


![](https://i.imgur.com/hzlIlIc.png)
