HTML/요소

표 콘텐츠 - CAPTION

컴공 윤서혜 학습일기 2021. 1. 5. 13:48

표의 제목을 설정.

  • 열리는 TABLE 태그 바로 다음에 작성해야 함.
  • <table> 당 하나의 <caption>만 사용 가능.

 

표를 보조하는 태그이다.

<table>
        <caption>데이터 타입과 값</caption>
        <tr>
            <td rowspan = "2">데이터</td>
            <td headers = "th-data" id = "th-type">타입</td>
            <td headers="th-type">알파벳</td>
            <td headers="th-type">숫자</td>
        </tr>
        <tr>
            <th headers="th-data" id = "th-value">값</th>
            <td headers = "th-value">A</td>
            <td headers = "th-value">7</td>
        </tr>
    </table>

caption의 출력 형태