center

center 要素 (HTML)

[1] HTMLcenter 要素型要素は、 div 要素の align 属性に center と指定したものと等価です HTML 4

つまり、要素内の文章を中央で揃えます。

[2] 仕様書:

代替

[3] この要素型は非推奨とされています HTML 4。 代わりにスタイル・シートを利用できます。

[4] CSS では text-align: center と指定することで似た効果が得られます。

歴史

[5] center 要素型は、 Netscape Navigator (1.1?) で導入されました。

Netscape Navigator が対応している非標準の HTML 語彙について説明している文書 (注) には、次のように記述されています。

You aren't dreaming, yes you can center your text. All lines of text between the begin and end of CENTER are centered between the current left and right margins. A new tag has been introduced rather than using the proposed <P Align="center"> because using <P Align="center"> breaks many existing browsers when the <P> tag is used as a container. The <P Align="center"> tag is also less general and does not support all cases where centering may be desired.

注: この文書の URI は

引用部は少なくても1996年10月から修正されていません。

[6] Re: Netscape & New HTML (<mid:marca-2010940637410001@gator1.mcom.com>, <http://groups.google.com/groups?selm=marca-2010940637410001%40gator1.mcom.com>) という Marc Andreessen の文章によれば、 Marc は、

と主張しています。それで center を実装したようです。

この辺の議論は www-html, www-talk, ietf-html, comp.infosystems.www.misc にまたがっていてしかも完全でない上に議論も話が色々に飛んでいて追いにくいのですが、

という感じにまとめられるでしょうか。

[7] Re: CENTER element [Was: Netscape & New HTML] <http://ksi.cpsc.ucalgary.ca/archives/HTML-WG/html-wg-94q4.messages/0105.html> では、 Dan Connolly が代わりの要素型名として divdivision がいいと言っています。 (が、この時はそれ以上話が進んではいません。)

[8] 結局その後 Netscape Navigatorp aligndiv align を実装することになります。

詳しくは align の項を参照してください。

[9] >>5

<dt><b><tt>&lt;CENTER&gt;</tt></b>
<center>
<dd>You aren't dreaming, yes you can center your text. All lines of
text between the begin and end of CENTER are centered between the
current left and right margins.  A new tag has been introduced
rather than using the proposed &lt;P Align="center"&gt; because
using &lt;P Align="center"&gt; breaks many existing browsers when
the &lt;P&gt; tag is used as a container.  The &lt;P Align="center"&gt;
tag is also less general and does not support all cases where
centering may be desired.
</center>

Stupid! It's by definition broken!

メモ

メモ

[13] position: center (Was: valign=center-style alignment in CSS3?) (Ian Hickson 著, 2004-01-26 23:24:42 +09:00 版) <http://lists.w3.org/Archives/Public/www-style/2004Jan/0218.html>