Horizontal rules give you a way to separate sections of your document visually. That way, you give readers a clean, consistent, visual indication that one portion of your document has ended and another portion has begun.
it tells the browser to insert a horizontal rule across the display window.
- Breaks a text flow and inserts a horizontal rule
- align, class, color (), dir, id, lang, noshade, onClick, onDblClick, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseMove, onMouseOut, onMouseOver, onMouseUp, size, style, title, width
None in HTML; </hr> or <hr ... /> in XHTML
1.There is no additional space above or below a horizontal rule.
2.A paragraph tag following the rule tag is necessary if you want the content beneath the rule line aligned in any style other than the default left.
18.104.22.168 the size attribute:
Normally, browsers render horizontal rules 2 to 3 pixels thick with a chiseled, 3D appearance, making the rule look incised into the page. You may thicken the rules with the size attribute.
22.214.171.124 The noshade attribute
You may not want a 3D rule line, preferring a flat, 2D rule. Just add the noshade attribute to the <hr> tag to eliminate the 3D effect.
126.96.36.199 The width attribute
The default rule is drawn across the full width of the view window. You can shorten or lengthen rules with the width attribute.
we recommend specifying rule width as a percentage of the window width. That way, when the width of the browser window changes, the rules retain their same relative size.
188.8.131.52 The align attribute
The align attribute for a horizontal rule can have one of three values: left, center, or right. For those rules whose width is less than that of the current text flow.The default alignment is center.
184.108.40.206 The color attribute
Supported only by Internet Explorer,the color attribute lets you set the color of the rule line.By default, a rule is set to the same color as the document background,You lose the 3D effect when you specify another color, either in a style sheet or with the color attribute.
220.127.116.11 Combining rule attributes
In fact, some combinations of rule attributes are necessary — align and width, for example. Align alone appears to do nothing, because the default rule width stretches all the way across the display window.
18.104.22.168 The class, dir, event, id, lang, style, and title attributes
These attributes give you a common way to identify (title) and label (id) a tag's contents for later reference or automated treatment, to change the contents' display characteristics (class, style), to reference the language (lang) used, and to specify the direction in which the text should flow (dir).