Hyper-Text Markup Language – Glossary of key elements



An HTML element takes the form:
<ELEMENT [...]> [... </ELEMENT>]
and has at least a beginning or 'opening' part, <NAME>, and which optionally may include attributes that control the behaviour of the element (represented above as '[...]') after the name and before the terminating chevron '>'.

In the following definitions it is assumed that a value for any attribute is always assigned thus:
<ELEMENT ATTR1="value1" [ATTR2="value2" [etc.]]>

There may also be an ending or 'closing' part </NAME>, but only if the element is designed to contain something between <NAME> and </NAME> upon which it has some effect, e.g. <P> – </P>, <FONT> – </FONT>, <CENTER> – </CENTER>. Such contents are herein again indicated by '...'.

Some elements are specifically component parts of other elements, e.g. <LI> (List Item), and <PARAM> for <APPLET> and <OBJECT>, <TR> (Table Row) for <TABLE>, which must be contained between the opening and closing 'parent' elements of which they are a part, and should not be used outside.

If the web browser includes a script engine, it will recognise some elements as objects and which may consequently be able to raise events that can call script functions.

Element names and attribute names can be written in upper or lower case, although keeping upper case makes them stand out easier in the text, but is not essential.


HTML Elements – Universal Attributes
There are several general attributes that can be applied to most if not all elements that can occur within the BODY element, such as ID, LANG, STYLE, DIR and CLASS. These attributes are extensions to the HTML 2.0 specification and are used with such features as cascading style sheets, and may not be compatible with early web browsers.

Generally speaking, Microsoft Internet Explorer and Netscape Navigator versions 3.0+ can recognise and use such extensions.

All elements as <NAME...> [... </NAME>]
Attributes:
ID: a unique identifier for a particular element. Where an element can be interrogated or manipulated as an object by a script, for example, the value of ID becomes the name of the object. Only Internet Explorer can expose 'ID' to scripts; it is ignored by Netscape.
NAME: For Netscape Navigator, 'NAME' takes the place of 'ID' above, so to make sure objects can be accessed by scripts in both browsers, make both the same value.
CLASS: a name used to define the type of a particular element. When used in conjunction with a cascading style sheet (ASCII) file (*.css), CLASS is assigned the name of a defined style. E.g. the style file contains the line:
'.para {font-family:Arial, Helvetica, Univers; font-size:12pt; color:black; cursor:default;}'
and a <P> element is given the attribute: <P CLASS="para"> (without the '.' prefix).
LANG: used to determine the language of the element; e.g., 'en.uk' may be used for British English. However, this can cause problems so this attribute is best left unused; the default is American English.
DIR: defines the direction of text; right-to-left or left-to-right. Only applicable to languages written right-to-left; the default is left-to-right so is best left unspecified for English. Only used in conjunction with the LANG attribute.
STYLE: used to apply a style to the element in the same way as would a cascading style sheet (*.css file) through a CLASS reference, and overriding that style sheet entry if applicable. Hence:
<P STYLE="font-size:10pt; color:blue;">
Events:
Many elements may also be able to raise a range of universal events, such as 'OnClick'. This is very much a subject of experimentation as it depends on whether the browser and its script engine can respond to a particular event from a particular element type.

HTML Documents
The initial two parts of an HTML document together identify it as an HTML type that can be 'rendered' (displayed) as such by a web browser. These are:
Parts – HTML document
Prologue Document Identifier
To identify a document as HTML, it should begin with e.g.:
<!DOCTYPE HTML PUBLIC "-//SQ//DTD HTML 2.0 + allextensions//EN">
Latterly there have been several instances of web pages on the net that do not do this; to be properly correct according to the HTML specification it should be present.

<HTML> ... </HTML>
Identifies the document as containing HTML elements. It immediately follows the prologue document identifier and serves to surround all of the remaining text, including all other elements, that is:

<HTML>
All the rest of the document.
</HTML>
End of document. Nothing must follow </HTML>.

This concludes the <HTML> element and document.
The <HTML> element can contain only the
<HEAD> and <BODY> elements:
Parts – <HTML> element
<HEAD> ... </HEAD>
An unordered collection of information about the document. The document must have at least a 'Title' element as a minimum, so it also needs the 'Head', as in:

<HEAD>
<TITLE>My New Page</TITLE>
</HEAD>

Parts – <HEAD> element
<BASE...> – Optionally, allows a base URL address of the HTML document to be specified.
Attributes:
HREF e.g. <BASE HREF="http://www.mysite.uk/">. Specifies www.mysite.uk/ as the base address from which all relative URLs should be determined. See Anchor and discussion about relative URLs.
TARGET as in <BASE TARGET="default_target">. Allows you to pick a default named target window for every hyperlink in a document that does not have an explicit TARGET attribute; see Anchor.
<ISINDEX...>
Tells the HTML user agent that the document is a searchable index document. Can only be used if a CGI script or other program acting as a search engine exists on the web site. If yours is not a commercial web site you won't have one, so ignore it.
Attributes:
ACTION
PROMPT
<LINK...> – Optionally, indicates relationships between documents. The Link element is 'empty' (does not have a closing </LINK> part). Commonly used to include a common cascading style sheet file with the .css extension.
Attributes:
Shares the same attributes with the Anchor element. See
Anchor.
<TITLE> ... </TITLE> – Specifies the title of the document and must be present.
<META...> – Specifies document information useable by servers and/or clients.
Attributes:
CONTENT Meta-information content to be associated with the given name and/or HTTP response header.
HTTP-EQUIV Binds the element to an HTTP response header.
NAME Meta-information name. If the name attribute is not present, then name is assumed to be the value of HTTP-EQUIV.
<STYLE> ... </STYLE> – specific to the HTML 3.0 specification. Use to include a set of defined styles in the same format as for a cascading style sheet, except this is carried in the document rather than a separate file.

The <HEAD> element can also include the first or only <SCRIPT> element if any (but only one). See <SCRIPT>.

This concludes the <HEAD> element.

<BODY...> ... </BODY>
All other elements and the visible portions of the page are contained in here, that is, all the text and images that make up the page, together with all the HTML elements that provide the control and formatting of the page. In addition it has attributes that affect the overall appearance:
Attributes:
ALINK Active link – the colour of the underlined text of a hyperlink when it is clicked on and the URL is being sought.
BACKGROUND Specifies a URL pointing to an image used as a background for the whole document. Modern browsers also tile a small image by default to fill the entire document-viewing area.
BGCOLOR In the absence of the above, the background colour of the document.
BGPROPERTIES Allows 'watermarking' of documents. All this means is that if set with BGPROPERTIES=FIXED, the background image stands still while the page text and images slide over it when scrolled.
LEFTMARGIN Sets the left margin of the document in pixels.
LINK The colour of the underlined text of a hyperlink where the URL pointed to is as yet unvisited.
TEXT The default colour of all the normal text in the document that is not specifically coloured to indicate a hyperlink or modified by the
<FONT> element.
TOPMARGIN Sets the top margin of the document in pixels.
VLINK Visited link – the colour of the underlined text of a hyperlink where the URL pointed to has been visited.
Note the value of 'colour' above is provided as an RGB (Red, Green, Blue) value either in the form of a six digit hexadecimal number prefixed with '#', e.g BGCOLOR="#FFFFFF" for white, or in decimal, e.g. '0' for black, or one of the predefined words representing the 16 basic Windows colours Black, Olive, Teal, Red, Blue, Maroon, Navy, Gray, Lime, Fuchsia, White, Green, Purple, Silver, Yellow or Aqua. This also applies to the colour attributes of any other elements.

Events – the following can execute a script or scripted function:
ONLOAD Occurs when the page has finished loading. Example: <BODY ONLOAD="JavaScript:alert('Here I am!');", or: <BODY ONLOAD='VBScript:MsgBox "Here I am!"' (Internet Explorer only), or a call to a function: <BODY ONLOAD = "JavaScript:initialise();"
ONUNLOAD Occurs when the page unloads.

This concludes the <BODY> element.

Summary
In summary, an HTML document must consist of at least:

<prologue document identifier>
<HTML>
<HEAD>
<TITLE>Page Title</TITLE>
</HEAD>
<BODY>
Everything else
</BODY>
</HTML>
The <BODY> element can contain any of the following elements:

Parts – <BODY> element
<A...> ... </A> Anchor
Encloses and marks text by underlining, making it the start and/or destination of a hypertext link. An anchor accepts several attributes, but either NAME or HREF must be assigned.
Attributes:
HREF Specifies a URL or location that is the target of a hyperlink. This can be http://, a local file, or 'mailto:' invoking e-mailing software.
NAME Makes the anchor the target of a hyperlink. If this is all, there need not be any enclosed text in this case.
TARGET Specifies the name of a window to show the new page in. There are four reserved names:
_blank Loads the page into a new, unnamed window. Was specific to Netscape, opening a 'secondary window'.
_self Loads the page into the current window.
_parent Loads the page into the 'parent' or top level full size window; becomes self if you have no parent.
_top Loads the page at the top level; becomes self if you are already at the top.
Otherwise any other name opens a new window and gives it that name. Can also specify a named frame; see
<FRAME>.

Events – the following can execute a script or scripted function:
ONCLICK Occurs when the underlined text is clicked on.
ONMOUSEOVER Occurs when the mousepointer (or pointing hand icon) is moved over the underlined text.
ONMOUSEOUT Occurs when the mousepointer leaves the underlined text.
<ADDRESS> ... </ADDRESS>
Optionally, specifies such information as address, signature and authorship, often at the top or bottom of a document. Very rarely used; writers tend to use comments for such things.
<APPLET...> ... </APPLET>
Adds an Applet to an HTML page.
Attributes:
ALT, ALIGN, BORDER, HSPACE, VSPACE, WIDTH, HEIGHT – see <IMG>.
CODE Required. Gives the name of the file that contains the applet's compiled Applet subclass. This file is relative to the base URL of the applet. It cannot be absolute, e.g.: CODE="MyApplet.class" only is allowed.
CODEBASE Optionally specifies the base URL of the applet – the directory that contains the applet's code, e.g.: CODEBASE="java/". If this attribute is not specified, then the document's own base URL is assumed.
NAME Optionally specifies a name for the applet instance, which allows applets on the same page to find and communicate with each other if required, and, along with ID, makes it accessible as an object to scripts.
Parts – <APPLET> element
<PARAM...> Parameter
Contained between the <APPLET> and </APPLET> elements, this is the only way to specify an applet-specific attribute. Applets access their attributes with the getParameter() method.
Attributes:
NAME Specifies the name of an applet's attribute or 'property'. You have to know what this is.
VALUE The value or data to be assigned to the named applet attribute. For example:
<PARAM NAME="IMGname" VALUE="pic1.gif">

This concludes the <APPLET> element.
<AREA> element see <MAP>
<B> ... </B> Bold
Specifies that the enclosed text should be bold.
<BASEFONT SIZE ...>
See
<FONT>.
<BDO> ... </BDO>
Bi-directional text.
Attributes:
LANG
DIR = LTR or RTL.
<BGSOUND...>
Specific to Internet Explorer only. Allows you to create pages with background sounds or "soundtracks." Sounds can either be samples (.WAV or .AU format) or MIDI (.MID format). Also recognised by Mosaic, but which will not play MIDI files by itself, launching an external application instead.
Attributes:
SRC specifies the address or URL of the sound to be played.
LOOP specifies how many times a sound will loop when activated. If n=–1 or LOOP=INFINITE is specified, the sound will loop indefinitely.
Examples:
<BGSOUND SRC="boing.wav">
Plays the specified WAV file as soon as Internet Explorer has downloaded it.

<BGSOUND SRC="boing.wav" LOOP=INFINITE>
Plays the specified WAV file as soon as it has loaded and would continuously play until another page is loaded.
<BIG> ... </BIG>
Specifies that the enclosed text should be displayed, if practical, using a big font (compared with the current font). This is an HTML 3.0 element supported by Netscape and Internet Explorer only.
<BLINK> ... </BLINK>
Surrounding any text with this element causes it to flash on the viewing page. Originally only supported by Netscape Navigator.
<BR...> (Line) Break
Specifies that a new line must be started at the given point. A new line indents the same as that of line-wrapped text. This provides an alternative to ending a paragraph with </P>, as
<P> elements are always separated by vertical white space. <BR> produces a new line start without any spacing before it.
Attributes:
CLEAR – with the addition of floating images it was necessary to expand the <BR> element. Normal <BR> still just inserts a line break. A CLEAR attribute has been added to <BR>, so: CLEAR="left" will break the line, and move vertically down until you have a clear left margin (no floating images). CLEAR="right" does the same for the right margin. CLEAR="all" moves down until both margins are clear of images.
<BLOCKQUOTE> ... </BLOCKQUOTE>
Used to contain text quoted from another source. A typical rendering might be a slight extra left and right indent, and/or italic font.
<CENTER> ... </CENTER>
Everything between the beginning and end of the <CENTER> element is centred between the current left and right margins.
<CITE> ... </CITE>
Specifies a citation or quote, typically in italics.
<CODE> ... </CODE>
Indicates an example of code, typically in a monospaced font such as Courier. Do not confuse it with the Preformatted Text element.
<COMMENT> ... </COMMENT>
Used to 'comment' out text that will consequently be ignored by the browser. Only supported by Internet Explorer and Mosaic, so to make sure your page is most compatible use the form <!-- ... --> instead.
<DIR> ... </DIR> 'Directory List'
Used to present a list of items containing up to 20 characters each. Items in a directory list may be arranged in columns, typically 24 characters wide. Nothing to do with disk directories.
Parts – <DIR> element
<LI> : Contains items in <LI> (List Item) elements, viz:
<DIR>
<LI>Item1
<LI>Item2
<LI>Item3
</DIR>
<DIV...> ... </DIV> Division
As described in the HTML 3.0 specification, this should be used with a CLASS attribute, to name a section of text as being of a certain style. Essentially, text surrounded by the <DIV> ... </DIV> elements will be formatted according to the description attached to the ALIGN attribute within the <DIV> element.
Otherwise <DIV> ... </DIV> can be simply used to divide a document into separate divisions.
Attributes:
ALIGN See <P>.
<DL...> ... </DL> Definition List
A list of terms and corresponding definitions, and where each item is not preceded by a bullet or number. Definition lists are typically formatted with the term flush-left and the definition, formatted paragraph style, indented after the term. The most useful application of this element is to generate indented texts which can be cascaded.
Attributes:
COMPACT Suggests that a compact rendering be used, because the list items are small and/or the entire list is large. Usage: <DL COMPACT>
Parts – <DL> element
<DT> : Definition list Term
<DD> : Definition list definition.
Example:
<DL>
<DT>Term<DD>This is the definition of the first term.
<DT>Term<DD>This is the definition of the second term.
</DL>
<DFN>...</DFN> : Currently only supported by Internet Explorer. Used to mark the 'Defining Instance' of a term (it says here). Basically the enclosed text is usually made italic.
<EM> ... </EM> Emphasis
Indicates typographic emphasis, typically as italics.
<EMBED ...>
Only recognised by the Windows version of Netscape Navigator. It allows you to embed documents of any type. Your user only needs to have an application that can view the data, installed correctly on their machine. The syntax is e.g.: <EMBED SRC="images/picture.bmp">, or: <EMBED SRC="readme.doc"> which should open in Windows Write.exe.
<FONT ...> ... </FONT>
The text enclosed is rendered in the specified font, colour, and/or size. Netscape 1.0 and above and Microsoft's Internet Explorer support different sized fonts within HTML documents.
Attributes:
COLOR Sets the colour for the enclosed text. For actual colour values see <BODY> above.
FACE Sets the name of the typeface for the enclosed text. Careful: the face displayed must already be installed on the user's computer. Substitute faces can be specified in case the chosen one is not installed, in a comma separated list, e.g.: <FONT FACE="Arial, Helvetica, Univers, Times New Roman">
If no match is found, the text will be displayed in the default font set by the browser, or that set with <BASEFONT SIZE=n>.
SIZE Valid values range from 1 to 7. The browser's set default size equates to 3. The value given can optionally be preceded with '+' or '–' to specify a difference relative to the default base font, e.g. '–1'. The default can be changed with the <BASEFONT SIZE ...> element.
Note: originally FACE was specific to Internet Explorer. Both this and Netscape Navigator support COLOR.
<FORM...> ... </FORM>
Used to define a data input form. There can be several forms in a single document, but the element itself can't be nested. A form is the fundamental way of providing the user a means to send data back to you, for example, a 'guest book' entry as part of a process for recording comments from visitors to your web site. A form encloses a small variety of data input objects.
Attributes:
ACTION a URL specifying the location to which the contents of the form is submitted to elicit a response. If the ACTION attribute is missing, the URL of the document itself is assumed. The way data is submitted varies with the access protocol of the URL, and with the values of the METHOD and ENCTYPE attributes.
The URL is typically an e-mail address commencing 'mailto:' with the POST method, thus invoking a mailing method or software, or the name and location of a server side CGI script that is to be given the form data, using the GET method.
ENCTYPE optionally specifies the format of the submitted data in case the protocol does not impose a format itself. By default it is the MIME type 'application/x-www-form-urlencoded' if unspecified.
METHOD optionally sets an HTTP method. The default METHOD is GET if unspecified, else it is POST.
NAME Required.
Events:
ONSUBMIT Occurs just before the form is submitted.
Parts – <FORM> element
<INPUT...> ... </INPUT> – Can be an input field or a button depending on TYPE.
Attributes:
ALIGN : see <IMG>.
CHECKED : If TYPE is a checkbox or radio button, indicates that it is selected.
MAXLENGTH : If TYPE is a text field, indicates the maximum number of characters that can be entered into it.
NAME : Always required. Used when transferring the form's contents, which is done as 'NAME=value' pairs for each input element.
SIZE : Specifies the size or precision of the field according to its type.
SRC : A URL or URN specifying an image. For use only with TYPE=IMAGE in HTML Level 2.
TYPE : Defines the type of data field:
= BUTTON appears as a normal button that is not a SUBMIT or RESET type and you can do what what you want with. It can be given a caption by setting VALUE.
= CHECKBOX : simple on/off Boolean attribute, also a number of checkbox fields each of which has the same name. Each selected checkbox generates a separate name/value pair in the submitted data.
= HIDDEN : Invisible to the user, but the preset value of the field is sent with the submitted form.
= IMAGE : An image field which you can click on with the mouse, causing the form to be submitted.
= PASSWORD : same as TEXT, except that the text is not displayed as entered.
= RADIO : a button type that accepts a single value from a set of such buttons. Each radio button in the group should be given the same name, but a unique value. Only the selected radio button in the group generates a name/value pair in the submitted data. The one selected is identified by the value returned.
= RESET : a button that resets the form's fields to their specified initial values.
= SUBMIT : a button that submits the form.
= TEXT : used for a single line text entry.
= TEXTAREA : used for multiple-line text-entry fields.
= FILE : allows the inclusion of files with form information.
VALUE : The initial displayed value of the field or caption of a button; or the value to be returned when the field is selected, if it displays a Boolean value. Required for radio buttons.
Events:
ACCEPT
ONCLICK
ONFOCUS
control gets mouse/caret focus.
ONBLUR control loses focus.
ONCHANGE value/selection changed.
ONSELECT item selected.

<SELECT...> ... <SELECT> – A selection from a finite set or list of choices.
Attributes:
MULTIPLE needed when users are allowed to make several selections at once, e.g. <SELECT MULTIPLE>.
NAME the name that will be submitted as a name/value pair. Required.
SIZE Specifies the number of visible items. If this is greater than one, then the result will be a list. If one or unspecified, the result is a drop-down combo list (default).
Events:
ONFOCUS
ONBLUR
ONCHANGE

Parts – <SELECT> element
<OPTION...> ... </OPTION>
An option within the select element. Items are added to the list with this element:
Attributes:
SELECT if SELECT="SELECT" then this item is shown in the list as the initial default selected item. Only one item can be SELECTed at a time unless MULTIPLE is present. All others remain unspecified.
VALUE what will actually be returned when the form is submitted as a name/value pair, the name being that of the SELECT element. (VALUE need not be exactly the same as what is displayed in the list.) Example:

<SELECT NAME="flavour">
<OPTION VALUE="Vanilla">Vanilla</OPTION>
<OPTION VALUE="Strawberry" SELECTED="SELECTED">Strawberry</OPTION>
<OPTION VALUE="Peach">Peach</OPTION>
<OPTION VALUE="Orange">Orange</OPTION>
</SELECT>
making 'Strawberry' the initially selected item.

<TEXTAREA...> ... </TEXTAREA> – works like a mini word processor with wrapping and scroll bars to let users enter more than one line of text. Although the enclosed text between the opening and closing element parts is used to initialise the field's value, on submission, or upon interrogation by a script, the field's contents are exposed by its VALUE attribute.
Attributes:
COLS determine the visible dimension of the field in characters.
NAME the name that will submitted as a name/value pair.
ROWS as COLS.
VALUE
WRAP
Word wrapping in a TEXTAREA text box is Netscape specific.
Events:
ONFOCUS
ONBLUR
ONCHANGE
ONSELECT

This concludes the <FORM> element.
<FRAMESET...> ... </FRAMESET>
Takes the place of the <BODY> element (the only exception) for the purpose of displaying FRAMEs, that is, child windows of the main window, each of which can contain a complete independent HTML page. To begin with, a frameset divides the browser window into rectangular regions. Each region can be a frame, which displays one document, and is represented by the <FRAME> element – or another frameset, which itself is further divided into frames.
Attributes:
COLS can be absolute pixel values, percentages of the parent container between 1 and 100, or relative scaling. Comma delimited list defining the width of each vertical frame across the parent (the 'parent' being a top level browser window or another containing frame).
ROWS Comma delimited list defining the height of each horizontal frame down the parent. Examples:

<FRAMESET ROWS="20%,60%,20%">
defines three horizontal divisions as percentages of the parent. Each section is occupied by a <FRAME>. The width of all is as per parent space.

<FRAMESET COLS="100, 100">
defines two vertical divisions absolutely in pixels, any space left is blank. The height of all is that of the parent.

<FRAMESET COLS="30%,*">
the 'wildcard' character '*' means that the second frame fills the remaining space of the parent, whatever this is.

The frameset element can contain further nested framesets, or the necessary number of <FRAME> elements:
Parts – <FRAMESET> element
<FRAME...>
Contains an independent HTML document to display.
Attributes:
FRAMEBORDER Internet Explorer specific. By default, frames are separated by raised grey window borders. If FRAMEBORDER=NO, these are made invisible and the edges of the framed areas meet seamlessly.
FRAMESPACING defines the thickness of the raised borders in pixels. 0 is minimum, but doesn't mean 'none'.
MARGINWIDTH by default the browser decides appropriate margin widths. This is spacing between the document and the edges of the frame. It can be overriden by specifying left/right margins in pixels.
MARGINHEIGHT as above, sets top/bottom margins.
NAME the name of the frame as a containing window. Essential if specified in the TARGET attribute of an anchor, or if accessed by a script as a window object. Important: if you want an anchor hyperlink to load a page into a different frame – not the same one containing the page having the anchor – you must specify the other frame's name in the anchor's TARGET attribute. See also
Anchor.
NORESIZE
a flag that indicates that the frame is not resizable by the user. Usually, users can resize frames by dragging a frame edge to a new position with the mouse. Usage: <FRAME ... NORESIZE> ...
SCROLLING used to describe if the frame should have scrollbars or not. "Yes" results in scrollbars always being visible on that frame. "No" results in scrollbars never being visible. Auto instructs the browser to decide whether scrollbars are needed, and place them where necessary. The default value is "auto".
SRC the URL of the HTML document to be displayed in this particular frame. FRAMEs without SRC attributes are displayed as flat blank space in the size the frame would be if it contained a page.

<NOFRAMES> ... </NOFRAMES>
FRAMEs are a comparatively late addition to the HTML specification, so very early browsers won't know what they are. You should allow for this possibility when designing framed pages. If the browser does recognise FRAME elements, then the content between <NOFRAMES> and </NOFRAMES> is ignored.
If the browser can't handle frames, then this and all of the foregoing frame elements are ignored. In this event <NOFRAMES> should contain a
<BODY> element so that at least something can be displayed.
This could be a complete duplication of one of the framed pages that is supposed to be shown, but this is inefficient – supposing you wanted to make changes to it? Two documents will need to be edited the same! Instead, include a hyperlink to the required page, as in the following example.

Summary – FRAMEs usage
A page that creates frames has something like the following example in place of the <BODY> element:

<FRAMESET COLS="30%,*">
<FRAME NAME="Frame1" SRC="page1.htm">
<FRAMESET ROWS="20%,*">
<FRAME NAME="Frame2" SRC="page2.htm">
<FRAME NAME="Frame3" SRC="page3.htm">
</FRAMESET>
</FRAMESET>
<NOFRAMES>
<BODY>
<P>If your browser doesn't show frames then <A HREF="page3.htm">click here</A>.</P>
</BODY>
</NOFRAMES>

This concludes the <FRAMESET> element.
<H1 – 6...> ... </H1 – 6> Headings
Defines six levels of heading. Implies all the font changes, paragraph breaks before and after, and white space necessary to render the heading. The largest heading is <H1>, followed by <H2> to <H6> in order of reduced size. Text is invariably rendered bold.
Attributes:
ALIGN an HTML level 3.0 specification, valid values are LEFT, CENTER, RIGHT>.
<HR...> Horizontal Rule
A shaded engraved line is drawn across the page.
Attributes:
ALIGN Optional. Left, right or center.
COLOR Optional. See
<BODY> for colours syntax.
NOSHADE Optionally switches off the shaded/engraved effect to make a plain solid line.
SIZE Optional. The thickness in pixels.
WIDTH Optionally forces the width in pixels. The default is page width minus margins. If specified, allows use of ALIGN.
<I> ... </I> Italic
Specifies that the enclosed text should be italic.
<IMG...> Image
Used to incorporate in-line graphics or pictures into an HTML document.
Attributes:
ALIGN Valid values are: LEFT, RIGHT, TEXTTOP, ABSMIDDLE, BASELINE, ABSBOTTOM, TOP, MIDDLE or BOTTOM with reference to accompanying text in which an image can be embedded.
ALT Alternate text which should describe the picture in case it is not displayed by the browser for some reason. The string appears in a rectangular area where the image should be. In addition modern browsers typically show a pop-up caption containing this string when the mousepointer is over the graphic.
BORDER Controls the thickness of the border around the image. Usually only visible if the image is enclosed in an anchor and thus forms a hyperlink, i.e. clicking on the image performs a URL jump. BORDER=0 results in no border at all even in this case.
If for a hyperlink, the colour of the border takes on the value of LINK, ALINK or VLINK as appropriate; see
<BODY>.
HEIGHT Resizes the height of the image in pixels.
HSPACE Adds left and right horizontal spacing in pixels.
ISMAP Refers to server side image mapping requiring a CGI script – use client side image mapping instead (USEMAP).
SRC The URL of the image to be embedded as a file. Valid image files are *.GIF and *.JPG/JPEG types.
USEMAP Allows client side image mapping, though not all browsers support it. Specifies the name of the <MAP> element which defines a number of separate areas of this image, each of which acts as an independent hyperlink. If the map is in the same document, the name is preceded by '#' (always required). If the map is in a separate file, the file URL must also be given, then '#', then the map name, e.g. <IMG USEMAP="other.htm#map1">. See also <MAP>.
VSPACE Adds top and bottom vertical spacing in pixels.
WIDTH Resizes the width of the image in pixels.
<KBD> ... </KBD> KeyBoard
Indicates text typed by a user; typically rendered as monospaced . It might commonly be used in an instruction manual.
<LI...> List Item
See
<DIR>, <DL>, <UL>, <OL>, <MENU> etc.
<LISTING> ... </LISTING>
Presents enclosed text in fixed-width font, and so is suitable for text that has been formatted on screen. As such, it is similar to the
<PRE> and <XMP> elements, but has a different syntax. Typically, it will render as fixed width font with white space separating it from other text and preserving 'native' end of line carriage returns.
<LH> List Header
Can immediately follow an
<OL>, <UL> etc. opening element to provide a non-bulleted or unnumbered sub-title for the list. If intended to be a separate line from the first list item, follow it with <BR>.
<MAP...> ... </MAP>
A map describing each region in an associated image that acts as a separate hyperlink and indicates where it links to. The MAP definition can reside anywhere in the same file as the image that will use it, or in a completely separate file. This way, if you intend to use particular image maps extensively, single instances of common map definitions can be kept separate from the main documents, allowing for easier maintenance.
Attributes:
NAME Required. The name of the map referred to in the USEMAP attribute of the associated <IMG> element, see <IMG>.
Parts – <MAP> element
<AREA...>
Used to specify an area of the associated image in pixels and the URL for the hyperlink when this area is clicked on.
Attributes:
COORDS : the area in pixels as measured from the top left corner of the image as left, top, right, bottom, e.g. <AREA COORDS="10,10,100,49"
HREF : the URL of the document to jump to, with or without '#AnchorName', or the position in the same document with '#AnchorName', as
Anchor.
NOHREF : if present, defeats the hyperlink so nothing happens.
SHAPE : currently the only shape defined is "RECT", but the syntax is defined in such a way to allow other region types to be added. If SHAPE is omitted, SHAPE="RECT" is assumed.
TARGET : specifies a window name, if e.g. the target is a frame, as Anchor.

Example of <MAP>:
<MAP NAME="buttonbar">
<AREA COORDS="10,10,49,49" HREF="about_us.html">
<AREA COORDS="60,10,99,49" HREF="products.html">
<AREA COORDS="110,10,149,49" HREF="index.html">
<AREA COORDS="0,0,159,59" NOHREF>
</MAP>
<IMG SRC="../images/tech/bar.gif" USEMAP="#buttonbar">

This concludes the <MAP> element.
<MARQUEE...> ... </MARQUEE>
Contained text scrolls across a rectangular area that you define in the browser window. You specify the height and width of the marquee area, and also (if desired) margins. The scrolling text will be visible between the margins. Surrounding text can be aligned with the marquee area. Warning: this feature was introduced by Microsoft for Internet Explorer 2.0. It is not part of the HTML 2.0 specification, and therefore is not supported by all Web browsers.
Attributes:
ALIGNMENT: how the surrounding text is aligned with the marquee text (TOP, MIDDLE, or BOTTOM).
BEHAVIOUR: specifies the type of movement of the text. The choices are: SCROLL: continuous scrolling on and off the screen (the default); SLIDE: the text scrolls until one end reaches the margin; ALTERNATE: the text `bounces' back and forth between the margins.
BGCOLOR: background colour of the marquee area.
DIRECTION: direction (LEFT or RIGHT) that the text scrolls. LEFT is default.
HEIGHT: height of the marquee area, in pixels (n), or as a percentage of the window height (n%).
HSPACE: width of the left and right margins, in pixels.
LOOP: the number of times the text will scroll. If this attribute has the value `-1' or INFINITE, the text will scroll `infinitely'.
SCROLLAMOUNT: the number of pixels between successive scrolls of the text.
SCROLLDELAY: the time in thousandths of a second between successive scrolls of the text.
VSPACE: the height of the top and bottom margins, in pixels.
WIDTH: width of the marquee area, in pixels (n), or as a percentage of the window width (n%).
<MENU> ... </MENU> List
A list of items with typically one line per item. The menu list style is more compact than the style of an unordered list. Uses the
<LI> element. Example:

<MENU>
<LI>First item in the list.
<LI>Second item in the list.
<LI>Third item in the list.
</MENU>

<NOBR> ... </NOBR> No Break
All the text between the start and end of the <NOBR> elements cannot have line breaks inserted (won't wrap). Use with care.
<NOEMBED> ... </NOEMBED>
Alternate text to embedded object.
Attributes:
None.
<OBJECT...> ... </OBJECT>
Specific to Internet Explorer only running under Microsoft Windows. Loads an ActiveX OCX or ActiveX document or DLL object into the defined area on the page, accessed by the standard Windows OLE (Object Linking and Embedding) method. Either it must be installed on the user's machine already and registered in the Windows registry, or if not, downloaded and installed by Explorer automatically from the web site. The file may be fetched as it is or installed from a compressed .CAB file, depending on complexity. In the latter case all supporting run time DLLs and other files required for the OCX to run may have to be downloaded and installed also if they don't already exist on the user's machine.
Attributes:
ALT, ALIGN, BORDER, HSPACE, VSPACE, WIDTH, HEIGHT – see <IMG>.
CLASSID Any ActiveX object is only referred to by its CLSID key as recorded in the Windows registry. You must know what this is when writing the <OBJECT> element. For convenience, you should also give it a name with the ID and NAME attributes.
CODE Rare. Some objects may require certain code to implement the object.
CODEBASE Required. The URL to the location where the object or .CAB file can be sourced. Once the object is installed, this is not used again.
CODETYPE The MIME type, usually "application/x-oleobject".
DATA Rare. Used to point to a persistent data stream to initialise the object's state.
STANDBY A message that is displayed in the defined area, like ALT for IMG, while the object is loading or installing.
Parts – <OBJECT> element
The 'properties', or attributes, of the object can be (and most often are) initialised by <PARAM> elements, see <APPLET>. Otherwise these can be initialised by a script.

Events – whatever events the object raises may be given an event handler script, e.g.:

<SCRIPT LANGUAGE="JavaScript" EVENT="Click" FOR="thisObject"><!--
function thisObject_Click () {
alert ('Object was clicked.')
}
//--></SCRIPT>

See also <SCRIPT>.

This concludes the <OBJECT> element.
<OL> ... </OL> Ordered List
Used to present a numbered list of items, sorted by sequence or order of importance. Numbering is done by the browser so is invisible at design time. This also means new items can be inserted in the list without upsetting contiguous numbering.
Attributes:
START optionally defines which number to start at. Is '1' by default.
TYPE optionally defines whether numbering is '1 – 2 – 3' or 'a – b – c'. Default is by numbers. TYPE="a" specifies an alphabetic sequence.
VALUE optionally specifies the increment. Default is by 1 for each item.
Uses <LI>. See also <LH>.
<P...> ... </P> Paragraph
The most fundamental element for containing any text. In the absence of any other kind of container that can hold text, the
<BODY> element must have at least a <P> element to contain text.
Attributes:
ALIGN Valid values are LEFT, CENTER, RIGHT. Where possible use the <CENTER> element because using <P ALIGN > may cause problems where <P> ... </P> is used as a container.
<PRE> ... </PRE> Preformatted
Displays blocks of text in a fixed-width font, such as Courier, more or less 'as it comes', complete with end of line returns as supplied. Anchors may be included.
<Q> ... </Q> Quote
Doesn't seem to do anything different in either Internet Explorer or Netscape.
Attributes:
As universal.
<SAMP> ... </SAMP> Sample
Makes a sequence of literal characters; typically rendered as monospaced.
<SCRIPT...> ... </SCRIPT>
The text of a script is inserted between <SCRIPT> and its end element </SCRIPT>. It is recommended to further enclose this text in a comment element, <!-- --> so that non-scripting browsers are able to ignore it. (See also JavaScript references and discussion about JavaScript.) Note: only Internet Explorer uses VB- (Visual Basic) -Script. Otherwise it has to be JavaScript, which Explorer versions 3.0 and over can also use.
Attributes:
EVENT Optionally, the name of an event that a named element or object might raise, i.e. this script is specifically an event handler for the named object. Used with FOR. The 'object' can be any valid HTML element capable of raising events as indicated on this page, including Anchors, form buttons, etc. and for which a scripted event handler can be written.
FOR Optionally, the name of the object to handle events for.
LANGUAGE Mandatory unless the SRC attribute is present and specifies the scripting language, else e.g.: <SCRIPT LANGUAGE="JavaScript">
SRC Optional and, if given, specifies a URL that loads the text of a script file, e.g.: <SCRIPT SRC="java/common.javascript">. Note: Netscape may have a problem recognising external script files as such unless they have the specific extension '.javascript'. In this case both Explorer and Netscape only need the SRC attribute written this way to simultaneously define the language type. Otherwise the whole script can be enclosed between the opening and closing elements and forms part of the document.
TYPE An alternative to LANGUAGE, e.g.: <SCRIPT TYPE="text/JavaScript">
<SMALL> ... </SMALL>
The enclosed text is displayed in a small font, if possible, compared with the current font. This is an HTML 3.0 element and may not be widely supported.
<SOUND...>
Specific to Mosaic only. Inline sound files can be placed in any part of the document and Mosaic will act on the sound file when its position is visible to the document view window. The sound file can only be the *.WAV type.
Attributes:
DELAY delays the play of an inline sound for x number of seconds.
LOOP implement as a background sound and repeat x number of times.
Examples:
<SOUND SRC="*.wav" LOOP=infinite>
<SOUND SRC="*.wav" DELAY=10>
<SPAN...> ... </SPAN>
Specific to Internet Explorer. Used to enclose a block that includes text and other elements. Thereafter various methods may be applied to affect the display. For example, if its STYLE attribute is assigned "display:'none'", the entire contents are hidden. This could be done by a script, for example, responding to the click event of a heading, effectively causing following items enclosed in <SPAN> to expand and collapse like a dropdown menu.
<STRIKE> ... </STRIKE>
The enclosed text is displayed with a horizontal line striking through it (like 'strike-through').
<STRONG> ... </STRONG>
Indicates strong typographic emphasis, typically rendered in bold.
<SUB> ... </SUB> Subscript
The enclosed text is displayed as subscript.
<SUP> ... </SUP> Superscript
The enclosed text is displayed as superscript.
<TABLE...> ... </TABLE>
The main wrapper for all other table elements. Tables are typically used to provide more precise positioning of elements on a page, typically through the use of separate vertical columns.
Attributes:
ALIGN allows a table to be aligned to the left or right of the page, allowing text to flow around the table. Also, as with floating images, it is necessary to have knowledge of the <BR CLEAR= > element, to be able to organise the text so as to minimise any unwanted clashing.
BACKGROUND Internet Explorer supports the placing of images inside the <TABLE> element. If used, the specified image is tiled behind all of the table cells.
BGCOLOR allows the background colour of the table to be specified, using either the specified colour names, or a rrggbb hex triplet (see <BODY>.
BORDER if present, borders are drawn around all table cells. If absent, there are no borders, but by default space is left for borders. BORDER="0" forces no borders with minimum spacing.
BORDERCOLOR sets the border colour of the table. See <BODY> about colours syntax.
BORDERCOLORDARK the darker colour to be displayed on a 3-dimensional <TABLE> border.
BORDERCOLORLIGHT the lighter colour to be displayed on a 3-dimensional <TABLE> border.
CELLSPACING the amount of space inserted between individual cells in a table (pixels).
CELLPADDING the amount of space between the border of each cell and its contents.
FRAME Internet Explorer specific. Requires the BORDER attribute to be set and affects the display of the table borders.
HEIGHT describes the height of the table, either as a particular pixel value, or as a percentage of the display window.
RULES Internet Explorer specific. Requires the BORDER value to be set and may only be used in tables where the <THEAD>, <TBODY> and <TFOOT> sections have been set. It affects the display of the internal table borders ("rules").
VALIGN specifies that the text can be top- or bottom-aligned. The default is centre-aligned.
WIDTH describes the desired width of this table, either as an absolute width in pixels, or a percentage of document width.
Parts – <TABLE> element
<TH ...> ... </TH> Table Header
identical to data cells in all respects, with the exception that header cells are in a bold FONT, and have a default ALIGN=center.
Attributes:
ALIGN controls whether text inside the table cell(s) is aligned to the left side of the cell, the right side of the cell, or centred within the cell. Values are left, center, and right.
BACKGROUND used to place an image inside the <TH> element, for which it is tiled.
BGCOLOR allows the background colour of the heading cell to be specified.
BORDERCOLOR sets the border colour of the heading cell.
BORDERCOLORLIGHT
BORDERCOLORDARK
COLSPAN
specifies how many columns of the table this cell should span. E.g. if you want a single cell in a row to span the full width of the table, you must set COLSPAN to the total number of columns, otherwise the cell keeps the width of the first column by default.
HEIGHT describes the height of the cell, either as a particular pixel value, or as a percentage of the display window.
NOWRAP specifies that the lines within this cell cannot be broken to fit the width of the cell.
ROWSPAN specifies how many rows of the table this cell should span.
VALIGN controls whether text inside the table cell(s) is aligned to the top of the cell, the bottom of the cell, or vertically centred within the cell. It can also specify that all the cells in the row should be vertically aligned to the same baseline. Values are top, middle, bottom and baseline.
WIDTH describes the desired width of the cell, either as an absolute width in pixels, or a percentage of table width. Ordinarily complex heuristics are applied to table cells to attempt to present a pleasing looking table. Setting the WIDTH attribute overrides those heuristics for that cell and instead effort is put into fitting the cell into the desired width as specified.

<TR ...> ... </TR> Table Row
The number of rows in a table is exactly specified by how many <TR> elements are contained in it, regardless of cells that may attempt to use the ROWSPAN attribute to span into non-specified rows. <TR> can have both the ALIGN and VALIGN attributes, which if specified become the default alignments for all cells in this row.
Attributes:
ALIGN
BGCOLOR
BORDERCOLOR
BORDERCOLORLIGHT
BORDERCOLORDARK
VALIGN


<TD...> ... </TD> Table 'Data' (Cell)
Specifies a standard table data cell. Table data cells must only appear within table rows. Each row need not have the same number of cells specified as short rows will be padded with blank cells on the right. A cell can contain any of the HTML elements normally present in the body of an HTML document. The default alignment of table data is ALIGN=left and VALIGN=middle.
Attributes:
ALIGN
BACKGROUND
BGCOLOR
BORDERCOLOR
BORDERCOLORLIGHT
BORDERCOLORDARK
COLSPAN
HEIGHT
NOWRAP
ROWSPAN
VALIGN
WIDTH


This concludes the <TABLE> element.
<TT> ... </TT> TeleType
Specifies that the text should be rendered in fixed-width typewriter font.
<U> ... </U> Underline
The enclosed text is underlined.
<UL> ... </UL> Unordered List
Used to present a list of items which is typically separated by white space and/or marked by bullets. Uses the
<LI> element for items. The <LH> element can be used after the first opening part for a non-bulleted title.
<VAR> ... </VAR> Variable
The Variable element indicates a variable name; typically rendered as italic.
<WBR> Word Break
This is for the very rare case when a
<NOBR> section requires an exact break. Also, it can be used any time Netscape Navigator can be helped by telling it where a word is allowed to be broken. The <WBR> element does not force a line break (<BR> does that) it simply lets Netscape Navigator know where a line break is allowed to be inserted if needed.
<XMP> ... </XMP>
Used to presents blocks of text in fixed-width font, and so is suitable for text that has been formatted on screen. As such, it is similar to the
<PRE> and <LISTING> elements, but has a different syntax.