HTML 사전

caption

설명

The HTML Table Caption Element (<caption>) represents the title of a table. Though it is always the first descendant of a <table>, its styling, using CSS, may place it elsewhere, relative to the table.

<Caption> 요소는 표의 제목을 표현한다. 언제나 <table>의 첫번째 자식요소가 되기는 하지만, 표의 성격에 맞게 어느 위치에나 보여질 수 있다. (위치는 CSS를 통해 변경 가능하다.)

참고 : When the <table> element that is the parent of this <caption> is the only descendant of a <figure> element, use the <figcaption> element instead.

참고 : 만약 <caption>의 부모 요소인 <table>이 <figure> 요소의 유일한 자식 요소라면, <caption>대신 <figcaption> 요소를 사용하라.

Usage Context

Permitted content Flow content
Tag omission None, both the start tag and the end tag are mandatory
Permitted parent elements A <table> element, as its first descendant
Normative document HTML5, section 4.9.2 (HTML4.01, section 11.2.2)

속성

Like all other HTML elements, this element supports the global attributes.

이 요소는 전역속성을 지원한다

align -  Deprecated in HTML 4.01, Obsolete in HTML5
align - HTML 4.01에서 폐지예정. HTML5에서 폐지

This enumerated attribute indicates how the caption must be aligned with respect to the table. It may have the following values:
이 속성은 caption이 표에 대해서 어떻게 정렬될지를 정의한다. 다음과 같은 값을 가질 수 있다.

  • left, displayed to the left of the table
    left, 표의 왼쪽에 보여진다
  • top, displayed before the the table
    top, 표 위쪽에 보여진다
  • right, displayed to the right of the table
    right, 표의 오른쪽에 보여진다
  • bottom, displayed under the table
    bottom, 표의 아래쪽에 보여진다

참고 : Do not use this attribute, as it has been deprecated: the <caption> element should be styled using CSS. To give a similar effect to the align attribute, use the the CSS properties caption-side and text-align.

참고 : 이 속성을 사용하지 않는 것이 좋다. CSS를 통해 <caption>의 스타일을 정할 수 있기 때문에 거의 쓰지 않는 속성이다. 정렬을 위해서는 CSS의 caption-sidetext-align 과 같은 속성을 사용하길 바란다.

DOM Interface

This element implements the HTMLTableCaptionElement interface.
<caption> 요소는 HTMLTableCaptionElement 인터페이스를 구현한다.

호환성

Desktop
기능 구글크롬 파이어폭스Gecko) 인터넷 익스플로러 Opera Safari
기본적인 지원          
Mobile
기능 안드로이드 파이어폭스 모바일(Gecko) 인터넷 익스플로러 모바일 오페라 모바일 사파리 모바일
기본적인 지원          

참고

댓글

댓글 본문
버전 관리
토비
현재 버전
선택 버전
graphittie 자세히 보기