<hr>—Creating Horizontal Rules

Another handy element to arrange text is the <hr> horizontal rule element. This element just causes the browser to draw a horizontal line to separate or group elements vertically. It's supported in XHTML 1.0 Strict, XHTML 1.0 Transitional, XHTML 1.0 Frameset, and XHTML 1.1. Here are the attributes of this element—note that it includes a few attributes that have been deprecated:

  • align— Deprecated (you're supposed to use styles now instead). Sets the alignment of the rule to left, center (the default), or right. To set this attribute, you must also set the width attribute. (XHTML 1.0 Transitional, XHTML 1.0 Frameset.)

  • class— Gives the style class of the element. (XHTML 1.0 Strict, 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.