µð½ºÇ÷¹À̳ª Å×ÀÌºí¿¡ »ó´ëÀûÀ¸·Î °³Ã¼¸¦ Á¤·ÄÇÏ´Â ¹æ¹ýÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù.

Àμö
: (¼Ó¼º ¹®ÀÚ¿­)
¼Ó¼º°ªÀº ´ÙÀ½ Áß ÇϳªÀÇ ¹®ÀÚ¿­ÀÌ´Ù.

center Áß¾Ó¿¡ Á¤·ÄÇÑ´Ù. th ¿¤·¹¸àÆ®¿¡¼­´Â center°¡ µðÆúÆ®ÀÌ´Ù.
justify ¿ÞÂÊ°ú ¿À¸¥ÂÊ Å׵θ®¿¡ Á¤·ÄÇÑ´Ù. div hn p ¿¤·¹¸àÆ®¿¡¼­¸¸ °¡´É
left µðÆúÆ®À̸ç, ¿ÞÂÊ Å׵θ®¿¡ Á¤·ÄÇÑ´Ù.
right ¿À¸¥ÂÊ Å׵θ®¿¡ Á¤·ÄÇÑ´Ù.

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

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

HTML ±Ô°Ý¿¡¼­ ºÒ·®ÇÑ °ÍÀÌ µÇ¾ú´Ù.

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


table, tr, td, tFoot, col, colGroup ¼Ó¼º ¿¹Á¦

R1C1R1C2R1C3R1C4R1C5
R2C1R2C2R2C3R2C4R2C5
R3C1R3C2R3C3R3C4R3C5
R4C1R4C2R4C3R4C4R4C5
<TABLE id="tableObj" border=1 width=90% align="center">
<COL align="right" style="color:blue"><COLGROUP align="center" style="color:teal"><COL><COL></COLGROUP>
<TR><TD>R1C1</TD><TD>R1C2</TD><TD>R1C3</TD><TD>R1C4</TD><TD>R1C5</TD></TR>
<TR><TD>R2C1</TD><TD>R2C2</TD><TD>R2C3</TD><TD>R2C4</TD><TD>R2C5</TD></TR>
<TR align="left"><TD>R3C1</TD><TD>R3C2</TD><TD>R3C3</TD><TD>R3C4</TD><TD align="center">R3C5</TD></TR>
<TFOOT align="center" style="color:red">
<TR><TD align=left>R4C1</TD><TD>R4C2</TD><TD>R4C3</TD><TD>R4C4</TD><TD>R4C5</TD></TR>
</TFOOT>
</TABLE>
<SCRIPT>
str='tableObj.align='+tableObj.align+'<BR>';
tbCol=tableObj.all;
str+='tbCol.length='+tbCol.length+'<BR>';
for (i=0;i< tbCol.length;i++){
  if (tbCol(i).align){
    str+='<SPAN style=width:6em>'+tbCol(i).nodeName+'</SPAN>';
    str+='<SPAN style=width:11em>tbCol('+i +').align=<FONT color=blue>'+tbCol(i).align+'</FONT></SPAN>';
    str+='<SPAN style=width:11em>tbCol('+i+').innerText=<FONT color=green>'+tbCol(i).innerText+'</FONT></SPAN><BR>';
  }
}
document.write(str);
</SCRIPT>

div ¼Ó¼º ¿¹Á¦

¹®´Ü ¹®ÀÚ¿­.
°á°ú Ç¥½Ãâ
<DIV id="divObj" width="600" align="justify" style="border:solid 1 blue;color:blue">¹®´Ü ¹®ÀÚ¿­.</DIV>
<SELECT onchange="divObj.align=this.value;showA.innerText='divObj.align='+divObj.align">
<OPTION value="left" selected>left
<OPTION value="center">center
<OPTION value="right">right
<OPTION value="justify">justify
</SELECT>
<DIV id=showA>°á°ú Ç¥½Ãâ</DIV>