You are here:  NetStrider » Tutorials » HTMLRef » Commands » HR «

HTML Reference Guide

Author: Randy D. Ralph.   In place March 1, 1999.   Copyright © 1999 NetStrider.   Presented as a public service.

BACK <HR> Command next

Command Syntax:

<HR command parameters>

Creates a horizontal rule on the page of dimensions and attributes set by the command parameters.  Horizontal rules are the most commonly used page dividers.

The command is unpaired.

Command Parameters:

align="left | right | center"

Where:

  • left -
    aligns the rule to the left margin.
  • right -
    aligns the rule to the right margin.
  • center -
    centers the rule between the margins.
noshade

Normally, a horizontal rule is rendered as embossed and raised above the page background.  The noshade command parameter renders the rule as flat, and somewhat ironically, with a round-ended shaded look.

size="pixels"

Defines the depth of the horizontal rule, e.g., it's thickness.

width="% | pixels"

Defines the width of the horizontal rule and can be expressed as an absolute pixel value or or as a relative % of the display space available.

Examples:

<hr align=center width=150 size=10 noshade> Yields -
<hr align=left width=50% size=4> Yields -

<hr align=right width=75% size=1> Yields -

NOTE:  Horizontal rules take on the side to side dimensions of whatever space they are placed in.  They can be forced to assume a width larger than the space available by using absolute pixel values but this generally distorts the space in which they have been placed and can produce very odd results.  If a true page margin to page margin rule is desired, then it must be placed outside all lists and tables.

Return to Section E:H


Return to the List of Commands
Author: Randy D. Ralph.  In place March 1, 1999.  Copyright © 1999 NetStrider.  World Rights reserved.




Hosted by uCoz