table
- 구성요소?
- tr(row)
- th(head)
- td(data)
name |
age |
country |
carrot |
19 |
korea |
mango |
29 |
korea |
<table border="1">
<tr>
<th> name </th>
<th> age </th>
<th> country </th>
</tr>
<tr>
<td> carrot </td>
<td> 19 </td>
<td> korea </td>
</tr>
<tr>
<td> mango </td>
<td> 29 </td>
<td> korea </td>
</tr>
</table>
th(head)
- scope : 해당 내용이 대표임을 명시적으로 나타내기 위함
<th scope="col/row"> text </th>
td(data)
- colspan : 열 합치기
- rowspan : 행 합치기
name |
age |
country |
carrot |
19 |
korea |
mango |
29 |
<table border="1">
<tr>
<th> name </th>
<th> age </th>
<th> country </th>
</tr>
<tr>
<td> carrot </td>
<td> 19 </td>
<td rowspan="2"> korea </td>
</tr>
<tr>
<td> mango </td>
<td> 29 </td>
</tr>
</table>
caption : table 설명 또는 제목
caption은 이렇게 표현 됨
name |
age |
country |
carrot |
19 |
korea |
mango |
29 |
korea |
<table border="1">
<caption> caption은 이렇게 표현 됨</caption>
<tr>
<th> name </th>
<th> age </th>
<th> country </th>
</tr>
<tr>
<td> carrot </td>
<td> 19 </td>
<td> korea </td>
</tr>
<tr>
<td> mango </td>
<td> 29 </td>
<td> korea </td>
</tr>
</table>