🏷️테이블
<table>
, <tr>
, <th>
, <td>
태그로 테이블을 만들 수 있다.
- 위 태그는 모두 쌍을 갖는다.
📌<table>
- 표를 만들려면 table 태그로 감싸야 한다.
📌<tr>
- tr stands for table row
- tr 태그로 행을 나눌 수 있다.
📌<th>
- th stands for table header
- 테이블 각 열의 제목을 의미한다.
📌<td>
- td stands for table data
- 각 셀을 표현할 때 사용된다.
📌병합 속성
- 셀을 병합할 때 사용하는 속성에는
rowspan
과 colspan
이 있다.
- th나 td 태그의 속성이다.
- rowspan stands for row span
- colspan stands for column span
- 속성값으로 몇행이나 몇열을 병합할지 지정한다.
📌🔍ex)
<table>
<tr>
<th rowspan='2'>일시</th><th colspan='2'>중심위치</th><th rowspan='2'>중심기압(hPa)</th><th colspan='2'>최대풍속</th>
</tr>
<tr>
<td>위도</td><td>경도</td><td>초속(m/s)</td><td>시속(km/h)</td>
</tr>
</table>