Name

hr

Synopsis

<hr />

Adds a horizontal rule to the page that can be used as a divider between sections of content. This is an example of a presentational HTML element. A rule between sections of a document may be better handled using a border on the top or bottom edge of a block element.

Attributes

Core(id, class, style, title), Internationalization, Events

align="center|left|right"

Deprecated. If the rule is shorter than the width of the window, this attribute controls horizontal alignment of the rule. The default is center.

noshade="noshade"

Deprecated. This displays the rule as a solid bar with no shading.

size=" number "

Deprecated. Specifies the thickness of the rule in pixels.

width="number" or "number%"

Deprecated. Specifies the length of the rule in pixels or as a percentage of the page width. By default, rules are the full width of the browser window.

Get Web Design in a Nutshell, 3rd Edition 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.