Center is an element that centers the content it contains within its
parent block element. The element was created to fill the need for
authors to have some extra text alignment controls, but the effects
this element produces have been absorbed by other block formatting
elements as the ALIGN attribute and in CSS as the 'text-align' property
(extending alignment control to right alignment and justification as well.)
The interaction rules for this element are somewhat relaxed since it
was created by Netscape and implemented by many other browsers before it was
officially integrated into HTML 3.2. CENTER behaves most closely like other block
formatting elements (in that a block is defined by having a linebreak before and
after the contained content.)
The CENTER element has a parent/content model that is much
less strict in practice than other block formatting elements are.
It is often used to encompass other block formatting elements.
Until HTML 3.2 it was considered better HTML authoring to
use the P ALIGN or DIV ALIGN elements to center content, but HTML
3.2 gave CENTER its official "blessing" by including it in the
standard. The newest versions of HTML/XHTML are phasing out many
of HTML's presentation attributes in favor of CSS, and CSS DOES
allow greater presentation control than CENTER.
CAVEAT: Use of any of the currently valid alignment properties to
center tables structures (CENTER, P ALIGN & DIV ALIGN) will have
an unfortunate effect on browsers that understand alignment properties
but do not understand tables: It will center all of the table contents.
This can render useless most attempts to degrade tables gracefully and
can create very odd looking results. Remember to try viewing your pages
on browsers with different capabilities!
DTD NOTE: Alignment tags/attributes do not
react very well with Netscape's MULTICOL element.
Tables capable browsers will need either a CENTER element or a DIV
ALIGN=CENTER element to center an entire table. TABLE ALIGN=CENTER may
also work for this purpose.
Opera 4.0: This is one of those occasions where you just have to
scratch your head - an element whose explicit purpose is to center
content can be used to left and right align content as well with the