Miscellaneous Tags

The <HR> tag will give you a horizontal rule or straight line across your web page. There is only one tag because it performs the entire action. The lines that divide sections throughout this tutorial are horizontal rules. The <HR> tag has a few optional attributes:
  • align= left, center or right.
  • width= The width specifies the length of the line, it can be in pixels or a percentage of the browser window (width="75%" for example).
  • size= is measured in pixels and controls the thickness of the line.
  • noshade By default horizontal rules are shown with a 3D effect, the attribute NOSHADE will turn off this effect and give you a solid line.
  • color= sets the color. This attribute is not supported by all browsers. The lines in this tutorial are red, so you can tell if your browser supports the color attribute.

The <CENTER> </CENTER> tags do just what you would expect, center whatever is between them in the browser window. The center tags can enclose text or images.

When a browser interprets an HTML file it normally ignores any carriage returns and extra spaces between words, relying on the HTML tags to control the formatting of the page. The only exception to this is text that is between <PRE> </PRE> pre formatted tags. Any spaces and carriage returns enclosed within these tags are used by the browser.
This   text   is enclosed
in  the  <PRE>
            </PRE> pre formatting tags.
The same text, typed in the same way without the tags looks like: This text is enclosed in the <PRE> </PRE> pre formatting tags. The only drawback to the <PRE> </PRE> tags, is they display text in a fixed width font.