HTML <caption>
요소는 표의 설명 또는 제목을 나타냅니다.
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
콘텐츠 카테고리 | 없음 |
---|---|
가능한 콘텐츠 | 플로우 콘텐츠. |
태그 생략 | 바로 뒤에 스페이스나 주석이 오지 않으면 닫는 태그를 생략할 수 있습니다. |
가능한 부모 요소 | <table> 요소. 첫 번째 자식이어야 합니다. |
가능한 ARIA 역할 | 없음 |
DOM 인터페이스 | HTMLTableCaptionElement |
특성
이 요소는 전역 특성만 포함합니다.
사용 일람
<caption>
요소는 부모 <table>
요소의 첫 번째 자식이어야 합니다.
<caption>
요소를 가진 <table>
요소가 만약 <figure>
요소의 유일한 자식인 경우, <figcaption>
을 대신 사용하세요.
예제
다음의 간단한 예제는 설명을 포함한 표를 보입니다.
<table>
<caption>Example Caption</caption>
<tr>
<th>Login</th>
<th>Email</th>
</tr>
<tr>
<td>user1</td>
<td>user1@sample.com</td>
</tr>
<tr>
<td>user2</td>
<td>user2@sample.com</td>
</tr>
</table>
명세
Specification | Status | Comment |
---|---|---|
HTML Living Standard The definition of '<caption>' in that specification. |
Living Standard | |
HTML5 The definition of '<caption>' in that specification. |
Recommendation | |
HTML 4.01 Specification The definition of '<caption>' in that specification. |
Recommendation |
브라우저 호환성
BCD tables only load in the browser