Writing@CSU

Writing Guides

Writing for the Web

 

The HTML Tagging Language

Web pages are created using HTML – hypertext markup language. HTML works on a simple principle: turning something on and then turning it off. For instance, you can start and end:

  • headings
  • paragraphs
  • emphasized (or italic) text
  • strong (or bold) text

HTML turns something on or off using tags. A tag consists of a command surrounded by left and right angle brackets. For instance, the tag for starting the body of an HTML document is <BODY>. The tag for ending the body is </BODY>. The forward slash ( / ) is a critical part of an ending tag in HTML. It distinguishes an ending tag from a starting tag.

Selected HTML Tags

First-Level Heading: <H1> and </H1>

Second-Level Heading: <H2> and </H2>

Third-Level Heading: <H3> and </H3>

Paragraphs: <P> and </P>

Emphasized (usually italicized) Text: <EM> and </EM>

Strong (usually bold) Text: <STRONG> and </STRONG>

Bold Text: <B> and </B>

Italicized Text: <I> and </I>

Underlined Text: <U> and </U>

Subscripted Text: <SUB> and </SUB>

Superscripted Text: <SUP> and </SUP>

Many tags can be modified using attributes. The <BODY> tag, for instance, can be modified with attributes that control the appearance of the page background, the color of text on the page, and the color of links on the page. A <BODY> tag using attributes might appear as follows:

<BODY BGCOLOR="White" TEXT="Black" LINK="#3366FF" VLINK="#003399" ALINK="#0000FF" BACKGROUND="niftyimage.jpg">


Attribute Definition and Values
BACKGROUND: Background image. The BACKGROUND attribute identifies the name and location of the image file.
BGCOLOR: Background color. The BGCOLOR attribute identifies the color name or hexadecimal code, e.g., red or #FFOOOO, white or #FFFFFF, black or #OOOOOO
TEXT: Text color. The TEXT attribute identifies the color of body text in the document using a color name or hexadecimal code
LINK: Unvisited link color. The LINK attribute identifies the color of unvisited links in the document using a color name or hexadecimal code.
VLINK: Visited link color. The VLINK attribute identifies the color of unvisited links in the document using a color name or hexadecimal code.
ALINK: Active link color. The ALINK attribute identifies the color of active links in the document using a color name or hexadecimal code.
MARGINHEIGHT: Margin height for the page. The MARGINHEIGHT attribute sets the margin, in pixels, at the top of the page. This works in Netscape only.
MARGINWIDTH: Margin width for the page. The MARGINWIDTH attribute sets the margin, in pixels, on the left side of the page. This works in Netscape only.
TOPMARGIN: Margin at the top of the page. The TOPMARGIN attribute sets the margin, in pixels, at the top of the page. This works in IE 4.0 and above only.
LEFTMARGIN: Margin width on the left side of the page. The LEFTMARGIN attribute sets the margin, in pixels, on the left side of the page. This works in IE 4.0 and above only.
BGPROPERTIES="fixed": This turns the background image into a watermark. It keeps the image in the same place, instead of tiling the image. This works in IE 4.0 and above only.
See Also
Links Page: Learn more about HTML on the HTML links page.

Coding Primer: You can read about putting HTML to work in Creating a Simple HTML Document.

Copyright © 1993-2009 Colorado State University and/or this site's authors, developers, and contributors. Some material displayed on this site is used with permission.