HTML <caption> 요소는 표에 설명 또는 제목을 추가합니다.

불러오는 중...

<table>
  <caption>우리 매장 원산지 표기</caption>
  <thead>
    <tr>
      <th>종류</th>
      <th>품목</th>
      <th>원산지</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th rowspan="3">과일</th>
      <td>사과</td>
      <td rowspan="2">국산</td>
    </tr>
    <tr>
      <td></td>
    </tr>
    <tr>
      <td>파인애플</td>
      <td>수입산</td>
    </tr>
    <tr>
      <th>곡물</th>
      <td></td>
      <td>국산</td>
    </tr>
    <tr>
      <th>해산물</th>
      <td>고등어</td>
      <td>원양산</td>
    </tr>
  </tbody>
</table>

특성

전역 특성만 포함합니다.

사용 일람

<caption> 요소를 사용할 경우, 반드시 <table>의 첫 번째 자식 요소로 배치해야 합니다. 위치를 아래로 바꾸고자 하면 <table>에 CSS caption-side 속성을 설정하세요.

<table>background-color<caption>을 포함하지 않습니다. <caption>에 따로 background-color를 설정하세요.

명세

HTML Living Standard

브라우저 호환성

IEEdgeChromeSafariFirefox
지원12지원지원1
iOS SafariAndroid WebViewAndroid ChromeAndroid FirefoxSamsung Internet
지원지원지원4지원
MDN BCD에서 가져오는 데이터입니다.

같이 보기

마지막 업데이트:
이 페이지를 오프라인에서 볼 수 있습니다.

sorto.me

CC BY-SA 4.0

based on MDN (contributors)