Visit Mozilla.org

HTML:Element:hr

From MDC

[edit] Summary

Horizontal rule element is used to insert a horizontal rule to separate document sections. Rules usually are rendered as a raised or etched line.

[edit] Attributes

align Deprecated
Sets the alignment of the rule on the page. If no value is specified, the default value is left.
color Non-standard
Sets the color of the rule through color name or hexadecimal value.
noshade Deprecated
Sets the rule to have no shading.
size Deprecated
Sets the height, in pixels, of the rule.
width Deprecated
Sets the length of the rule on the page through a pixel or percentage value.

[edit] Example

  <p>This is the first paragraph of text. This is the first paragraph of text.
     This is the first paragraph of text. This is the first paragraph of text.</p>

  <hr>

  <p>This is second paragraph of text. This is second paragraph of text.
     This is second paragraph of text. This is second paragraph of text.</p>

Above HTML will output:

This is the first paragraph of text. This is the first paragraph of text. This is the first paragraph of text. This is the first paragraph of text.


This is second paragraph of text. This is second paragraph of text. This is second paragraph of text. This is second paragraph of text.

[edit] Notes

To change look of rule or gaps between it and paragraphs, use cascading style sheets.

[edit] See also


HTML Elements
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
(Quick Links: HTML Element Cross Reference, HTML Category)