O'Reilly logo

Dynamic HTML: The Definitive Reference by Danny Goodman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

<CENTER> — NN all IE all HTML 3.2

Synopsis

<CENTER>...</CENTER>

End Tag: Required

The CENTER element was introduced by Netscape and became widely used before the W3C-sanctioned DIV element came into being. It is clear, even from the HTML 3.2 documentation, that the HTML working group was never fond of this element. Momentum, however, carried the day, and this element found its way into the HTML 3.2 specification. The element is deprecated in HTML 4.0 in favor of the DIV element with a style sheet rule of text-align:center. In lieu of style sheets (but still deprecated in HTML 4), you can use a DIV element with ALIGN="center".

Content of a CENTER element is aligned along an axis that runs down the middle of the next outermost containing element—usually the BODY.

Example

<CENTER>Don't do this.</CENTER>

Object Model Reference

IE

[window.]document.all.elementID

Attributes

CLASS

LANG

LANGUAGE

STYLE

TITLE

ID

    

Event Handler Attributes

Handler

NN

IE

HTML

onClick

n/a

4

n/a

onDblClick

n/a

4

n/a

onDragStart

n/a

4

n/a

onHelp

n/a

4

n/a

onKeyDown

n/a

4

n/a

onKeyPress

n/a

4

n/a

onKeyUp

n/a

4

n/a

onMouseDown

n/a

4

n/a

onMouseMove

n/a

4

n/a

onMouseOut

n/a

4

n/a

onMouseOver

n/a

4

n/a

onMouseUp

n/a

4

n/a

onSelectStart

n/a

4

n/a

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required