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
Other Useful HTML Tags

Tags to open and close an HTML document

All HTML documents should begin with the following set of tags:
Write your title here.
Begin your main body of text here.
All HTML documents should end with the following set of tags:


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


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


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=""> 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.

[painting of Yosemite]

Other Useful HTML Tags

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

Back to Basic Primer for HTML