Site hosted by Angelfire.com: Build your free website today!

5.1Horizontal rules:

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.

5.1.1 the<hr>Tag:

it tells the browser to insert a horizontal rule across the display window.

<hr>

Function
Breaks a text flow and inserts a horizontal rule
Attributes
align, class, color (), dir, id, lang, noshade, onClick, onDblClick, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseMove, onMouseOut, onMouseOver, onMouseUp, size, style, title, width
End tag
None in HTML; </hr> or <hr ... /> in XHTML
Contains
Nothing
Used in
body_content
Example
Note that:
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.

5.1.1.1 the size attribute:

Normally, browsers render horizontal rules 2 to 3 pixels[1] thick with a chiseled, 3D appearance, making the rule look incised into the page. You may thicken the rules with the size attribute. Example

5.1.1.2 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. Example

5.1.1.3 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. Example

5.1.1.4 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. Example

5.1.1.5 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.

5.1.1.6 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.

5.1.1.7 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).