<font>—Specifying a Text Font

Using the <font> element, you can you select text size, color, and face. However, this element was deprecated in HTML 4.0, so it's not available in XHTML 1.1 or XHTML 1.0 Strict. It's supported in XHTML 1.0 Transitional and XHTML 1.0 Frameset. Here are this element's attributes:

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

  • color— Deprecated. Sets the color of the text. (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 ...

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.