<center>
ì§ìì´ ì¤ë¨ëììµëë¤: ì´ ê¸°ë¥ì ë ì´ì ê¶ì¥ëì§ ììµëë¤. ì¼ë¶ ë¸ë¼ì°ì ììë ìì§ ì§ìí ì ìì§ë§ ê´ë ¨ ì¹ íì¤ìì ì´ë¯¸ ì ê±°ëìê±°ë ì ê±° ê³¼ì ì ìë ê²½ì°ê° ìì¼ë©°, í¸íì±ì ìí´ ì ì§ëê³ ìì ì ììµëë¤. ì¬ì©ì í¼íê³ ê°ë¥íë¤ë©´ 기존 ì½ë를 ì ë°ì´í¸íì¸ì. ê²°ì ì ì§ìí íë¨ì í¸íì± í를 íì¸íì¸ì. ì´ ê¸°ë¥ì ì¸ì ë ì§ ìëì ì¤ë¨í ì ììì ì ìíì¸ì.
ê°ì
ì´ HTML Center (<center>)ììë ëë¤ë¥¸ ë¸ë¡ììì í¬í¨íê±°ë, ì¸ë¼ì¸ìì(Inline)를 í¬í¨í ì ìë ë¸ë¡ìì±(block-level) ì ììì´ë¤. ê·¸ë¦¬ê³ í´ë¹ <center> ìììì í¬í¨ë ì ì²´ììë <center>ì ë´ì©ìì ê°ì´ë° ì ë ¬ì´ ëë¤. (íµìì ì¼ë¡ <body>ë¡ ì°ì).
ì´ íê·¸ë HTML4(ëë XHTML 1)ì´íìë ìì¬ì©ëì§ ìê³ , CSSì text-align ìì±ì´ ì¦ê²¨ ì¬ì©ëë¤. <div> ììë <p>ìì ê°ì ë¸ë¡ìì±ì´ ìë ììì ì¬ì©ë ì ìë¤.ë ë¤ë¥¸ ë°©ë²ì¼ë¡ë CSSìì±ì ì¬ì©íì¬ margin-left ëë margin-right ëë marginì ìë(Css("margin") 를 0 auto)ì¼ë¡ ì¤ì íë¤.
DOM ì¸í°íì´ì¤
ì´ ììë HTMLElement ì¸í°íì´ì¤ë¥¼ 구íí©ëë¤.
ì°¸ê³ :
Implementation note: up to Gecko 1.9.2 inclusive, Firefox implements the HTMLSpanElement interface for this element.
ìì 1
<center>
This text will be centered.
<p>So will this paragraph.</p>
</center>
ìì 2 (CSS ëì)
<div style="text-align:center">
This text will be centered.
<p>So will this paragraph.</p>
</div>
ìì 3 (CSS ëì)
<p style="text-align:center">
This line will be centered.<br />
And so will this line.
</p>
ë©ëª¨
Applying text-align:center to a <div> or <p> element centers the contents of those elements while leaving their overall dimensions unchanged.