Adding Style to your Web Page




HTML makes it easy to add style to your page. This section will provide you with information on horizontal rules, headings and other text styles.

Horizontal Rules

The <hr> horizontal rule tag creates a line which can be used to break up space on your page. The <hr> horizontal rule tag has three principal attributes:
  • Width can be set in pixels or as a percentage with the width attribute. The default width is 100%.
  • Alignment can be set to left, right or center with the alignment attribute
  • Thickness can be set pixels with the size attribute. Default is 3 pixels.
Here's how <hr width=75% align=center size=4> appears in your browser:


Headings

The heading tag allows you to add headings and subheadings to your page. The headings tag has six sizes:

This is <h1>

This is <h2>

This is <h3>

This is <h4>

This is <h5>
This is <h6>

Headings can be aligned left, right or center with the align attribute. Left is the default alignment. Here's how <h3 align=center> Center Heading <h3> appears in your browser:

Center Heading

Center

Like the align attribute, the <center> center tag can be used to center text, graphics, or tables. Here's how <center>This is center text.</center> would appear in your browser:

This is center text.

Bold

The <b> bold tag makes text darker and thicker. Here's how <b>This is bold text </b> would appear in your browser:

This is bold text

Italics

The <i> italics makes text italic. A similar tag, <adress> also makes text italic and is generally used to provide contact information a the end on a page.

Font

The <font> font tag can be used to change the size, or style. The font tag has three main attributes:
  • The font size can be changed with the size attribute. The value of this attribute can be an absolute value from 1 to 7 or a relative value to the basefont size. The default base font size is 3. For example, the following both produce a font size of 4:

    <font size=4>This is font size 4 </font>

    This is font size 4

    <font size=+1>This is also font size 4 </font>

    This is also font size 4

  • The font color can be changed with the color attribute. The value of the color attribute can be the RGB color value or one of the standard color names. For example, the following both produce red text:

    <font color=#FF0000>This is red.</font>

    This is red.

    <font color=red> This is also red.</font>

    This is also red.

  • The font style can be changed with the face attribute.

    <font face="Comic Sans MS">This is Comic Sans.</font>

    This is Comic Sans.

Nesting Tags

You can also use multiple tags and attributes together to get neat effects. When nesting tags, be sure to close the tags in the same order that you opened them.

<font size=+1 color=red> <b> <i>This is neat.</font> </b> </i>

This is neat

In this section we have provided you with some basic tags to add style to your page.




Use your BackSpace key to return to the MAIN page
Copyright,�, 1998, Charles and Susan Albritton.
Site Design and Maintained by Charles and Susan Albritton
If you have any questions or Comments mail to WebMaster
Go to Top Of Page