2021/10/18 table:tr,th,td,caption
阿新 • • 發佈:2021-10-18
13.1 表格
<tr>
<th>外號</th>
<th>原名</th>
<th>特長</th>
<th>照片</th>
</tr>
<tr>
<th>美國隊長</th>
<td>史蒂芬·羅傑斯</td>
<td>強化體格</td>
<td><img src="img/CaptainAmerica.jpg" alt="美國隊長" width="300"></td>
</tr>
13.2 表格邊框
<style>
table {
border: 1px solid black;
border-collapse: collapse;
}
th {
border: 1px solid red;
}
td {
border: 1px solid blue;
}
</style>
13.3 給表格加標題:caption
caption 元素需要緊挨著 table 元素的開始標籤。
<table>
<caption>復仇者聯盟主要成員技能表</caption>
...