Horizontal Rule, Special Characters and Comments
<hr> - produces a straight horizontal line across your page with a line break before and after.
- width - can set by pixels or percentage (<hr width="85%"> or <hr width="400">) - using pixels will render the exact length you define, no matter how big the browser window is on the user's screen. The page will scroll to accomodate a line longer than the window. Using percentage will allow the line to adjust according to the window size. As the window increases in size, the line will increase to meet the percentage specification.
- color - <hr color="red"> (only renders in IE, not recognized by Netscape)
There is not a vertical line code, just horizontal. To achieve a vertical line, create a gif image of a line or create a one-cell table with very narrow width.
Reason: when using same characters in text as in code, sometimes the browser will see the code and
begin to interpret html instead of text. It could cause display inconsistencies.
- In Dreamweaver: Toolbar -->Insert --> Special Characters
- In Homesite: Toolbar --> View --> Special Characters
The comment tag is used to make notes inside your html page that are only viewable to you (or by looking at the code. Text inside the comment tag does not appear in the browser. It's helpful if a group is working on a document, and you want to note the process or rules for a particular page, or to type reminders or to use as template instructions (i.e. title goes here, body text begins here, etc.).
<!-- anything inside this tag will not appear on the browser page -->
The comment tag is also used around some other programming languages, when instered into your html page to separate the code from the html.
Time to exercise your knowledge!
View Example Site