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 설명 또는 제목

  • table tag 바로 아래 사용
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>
profile
간호사에서 개발자 되기

0개의 댓글

관련 채용 정보