Basic HTML Tags


Most HTML tags come in pairs, an opening and closing set. The text to be formatted by the tags is written between the pair. It is essential for both tags to be present for the document to work correctly. All tags are enclosed in left and right angle brackets (<) and (>). Closing tags are preceded by a backslash (/). The tags are not case sensitive though you may wish to keep paragraph related tags in uppercase and phrase/word related tags in lower case inorder to distinguish them more easily when scanning your file.

Table of Contents

Tags to Open & Close an HTML Document
Headings
Lists
Links
Images
Other Useful HTML Tags

Tags to open and close an HTML document

All HTML documents should begin with the following set of tags:
<HTML>
<HEAD>
<TITLE>
Write your title here.
</TITLE>
</HEAD>
<BODY>
Begin your main body of text here.
All HTML documents should end with the following set of tags:
</BODY>
</HTML>

Headings

Headings come in a number of levels or "sizes." The major title of an HTML document is usually the largest, <H1>. Heading tags are used in pairs, with the actual text of the heading between the two tags.

<H1> heading one </H1>

Heading One

<H2> heading two </H2>

Heading Two

<H3> heading two </H3>

Heading Three

Lists

Use these tags to create ordered (numbered) and unordered (bulleted) lists. List tags include pairs to designate the entire list and individual tags to mark each item within the list.

        <OL> Ordered list
        <LI> Line 1
        <LI> Line 2
        <LI> Line 3
        </OL> End list
  1. Line one
  2. Line two
  3. Line three

        <UL> Unordered list
        <LI> Line 1
        <LI> Line 2
        <LI> Line 3
        </UL> End list

Links

Hypertext links allow you to jump to other HTML files you've created and to sites around the Internet. It is necessary to know the URL for the site you wish to link to. The tags for a link include the URL (which is enclosed in quotation marks) and the anchor text (the text that you click to jump to the link).

<A HREF="the url"> anchor text </A>

<A HREF="http://www.lib.washington.edu/"> UW Libraries Home Page </A>

UW Libraries Home Page

Inline Images

Images can be a bit tricky because of the variety of image types. The easiest to work with are .gif and jpg images. You can scan in your own images using the scanners in Suzzallo Library or you can download an image from another Internet site (be aware of copyright restrictions). You should also add an additional message for non-graphical web browsers such as lynx which will describe the image.
<IMG 
SRC="http://www.lib.washington.edu/subject/history/bi/env201/env.gif">

[painting of Yosemite]

Other Useful HTML Tags

<P>
Use to create paragraphs. You must use this between each paragraph or else all of them will run together.
<BR>
Use to make a line break.
<HR>
Use to make a line across the page.


Back to Basic Primer for HTML