<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; ...

Get Real World XML now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.