Appendix A

HTML Tags

by John Jung


CONTENTS

There are many HTML elements, and each has its own set of attributes that it can use. This is a complete list of HTML tags, their corresponding attributes, and a description of what they do.

<!--> and --> Comment

You can put in a comment in your Web document by enclosing it between the <!-- beginning marker, and the --> ending marker. Some browsers will not properly handle HTML-related characters within the comments. Also, not all browsers correctly recognize the double dashes as being needed for the start of the comment. This HTML tag has no attributes.

The following is an example of <!-- -->:

<!-- This line of text will only be seen by people who look at the HTML source. -->

<A>: Anchor

The Anchor HTML tag is an important element for hypertext links of any sort. The Anchor element type can have the following attributes:

The following is an example of <A>:

<A HREF="http://www.mysite.com/" NAME="destination1"> Sample anchor 

<ABBREV>: Abbreviations

The proposed Abbreviations tag will change some of the enclosed text into abbreviations. This does not change the actual text, just how it's displayed by the browser. This is a work in progress. The Abbreviations tag can have the following attributes:

The following is an example of <ABBREV>:

<ABBREV>Some of these words will be abbreviated when displayed.</

<ACRONYM>: Acronym

The proposed HTML 3 tag, <ACRONYM>, will display the enclosed text with acronyms. This does not change the actual text, just how it's displayed by the browser. This is a work in progress. The Acronym tag can have the following attributes:

The following is an example of <ACRONYM>:

<ACRONYM>Some of these words will be reduced to acronyms when displayed.</ACRONYM>

<ADDRESS>: Address

The <ADDRESS> tag is used to indicate an address, typically the e-mail address of the Web author. The Address element can have the following attributes:

The following is an example of <ADDRESS>:

<ADDRESS>This page was created by me.</ADDRESS>

<APPLET>: JAVA Applet

This proposed HTML extension was introduced in Netscape Navigator. When used, browsers that can run JAVA applications will run the specified JAVA applet. Parameters that you want to pass to a particular JAVA application can be done with the <PARAM> tag. <APPLET> can have the following attributes:

The following is an example of <APPLET>:

<APPLET CODE="myprogram" WIDTH=200 HEIGHT=200>My first JAVA 

<AREA>: Area for a Clickable Map

This proposed extension to HTML by Netscape is used to create client-side imagemaps. This tag is intended to specify one clickable region on a graphic. <AREA> has the following attributes:

The following is an example of <AREA>:

<AREAD COORD="0,0","100,100" SHAPE=rect HREF="http://www.mysite.com/" ALT="Go to my site!">

<AU>: Author

This proposed HTML 3 tag is used to indicate the name of an author. <AU> can have the following attributes:

The following is an example of <AU>:

The authors of this book are <AU>Mark Brown and John Jung</AU>.

<B>: Bold

This tag will make whatever text is enclosed within it display in a bold font. The <B> tag can have the following attributes:

The following is an example of <B>:

This word is in <B>bold</B>.

<BANNER>: Banner

This is a proposed HTML 3 tag that will display something as a banner. The text in this tag will not scroll with the rest of the HTML document. It's mainly intended to be used for company logos or navigational aids. You can use the following attributes:

The following is an example of <BANNER>:

<BANNER>This home page was created by MeSoft.</BANNER>

<BASE>: Base URL

The <BASE> HTML element is used to indicate the default location of relative URL links. This is useful in the event that you move your home page to another computer. If this happens, all relative links on that page will not have to be updated. This tag can have the following attributes:

The following is an example of <BASE>:

 <BASE HREF="http://www.mycomputer.com/homepage/mystuff/">

<BASEFONT>: Default Font Size

This HTML element is used to indicate the default font size for the current HTML document. <BASEFONT> was originally introduced as an extension by Netscape. It has only one attribute: SIZE. This attribute indicates which default font value to use. By default, the font value used is 3. There are seven possible values for this attribute: 1, 2, 3, 4, 5, 6, and 7. These do not indicate point sizes, but rather a predetermined font size.

The following is an example of <BASEFONT>:

<BASEFONT SIZE=4>

<BDO>: Directional Override

This proposed tag is intended for the internationalization of HTML. The <BDO> tag is used to indicate how text should be displayed by the browser. It has the following attributes:

The following is an example of <BDO>:

<BDO DIR=ltr>This will cause text to flow from the left to the 

<BGSOUND>: Background Sound

Microsoft introduced this proposed extension to HTML for adding more flair to home pages. This will cause a sound file to be played in the background while the user is looking at the home page. This tag can have the following attributes:

The following is an example of <BGSOUND>:

<BGSOUND SRC=http://www.mysite.com/intro.wav>

<BIG>: Big

This is a proposed HTML 3 tag that instructs the browser to make the enclosed text big. This can have the following attributes:

The following is an example of <BIG>:

This word will come out <BIG>BIG</BIG>

<BLINK>: Blink

This HTML tag will cause the enclosed text to blink. This tag was introduced by Netscape as a proposed extension. Some people find the <BLINK> tag to be quite annoying.

The following is an example of <BLINK>:

See what's <BLINK>NEW</BLINK> at this page!

<BLOCKQUOTE>: Blockquote

When a browser comes across this HTML tag, it will show the text as quoted text. This typically means that the text will be indented on both the left and right. <BLOCKQUOTE> can have the following attributes:

The following is an example of <BLOCKQUOTE>:

<BLOCKQUOTE>To be or not to be, that is the question.</BLOCKQUOTE>

<BODY>: Body

This HTML tag encloses the body of the Web page. Everything you want users to see is enclosed within the <BODY> tag. This element can have the following attributes:

The following is an example of <BODY>:

<BODY BACKGROUND="http://www.mysite.com/backdrop.gif">[Web page]</

<BQ>: BlockQuote

This is a proposed HTML 3 element that is intended to replace the <BLOCKQUOTE> tag. <BQ> is different from <BLOCKQUOTE> in that it does not imply word wrapping. This tag has the following attributes:

The following is an example of <BQ>:

<BQ>We hold these truths to be self-evident</BQ>

<BR>: Line Break

This HTML tag forces a new line to be created at that point. This means that whether or not word wrap will take effect, the line break will occur. This element has the following attributes:

The following is an example of <BR>:

Even though this line may word wrap on your browser, 
it'll still have a line break at the end.<BR>

<CAPTION>: Caption

This HTML 3 proposed tag was originally a Netscape proposed extension. This element is used to attach a label to a table or a figure. <CAPTION> has the following attributes:

The following is an example of <CAPTION>:

<CAPTION>Table 1.1</CAPTION>

<CENTER>: Center

This Netscape-specific extension to HTML will center all enclosed text. This has since been superseded by the HTML 3 proposals. Now, all text elements have an ALIGN attribute that can be set to center.

Example:

<CENTER>This text is centered on the browser.</CENTER>

<CITE>: Citation

The CITE element is used when you want to indicate a citation of some sort. It has the following attributes:

Example:

<CITE>Hamlet, ACT V, Scene I</CITE>

<CODE>: Source Code

The <CODE> element should be used when you want to indicate source code. If you're giving people instructions on how to do something with a computer, use this tag. You can use the following attributes:

The following is an example of <CODE>:

At the UNIX prompt, type in <CODE>ls -al</CODE>

<COL>: Column Defaults

There is a new proposed HTML 3 standard for table creation. One of the new tags included in that proposal is the <COL> element. You can use this element to define some standard behavior for table columns. This tag has the following attributes:

The following is an example of <COL>:

<COL ALIGN=char CHAR="." WIDTH="100mm">

<COLGROUP>: Column Group

The <COLGROUP> element is a container for a group of columns. It also enables you to set the defaults for all of these columns. This element has the following attributes:

The following is an example of <COLGROUP>:

<COLGROUP ALIGN=char CHAR=".">10.0</COLGROUP>

<CREDIT>: Credit

This HTML 3 proposed tag should be used to name the source of information. The following attributes are available:

The following is an example of <CREDIT>:

<CREDIT>By William Shakespeare</CREDIT>

<DD>: Definition List Data

If you choose to make use of a definition list in your home page, you'll need <DD>. This HTML tag is used to indicate a definition for the definition list. A <DD> tag should always be preceded by a <DT> tag. The <DD> element has the following attributes:

The following is an example of <DD>:

<DD>Sample Definition</DD>

<DEL>: Delete

This HTML 3 tag is meant to supersede the <S> or <STRIKE> elements. Text enclosed within a <DEL> tag will be shown as strikethrough. You have the following attributes available:

The following is an example of <DEL>:

This is a <DEL>mistake<DEL>.

<DFN>: Definition

This HTML 3 tag will have the browser display the enclosed text as a description. If the current Web page makes use of a lot of definitions, you should use this tag. This element has the following attribute:

The following is an example of <DFN>:

<DFN>HTML-HyperText Markup Language</DFN>

<DIR>: Directory List

The <DIR> element is used when you want to create an unordered list of single-line elements. Each line in the <DIR> list is defined by the <LI> tag. You can apply the following attributes to the <DIR> tag:

The following is an example of <DIR>:

<DIR ALIGN=center><LI>MYFILE.EXE</LI><LI>MYFILE.TXT</LI></DIR>

<DIV>: General Text Division

This proposed HTML 3 tag is intended to be used to replace the Netscape-specific <CENTER> tag. It has the following attributes:

The following is an example of <DIV>:

<DIV ALIGN=center>This line is centered.</DIV>

<DL>: Definition List

If you're going to use a lot of definitions or have a page of definitions, you need this tag. Each entry in the definition list is made up of <DT> and <DD> tags. You can use the following attributes:

The following is an example of <DL>:

<DL><DT>Internet</DT><DD>A distributed collection of computers spread worldwide.</DD></DL>

<DT>: Definition List Title

This is one of the three HTML elements you need to use when creating a definition list. You create headings for your definitions with the <DT> tag. This HTML element comes with the following attributes:

The following is an example of <DT>:

<DT>Definiton Heading</DT>

<EM>: Emphasis

There are a number of ways of making text stand out. Place this HTML tag around the text that you want to emphasize. It has the following attributes:

The following is an example of <EM>:

I repeat, you're <EM>WRONG</EM>!

<EMBED>: Embed Netscape Plugin

Netscape Navigator 2.0 provides for the capability to insert arbitrary objects. This is done with the newly created Netscape-specific tag, <EMBED>. You have a number of attributes you can use:

The following is an example of <EMBED>:

<EMBED SRC="mymovie.dcr">

<FIG>: Figure

A new element in the HTML 3 proposal is the <FIG> tag, an improved <IMG> tag. You can include text elements as well as specify hotspots with other tags. You can also use the <OVERLAY> element to put overlays on top of figures. <FIG> has the following attributes:

The following is an example of <FIG>:

<FIG SRC="http://www.mysite.com/mygraphic.gif"></FIG>

<FN>: Footnote

A new proposed HTML 3 tag is the footnote element. Currently, very few browsers support this tag. You have the following attributes available:

The following is an example of <FN>:

<FN>This is a footnote.</FN>

<FONT>: Font Size

The <FONT> element, first introduced by Netscape, enables various font manipulations. It has not been adopted as part of the new HTML 3 proposal. <FONT> has the following attributes:

The following is an example of <FONT>:

<FONT SIZE=+2>

<FORM>: Fill Out Forms

The fill-out form is one of the best ways to get user input. The biggest drawback to using <FORM> is that you must have a CGI script to retrieve the information. Here is a list of attributes for this tag:

The following is an example of <FORM>:

<FORM ACTION="http://www.mysite.com/cgi-big/get.cgi" METHOD="GET"></FORM>

<FRAME>: Frame

This is a new Netscape-specific HTML extension, which provides better handling of the browser's window. Netscape enables URLs to update certain frames or for some frames to remain on the browser. The <FRAME> tag has a number of attributes:

The following is an example of <FRAME>:

<FRAME SRC="http://www.mysite.com/myframe.html" SCROLLING="YES" 

<FRAMESET>: Frame Setup

The <FRAMESET> tag is another proposed extension from Netscape to be used instead of the <BODY> element. This tag is used only to set up other frames that will be the actual page. You must use the <FRAME> element if you use this tag. You have a number of attributes available:

The following is an example of <FRAMESET>:

<FRAMESET COLS="50%,50%" ROWS="600, 400"></FRAMESET>

<H1>: Heading, Level 1

This HTML tag displays text as the most prominent header. It has the following attributes:

The following is an example of <H1>:

<H1>This is the largest heading.</H1>

<H2>: Heading, Level 2

This HTML tag displays text as the second most prominent header. It has the following attributes:

The following is an example of <H2>:

<H2>This is the second largest heading.</H2>

<H3>: Heading, Level 3

This HTML tag displays text as the third most prominent header. It has the following attributes:

The following is an example of <H3>:

<H3>This is the third largest heading.</H3>

<H4>: Heading, Level 4

This HTML tag displays text as the fourth most prominent header. It has the following attributes:

The following is an example of <H4>:

<H4>This is the fourth largest heading.</H4>

<H5>: Heading, Level 5

This HTML tag displays text as the fifth most prominent header. It has the following attributes:

The following is an example of <H5>:

<H5>This is the fifth largest heading.</H5>

<H6>: Heading, Level 6

This HTML tag displays text as the least prominent header. It has the following attributes:

The following is an example of <H6>:

<H6>This is the smallest heading.</H6>

<HEAD>: Head

This element is intended to hold information about the HTML document. Although you can put other HTML elements within the <HEAD>, none of them will be displayed in the browser's window. This tag has the following attributes:

The following is an example of <HEAD>:

<HEAD><TITLE>This Is My Home Page</TITLE></HEAD>

<HR>: Horizontal Rule

When used, the <HR> tag creates a horizontal line. It has the following attributes:

The following is an example of <HR>:

<HR SIZE=5 NOSHADE>

<HTML>: HTML

This is the main container for a home page. All other HTML tags contained within this element are shown in the browser window. This tag has the following attributes:

The following is an example of <HTML>:

<HTML>[Your home page]</HTML>

<I>: Italic

This tag will italicize the text that is enclosed within it. The <I> tag can have the following attributes:

The following is an example of <I>:

This word is in <I>italics</I>.

<IMG>: Image

Currently, any time you want to make use of graphics on your home page, you have to employ the <IMG> tag. This element enables you to specify imagemap information, hypertext link information, and positioning information. It has the following attributes

The following is an example of <IMG>:

<IMG SRC="mymap.gif" WIDTH=5 HEIGHT=5 BORDER=2 ISMAP>

<INPUT>: Input

This HTML 3 proposed element works with the FORM element. The <INPUT> tag enables the user to upload a file through the Web server. It has the following attributes:

The following is an example of <INPUT>:

<INPUT TYPE="SUBMIT" NAME="submit1" ALIGN="left">

<INS>: Insert

This proposed HTML 3 element will display the enclosed text as inserted text. The text embedded by the starting and ending markers of this element, will be shown in a strikethrough font. This tag is mainly intended for legal documents and has the following attributes:

The following is an example of <INS>:

This is <INS>inserted text.</INS>

<ISINDEX>: Searchable Index

This HTML element is used before the <FORM> tag to indicate a searchable index. When this tag is put in the HEAD section of the HTML document, the entire document can be examined using a keyword search. <ISINDEX> has the following attributes:

The following is an example of <ISINDEX>:

<ISINDEX>

<KBD>: Keyboard

This HTML element will cause the enclosed text to be displayed as keyboard input. This is typically done when you want to give users instructions on what to type into the computer. This tag has the following attributes:

The following is an example of <KBD>:

Type in <KBD>ls</KBD> at the UNIX command prompt.

<LANG>: Default Language

This is a proposed HTML 3 attribute that changes the LANG context. The text enclosed within this tag will have its LANG context changed, as well as all subsequent LANGs. This tag has the following attributes:

The following is an example of <LANG>:

The LANG context will <LANG>change.</LANG>

<LH>: List Header

This proposed HTML 3 element enables you to define the header for a list. This tag has the following attributes:

The following is an example of <LH>:

<LH>A Heading</LH>

<LI>: List Item

This attribute takes the enclosed text and makes it part of the list. This element has the following attributes:

The following is an example of <LI>:

<LI>A list item</LI>

<LINK>: Link

This HTML tag is used to specify a relationship between the current Web page and other HTML documents. This element is used along with the Anchor attribute REL. This element has the following attributes:

The following is an example of <LINK>:

<LINK HREF="http://www.mysite.com/destination1.html">

<MAP>: Client-Side Imagemap

This Netscape proposed HTML element describes imagemap regions. The one attribute allowed is NAME, which points to a file with the imagemap regions defined.

The following is an example of <MAP>:

<MAP NAME="myregions.map"></MAP>

<MARQUEE>: Marquee

This HTML element proposed by Microsoft will create an area with scrolling text inside of it. The text to be scrolled is contained within the start and end markers of this element. This tag has the following attributes:

The following is an example of <MARQUEE>:

<MARQUEE BEHAVIOR="scroll" DIRECTION="left">This is a marquee.</MARQUEE>

<MENU>: Menu

This HTML element will display any <LI> enclosed within it in a menu list. HTML 3 proposed to remove this element. This tag has the following attributes:

The following is an example of <MENU>:

<MENU><LI>Milk $1.00</LI><LI>Eggs $2.00</LI></MENU>

<META>: Meta Information

This HTML tag is intended to specify document information not available with other HTML elements. The information contained in this element may be extracted by the server or the browser. This tag has the following attributes:

The following is an example of <META>:

<META URL="http://www.mysite.com/anim.html" CONTENT=5 HTTP-

<NOBR>: No Line Break

This element is used to control line breaks on certain lines. The text enclosed within the beginning and ending markers will not word wrap based on the width of the browser.

The following is an example of <NOBR>:

<NOBR>This line of text will always be one line, 
regardless of how wide the browser window.</NOBR>

<NOEMED>: Non-Embedded Text

This Netscape HTML extension element is intended to be used for browsers that understand, but don't implement, the <EMBED>/<NOEMBED> tags. If one of these browsers comes across the <NOEMBED> element, the enclosed text will be displayed. This is basically equivalent to the ALT attribute for the <IMG> element.

The following is an example of <NOEMBED>:

<NOEMBED>You'll only see this if your browser doesn't support the EMBED tag.</NOEMBED>

<NOFRAMES>: Non-Frames Text

This Netscape HTML extension element is intended to be used for browsers that understand, but don't implement, the <FRAMESET>/<NOFRAMES> tags. If one of these browsers comes across the <NOFRAMES> element, the enclosed text will be displayed. This is basically equivalent to the ALT attribute for the <IMG> element.

The following is an example of <NOFRAMES>:

<NOFRAMES>You'll only see this if your browser doesn't support the FRAMESET tag.</NOFRAMES>

<NOTE>: Note

This proposed HTML 3 element will cause the enclosed text to be displayed as a note. The <NOTE> tag has the following attributes:

The following is an example of <NOTE>:

<NOTE>This is a note.</NOTE>

<OL>: Ordered List

This HTML element will display any enclosed <LI> elements as an ordered list. The order is listed numerically. It has the following attributes:

The following is an example of <OL>:

<OL ALIGN=LEFT SEQNUM=5>This is an item in an ordered lists.</OL>

<OPTION>: Option Form

This HTML element identifies a particular selection in the SELECT element. You can set the following attributes:

The following is an example of <OPTION>:

<OPTION VALUE="line1"></OPTION>

<OVERLAY>: Overlay a Graphic

This proposed HTML 3 tag is intended to be used along with the <FIG> element. The <OVERLAY> tag enables you to overlay an image on top of a <FIG> image. It has the following attributes:

The following is an example of <OVERLAY>:

<OVERLAY SRC="overlay.gif" HEIGHT=200 WIDTH=150 X=50 Y=50>

<P>: Paragraph Break

This HTML tag will prevent the enclosed text from being word wrapped. The browser will not attempt to word wrap the text contained in this element. You can set the following attributes:

The following is an example of <P>:

<P>This line of text will always be this long, regardless of the size of the browser.</P>

<PARAM>: JAVA Parameter

This HTML element is proposed to support