Center

Support Key: [2|3|3.2|4] [X1|X1.1] [IE1|M2FB|N1|O2.1]
What is it?
Attributes
Tag Example
Parent/Content Model
Tips & Tricks
Browser Peculiarities
= Index DOT Html by Brian Wilson =
Main Index | Element Tree | Element Index | HTML Support History



   Quick Statistics   
End Tag:
   Required
Standards Details:
HTML: 4.x: Transitional and Frameset DTDs only
XHTML: 1.0: Transitional and Frameset DTDs only
XHTML Modules:
Legacy
CSS 'display' Type:
"block"
CSS Mapping:
text-align: center
Default Rendering:
Centered content block
Official Docs:
HTML 4.x, XHTML 1.0
What is it?
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.)

Common Attributes
%Core%
[2|3|3.2|4] [X1|X1.1] [IE3|M|N4B2|O3.5]
%Accessibility%
[2|3|3.2|4] [X1|X1.1] [IE4B1|M|N6|O5]
%Events%
[2|3|3.2|4] [X1|X1.1] [IE4B1|M|N6B1|O4]
%Language%
[2|3|3.2|4] [X1|X1.1] [IE4|M|N6B1|O]
%Editing%
[2|3|3.2|4] [X1|X1.1] [IE5.5|M|N|O]

Specific Attributes
Align
[2|3|3.2|4] [X1|X1.1] [IE|M|N|O4]
Standards Details: NA
Required? No
Description:
This indicates the horizontal alignment of the content in this block element relative to the browser window.
Values: Left [DEFAULT] | Center | Right
Height
[2|3|3.2|4] [X1|X1.1] [IE|M|N|O4-6.x]
Standards Details: NA
Required? No
Description:
This attribute explicitly specifies the height of this block element in pixels.
Values: Positive integers.
Width
[2|3|3.2|4] [X1|X1.1] [IE|M|N|O4-6.x]
Standards Details: NA
Required? No
Description:
This attribute explicitly specifies the width of this block element in pixels.
Values: Positive integers.
Markup example and Tests
<center>Centered text</center>
Parent Model
%Block Parent%
Content Model
%In-line Content% | %Block Content%
Tips & Tricks Browser Peculiarities
Boring Copyright Stuff...