<meta name="viewport" content="width=device-width, initial-scale=1.0">
tr 태그
td 태그
th 태그
Table Header의 약자로 컬럼명을 표시하는 용도의 태그는
기본 성질은 td와 같으나 추가적으로 굵은글씨, 가운데 정렬이 이루어짐.
caption 태그
테이블의 제목이나 설명 내용을 추가하는 태그
행 병합(rowspan) : 행(상하) 병합
열 병합(colspan) : 행(좌우) 병합
thead : 테이블의 상단 부분 영억(컬럼명)
tbody : 테이블의 중단 부분 영역(실제 값, 내용)
tfoot : 테이블의 하단 부분 영역(합계)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
thead {
background-color: aqua;
}
tbody {
background-color: orange;
}
tfoot {
background-color: yellow;
}
tbody th, tfoot th{
background-color: orangered;
}
</style>
</head>
<body>
<table border="1">
<thead>
<tr>
<th colspan="5">하수정 컬렉션</th>
</tr>
</thead>
<tbody>
<tr>
<th rowspan="5">제품리스트</th>
<th>코드</th>
<th>분류</th>
<th>가격</th>
<th>구매가능개수</th>
</tr>
<tr>
<td>01-468</td>
<td>가을</td>
<td>200,000원</td>
<td>1068</td>
</tr>
<tr>
<td>01-468</td>
<td>가을</td>
<td>200,000원</td>
<td>1068</td>
</tr>
<tr>
<td>01-468</td>
<td>가을</td>
<td>200,000원</td>
<td>1068</td>
</tr>
<tr>
<td>01-468</td>
<td>가을</td>
<td>200,000원</td>
<td>1068</td>
</tr>
</tbody>
<tfoot>
<tr>
<th colspan="3">총합</th>
<td>1,420,000원</td>
<td>8468</td>
</tr>
</tfoot>
</table>
</body>
</html>