English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
align 속성은 캡션 요소의 정렬 방식을 정의합니다. 이 속성은 제목을 테이블의 좌측, 우측, 상단 또는 하단에 블록 요소로 정렬해야 합니다.
좌측, 우측, 하단, 상단에 정렬된 <caption> 요소가 있는 테이블:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>HTML <caption> align 속성 사용-기본 튜토리얼(oldtoolbag.com)</title> <style> table, th, td { border: 1px solid black; } </style> </head> <body> <p align="left":</p> <table> <p align="left">My savings</caption> <tr> <th>월</th> <th>Savings</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> </table> <p align="right":</p> <table> <p align="right">My savings</caption> <tr> <th>월</th> <th>Savings</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> </table> <p>align="top":</p> <table> <caption align="top">My savings</caption> <tr> <th>월</th> <th>Savings</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> </table> <p>align="bottom":</p> <table> <caption align="bottom">My savings</caption> <tr> <th>월</th> <th>Savings</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> </table> </body> </html>테스트를 보세요 ‹/›
IEFirefoxOperaChromeSafari
모든 주요 브라우저는 align 속성을 지원합니다.
주의:
Internet Explorer 8 "left", "right", "top", "bottom"을 지원합니다. 값
Internet Explorer 9+ "top", "bottom" 값이 지원됩니다.
Firefox는 "left", "right", "top", "bottom" 값을 지원합니다.
Opera는 "left", "right", "top", "bottom" 값을 지원합니다.
Chrome는 "top", "bottom" 값을 지원합니다.
Safari는 "top", "bottom" 값을 지원합니다.
HTML5 <caption> align 속성은 지원되지 않습니다. 대신 CSS를 사용하세요.
<caption>의 align 속성은 HTML에서 4.01 이제 사용되지 않습니다.
align 속성은 caption 요소의 정렬 방식을 지정합니다.
이 속성은 caption을 테이블의 왼쪽, 오른쪽, 위, 아래로 블록 요소로 정렬합니다.
THTML5 <caption> align 속성은 지원되지 않습니다. 대신 CSS를 사용하세요.
CSS 문법: <caption style="caption-side:bottom"> 또는 <caption style="text-align:left">
우리의 CSS 강의에서 더 많은 정보를 찾을 수 있습니다.caption-side 속성의 세부 사항.
<caption align="left|right|top|bottom">
값 | 설명 |
---|---|
left | 제목은 테이블 왼쪽에 있습니다. |
right | 제목은 테이블 오른쪽에 있습니다. |
top | 제목은 테이블 위에 있습니다. |
bottom | 제목은 테이블 아래에 있습니다. |