Producing web pages
* HTML CSS DHTML XHTML A to Z of tags        Accessibility          Design

<hr>

<hr
align=left|center|right
class=type
color=colour
id=value
noshade
size=n
style=style
title=text
width=n
</hr>

Draws a horizontal rule across the page. The default rule is a shaded, engraved line that goes across the full width of the page. There is no end tag.

Attributes

align=center|left|right

Sets the alignment of the rule. The default is center.

Value…

Description…

center

Rule is centred on the page

left

Rule is aligned to the left of the page

right

Rule is aligned to the right of the page

class=type

Indicates the class to which the tag belongs. You can use the class attribute in a style sheet to create different styles that you want apply to a single HTML tag. For example, you might create three different styles for a horizontal rule <hr> tag. See Using the class attribute as a selector for more details.

color=colour

The colour of the rule. Enter a hexadecimal, a red-green-blue colour value or a predefined colour name. See Using colour.

id=value

Specifies a unique name for the tag. No two tags can have the same id on a single page. The value must begin with a letter followed by any alphanumeric character, a hyphen, an underscore, a colon or a full stop. You use it to reference a unique style for a tag or to manipulate the tag with a script.

noshade

Draws the rule without 3-D shading; this gives a solid bar effect.

size=n

The height of the rule in pixels; this specifies how thick the line should be.

style=style

Specifies style information. See Style sheets for more information.

title=text

For information only. Some browsers display the title when you move the mouse over the tag (like a tool tip).

width=n

Sets the width of the rule, either in pixels or as a percentage of window width. To specify a percentage, the n must end with the percent (%) sign.