Table의 구성 요소
<table>
<thead>
<tbody>
<tr>
<th>
<td>
간단한 예제
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>List of U.S. cities by population</title>
</head>
<body>
<h1>List of U.S. cities by population</h1>
<table>
<thead>
<tr>
<th>City</th>
<th>State</th>
<th>2021 estimate</th>
</tr>
</thead>
<tbody>
<tr>
<td>New York</td>
<td>New York</td>
<td>8,467,513</td>
</tr>
<tr>
<td>Los Angeles</td>
<td>California</td>
<td>3,849,297</td>
</tr>
<tr>
<td>Chicago</td>
<td>Illinois</td>
<td>2,696,555</td>
</tr>
</tbody>
</table>
<h2>Table v2</h2>
<table>
<thead>
<tr>
<th rowspan="2">City</th>
<th rowspan="2">State</th>
<th colspan="2">population</th>
</tr>
<tr>
<th>2021 estimate</th>
<th>2020 census</th>
</tr>
</thead>
<tbody>
<tr>
<td>New York</td>
<td>New York</td>
<td>8,467,513</td>
<td>8,804,190</td>
</tr>
<tr>
<td>Los Angeles</td>
<td>California</td>
<td>3,849,297</td>
<td>3,898,747</td>
</tr>
<tr>
<td>Chicago</td>
<td>Illinois</td>
<td>2,696,555</td>
<td>2,746,388</td>
</tr>
</tbody>
</table>
</body>
</html>
https://developer.mozilla.org/ko/docs/Web/HTML/Element/table
'공부 기록 > HTML & CSS' 카테고리의 다른 글
간단한 실습(2) - Price Table (반응형 디자인과 reset CSS) (0) | 2023.01.18 |
---|---|
간단한 실습(1) - Photo site (0) | 2023.01.18 |
Button :hover (0) | 2023.01.18 |
Form (0) | 2023.01.18 |
HTML 기본 구조와 Semantic Elements (0) | 2023.01.18 |