O'Reilly logo

Real World XML by Steven Holzner

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

<center>—Centering Displayed Text

The <center> element is a very popular one that centers its enclosed text in the display area of the Web browser. Like many other styling elements and attributes in HTML 4.0, it was deprecated in favor of stylesheets, so it's supported only in XHTML 1.0 Transitional and XHTML 1.0 Frameset. Here are the attributes of this element:

  • class— Gives the style class of the element. (XHTML 1.0 Transitional, XHTML 1.0 Frameset.)

  • dir— Sets the direction of text that doesn't have an inherent direction in which you should read it, called directionally neutral text. You can set this attribute to LTR, for left-to-right text, or RTL, for right-to-left text. (XHTML 1.0 Transitional, XHTML 1.0 Frameset.)

  • id— Refers to the element; ...

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