University of Rhode Island HomeUniversity DirectoriesUniversity Fast Linkse-CampusDepartment HelpDepartment Webmail Server
Department Home

Most of the content (including this document) that you read on the web is written using HTML. HTML stands for hypertext markup language. HTML documents are just plain text files with codes, or tags, that specify how a document is to be formatted. All HTML documents have certain things in common and some of the tags will be presented here. Tags are always easy to identify because they are enclosed in angle brackets (< >). Tags are not case sensitive (<CODE> is the same as <code>). Some tags are said to be paired. That is to say they have an opening and a closing tag, where the closing tag has a forward slash in it (/).

The Bare Minimum

The following are a list of tags that pretty much all HTML documents contain:

<HTML>
<HEAD>
<TITLE>
</TITLE>
</HEAD>
<BODY>
</BODY>
</HTML>

<HTML>, <HEAD>, and <BODY>

The entire HTML document must be enclosed in <HTML> tags. The document is divided into two sections, the header and the body. These two sections are enclosed in <HEAD> and <BODY> tags respectively. The head contains information about the document and the body is the content of the document or the text you see in your browser.

The <BODY> tag also has attributes that you can set to determine the appearance of the document. The following are the most common attributes used in the <BODY> tag:

BGCOLOR="color"
LINK="color"
TEXT="color"
VLINK="color"

BGCOLOR specifies the background color and TEXT specifies the color of text in the document. LINK is the color of the unvisited links and VLINK is the color of the visited links. "color" specifies a color and is usually represented by an RGB value, which takes the form of a pound sign (#) followed by 6 hexadecimal digits, 2 for the intensity of red, 2 for green, and finally 2 for blue. So, for example, the color blue would be represented as "#0000FF", while the color yellow would be "#FFFF00". If you wanted to have a white background with red text, use the following:

<BODY BGCOLOR=#FFFFFF" TEXT="#FF0000">

<TITLE>

The <TITLE> tag contains the title of document. The title usually appears somewhere at the top of your browsers window. For example, the title of this document is "Introduction to HTML," which is produced by the following code in the header section:
<TITLE>Introduction to HTML</TITLE>

<P>

The most common tag in the body section is the paragraph (<P>) tag. These tags do not have to be paired, but pairing them is often useful to help you to see where each paragraph starts and ends.

<A HREF="url">

This tag is called an anchor and is used to create links to another document. "url" refers to the address of the document to which the link refers. This is what is usually displayed in the address bar of your browser. If you wanted to create a link the this department's web page, use the following:

<A HREF="http://www.ele.uri.edu/">URI Department of Electrical and Computer Engineering</a>

This will be displayed as:

URI Department of Electrical and Computer Engineering

<IMG SRC="url">

This tag lets you insert images into you web page. url is the address of the image you want to insert. You should also specify the width and height of the image, in pixels, using WIDTH= and HEIGHT=, respectively. It is also a good idea to specify a description for the image, using ALT=, in case the user does not have the capability to view pictures, or doesn't want to wait for the picture to download. Conisder an image in the same directory as your document that you want to include in your web page. The image is called sky.gif and is 42 pixels wide and 30 pixels high. You could use the following tag:

<IMG SRC="sky.gif" HEIGHT="30" WIDTH="42" ALT="a blue sky">

Where to go from here

There is a lot more to learn about HTML. One way to learn is to look at other web pages for examples. Most web browsers offer the option to view the source of a web page. This will show you the HTML behind what you are seeing in the browser.

University Home
©2006 Disclaimer

Write us at: 4 East Alumni Ave, Kingston, RI 02881-0805, USA.
Phone: 401-874-2505, Fax: 401-782-6422.
Contact the department. Javascript menu by Milonic.

Page last updated: Monday, April 24, 2000