HTML Horizontal Rule
By Stephen Bucaro
A horizontal rule created by the tag <hr /> creates a horizontal line that can
can be used to break a webpage into sections. A horizontal rule is a block-level element,
which means it has embedded carriage returns before and after, placing it on it's own line.
Shown below is a generic horizontal rule.
The horizontal rule has several attributes that allow you to control its appearance.
|align|| Alignment on page, left, right, or center.|
|color|| Color of the rule.|
|noshade|| Normally horizontal rules display with 3D shading.|
|size|| Thickness in pixels.|
|width|| Width in pixels, or as a percentage of document width.|
Horizontal Rule Example
<hr align="left" size="6" width="200" color="green" />
The code above creates the horizontal rule shown below.
I know this section should be about html only, but the example below shows what you
can do by adding a little style to a horizontal rule.
<hr align="left" size="8" width="200" style="border-style:outset; background-image: url('bg000017.gif');" />
If you're using the Firefox browser, you'll see a beautiful rainbow colored three-dimensional
rule. If your using Internet Explorer, you'll see a three-dimensional gray rule.
More HTML Code:
• HTML Select List Basics
• How to Code HTML Lists
• Easy Code to Add Yahoo Site Search to Your Website
• HTML dfn Tag
• HTML Special Characters - Character Entities
• Providing Alternate and Title Text for an Image
• Set Form Controls Tab Order With tabindex Attribute
• HTML SPAN Basics
• Using col and colgroup to Apply Attributes to a Table Column
• Use fieldset to Organize Form Elements