<thead>: 표 머릿글 요소
<thead> HTML 요소는 테이블의 열의 머리글인 행들의 집합입니다.
<thead> HTML 요소는 테이블의 열의 머리글인 행들의 집합입니다.
HTML
<table>
<caption>
Council budget (in £) 2018
</caption>
<thead>
<tr>
<th scope="col">Items</th>
<th scope="col">Expenditure</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Donuts</th>
<td>3,000</td>
</tr>
<tr>
<th scope="row">Stationery</th>
<td>18,000</td>
</tr>
</tbody>
<tfoot>
<tr>
<th scope="row">Totals</th>
<td>21,000</td>
</tr>
</tfoot>
</table>
CSS
thead,
tfoot {
background-color: #2c5e77;
color: #fff;
}
tbody {
background-color: #e4f0f5;
}
table {
border-collapse: collapse;
border: 2px solid rgb(140 140 140);
font-family: sans-serif;
font-size: 0.8rem;
letter-spacing: 1px;
}
caption {
caption-side: bottom;
padding: 10px;
}
th,
td {
border: 1px solid rgb(160 160 160);
padding: 8px 10px;
}
td {
text-align: center;
}
| 콘텐츠 카테고리 | 없음. | ||||||
|---|---|---|---|---|---|---|---|
| 가능한 콘텐츠 | 0개 이상의 ` | ||||||
| 태그 생략 | 여는 태그는 필수입니다. ` | ||||||
| 가능한 부모 요소 |
`` 요소. `` 요소는 무조건 `` 요소 뒤에 (암시적으로 정의된 경우에도) 위치해야 하지만, ``,
`` 과 `` 요소의 앞에 위치해야 합니다.
특성이 요소는 전역 특성만 포함합니다. 더 이상 사용하지 않는 특성
예제
명세브라우저 호환성같이 보기
|