table Á¦¸ñ(caption)À» ¾Æ·¡ÂÊ¿¡ ³ªÅ¸³ª°Ô ÇÒ °ÍÀΰ¡ À§ÂÊ¿¡ ³ªÅ¸³ª°Ô ÇÒ °ÍÀΰ¡¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù.

Àμö
: (¼Ó¼º ¹®ÀÚ¿­)
¼Ó¼º°ªÀº table Á¦¸ñ(caption)À» ¾Æ·¡ÂÊ¿¡ ³ªÅ¸³ª°Ô ÇÒ °ÍÀΰ¡ À§ÂÊ¿¡ ³ªÅ¸³ª°Ô ÇÒ °ÍÀΰ¡¸¦ ³ªÅ¸³»´Â ¹®ÀÚ¿­ÀÌ´Ù.

top µðÆúÆ®À̸ç, captionÀÌ tableÀÇ À§ÂÊ¿¡ ³ªÅ¸³­´Ù.
bottom captionÀÌ tableÀÇ ¾Æ·¡ÂÊ¿¡ ³ªÅ¸³­´Ù.

ÀÌ ¼Ó¼ºÀº Àбâ/¾²±â·Î µðÆúÆ®°ªÀº topÀÌ´Ù.

Ư±â

ÀÌ ¼Ó¼ºÀÌ Åº·ÂÀûÀ¸·Î ¼³Á¤µÇ¸é ¼Ó¼º°ªÀº ¾÷µ¥ÀÌÆ®ÇÒ ¼ö ÀÖ´Ù.

Àû¿ë
°³Ã¼scriptHTML±Ô°ÝIE
Âü°í

ÀÌ ¼Ó¼ºÀº (¿µ¹®) W3C DOM Level 1(Document Object Model)¿¡¼­ Á¤ÀǵǾú´Ù.


TABLE CAPTION
R1C1R1C2R1C3R1C4
R2C1R2C2R2C3R2C4
R3C1R3C2R3C3R3C4
R4C1R4C2R4C3R4C4
°á°ú Ç¥½Ãâ
<TABLE id=tableObj width="300" border="1" cellspacing="0" cellpadding="4">
<CAPTION id="captionObj" valign="top" style=color:blue;background:ffa>TABLE CAPTION</CAPTION>
<TR><TD>R1C1</TD><TD>R1C2</TD><TD>R1C3</TD><TD>R1C4</TD></TR>
<TR><TD>R2C1</TD><TD>R2C2</TD><TD>R2C3</TD><TD>R2C4</TD></TR>
<TR><TD>R3C1</TD><TD>R3C2</TD><TD>R3C3</TD><TD>R3C4</TD></TR>
<TR><TD>R4C1</TD><TD>R4C2</TD><TD>R4C3</TD><TD>R4C4</TD></TR>
</TABLE>
<SCRIPT>
document.write('captionObj.vAlign='+captionObj.vAlign+'<BR>');
function showIt(){
  showA.innerHTML='captionObj.vAlign='+captionObj.vAlign+'<BR>';
}
</SCRIPT>
<BUTTON onClick="captionObj.vAlign='top';showIt()">vAlign=top</BUTTON>
<BUTTON onClick="captionObj.vAlign='bottom';showIt()">vAlign=bottom</BUTTON>
<DIV id=showA>°á°ú Ç¥½Ãâ</DIV>