HTML CSS caption-side 속성


테이블 제목의 위치를 테이블을 기준으로 상대적으로 지정합니다.
참고 : IE8 이하 버젼에서는 지원을 안합니다.

속성 값: top,bottom,left,right,inherit



Tip: CSS 몇가지 방법
1. 임베디드 스타일 시트(Embedded Style Sheet) :
내부 스타일 시트라고도 하며 HTML 웹페이지의 상단 <head>와 </head> 테그 사이에 Style Sheet를 지정하는 방법입니다.
2. 링크타입 스타일 시트(External Style Sheet) :
외부 스타일 시트라고도 하며 별도의 CSS파일을 만들어 Link 테그로 연결하는 방법입니다.
3. 인라인스타일(Inline Styles) :
HTML 웹페이지 내에서 직접 지정하는 방법입니다.
4.@import로 외부 스타일시트를 참조합니다.
5.xml-stylesheet 처리 명령으로 외부 스타일시트를 참조합니다.


CSS caption-side 속성 값

top : (기본값) 캡션을 테이블 박스의 상단에 위치 지정

bottom : 캡션을 테이블 박스의 하단에 위치 지정

left : 캡션을 테이블 박스의 왼쪽에 위치 지정

right : 캡션을 테이블 박스의 오른쪽에 위치 지정

inherit : 부모(상위)부터 상속받음



1. CSS caption-side : 링크타입 스타일 시트(External Style Sheet)

링크타입 스타일 시트(External Style Sheet)은 외부 스타일 시트라고도 하며 별도의 CSS파일을 만들어 Link 태그로 연결하는 방법입니다.

					
					
 
[style.css] 이라는 이름을 가진 별도의 파일입니다.

<style.css> 
 table{
   border-width: 1px;
   border-style: solid;
   border-collapse: collapse;
   width: 500px;
 }
 caption{
   caption-side: top,bottom,left,right,inherit 속성값입니다.;
 }
 

별도의 이름을 가진 웹페이지입니다.(예 : sample.html)
HTML CSS font-size 속성의 예제 샘플입니다

<body>
  <table>
    <caption>Apple</caption>
    <tr>
      <th>Botanical information </th>
      <td>Wild ancestors</td>
    </tr>
    <tr>
      <th>Cultural aspects </th>
      <td>Germanic paganism</td>
    </tr>
  </table>
</body>



					
					


CSS caption-side 예제 : 임베디드 스타일 시트(Embedded Style Sheet)

임베디드 스타일 시트(Embedded Style Sheet)은 내부 스타일 시트라고도 하며 HTML 웹페이지의 상단 <head>와 </head>태그 사이에 Style Sheet를 지정하는 방법입니다.

					
					
<head>
         
<style type="text/css"> <!--  
 table{
   border-width: 1px;
   border-style: solid;
   border-collapse: collapse;
   width: 500px;
 }
 caption{
   caption-side: top,bottom,left,right,inherit 속성값입니다.;
 }
 
 --> </style>
</head>

<body>
  <table>
    <caption>Apple</caption>
    <tr>
      <th>Botanical information </th>
      <td>Wild ancestors</td>
    </tr>
    <tr>
      <th>Cultural aspects </th>
      <td>Germanic paganism</td>
    </tr>
  </table>
</body>



					


CSS caption-side 예제 : 인라인스타일(Inline Styles)

인라인스타일(Inline Styles)은 HTML 웹페이지 내에서 직접 지정하는 방법입니다.
<div style="caption-side : 여기에 속성 값을 넣습니다;">HTML CSS caption-side속성의 인라인스타일(Inline Styles) 예제 샘플입니다.<div>


CSS caption-side 관련 태그


body , p , div , blockquote , table , td , ul , ol , li , form , input , textarea , select , img

 


WRITTEN BY
white_rabbitstar
html대학에서는 html 태그,html5 신규태그,css등 모든 속성,이벤트,속성값을 정리하여 앞으로 열심히 글을 올리 겠습니다.

,