Users should be aware that HTML is an evolving language, and different World-Wide Web browsers may recognize slightly different sets of HTML elements. For general information about HTML including plans for new versions, see http://www.w3.org/hypertext/WWW/MarkUp/MarkUp.html. For a comprehensive list of HTML elements see http://www.sandia.gov/sci_compute/html_ref.html
An HTML element may include a name, some attributes and some text or hypertext, and will appear in an HTML document as
<tag_name> text </tag_name>
<tag_name attribute_name=argument>
text </tag_name>
, or just
<tag_name>
<title> My Useful Document </title>
<a href="argument"> text </a>
<html>
. . . </html>
<head>
. . . </head>
<body>
. . . </body>
<html>
,
<head>
, and <body>
are actually
optional within HTML documents.
<isindex>
<title>
. . . </title>
<base href="URL">
<link rev="RELATIONSHIP" rel="RELATIONSHIP" href="URL">
rel
attribute specifies the
relationship between the HTML file and the Uniform Resource
Locator (URL).
The rev
attribute (for "reverse")
specifies the relationship between the URL and the HTML file.
For example, <link rev="made" href="URL">
indicates that the file maker or owner is
described in the document identified by the URL.
(Note that link tags are not displayed on the screen as part of
the document. They define static relationships, not hypertext links.)
<p>
<pre>
. . . </pre>
<pre>
tag can be used to include tables in
documents.
<listing>
. . . </listing>
<xmp>
. . . </xmp>
<pre>
except no embedded tags will
be recognized.
<plaintext>
<pre>
except no embedded tags will
be recognized, and since there is no end tag, the remainder of the
document will be rendered as plain text. This is an archaic tag.
Note that some browsers actually recognize a </plaintext>
tag, even though it is not defined by the standard.
<blockquote>
. . . </blockquote>
<a name="anchor_name">
. . .
</a>
<a href="#anchor_name">
. . .
</a>
<a href="URL">
. . .
</a>
<a href="URL#anchor_name">
. . .
</a>
<a href="URL?search_word+search_word">
. . .
</a>
name
or href
attribute,
and may include both. There are several optional attributes, but they
are rarely encountered.
The structure of a Uniform Resource Locator (URL) may be expressed as:
file
,
http
, news
, gopher
,
telnet
, ftp
,
and wais
, among others, and each resource type relates to
a specific server type. Since each server performs a unique function,
each resource type requires different additional_information
.
For example http
and gopher
URLs will
have a structure like:
Strictly speaking, the anchor_name
and search_word
information included
in the name
and
href
attributes in the examples above are part of the URL.
They are presented as separate entities for simplicity.
A more complete description of URLs is presented
in
http://www.w3.org/hypertext/WWW/Addressing/Addressing.html
<h1>
. . .
</h1>
Most prominent header
<h2>
. . .
</h2>
<h3>
. . .
</h3>
<h4>
. . .
</h4>
<h5>
. . .
</h5>
<h6>
. . .
</h6>
Least prominent header
<em>
. . .
</em>
<strong>
. . .
</strong>
<code>
. . .
</code>
<samp>
. . .
</samp>
<kbd>
. . .
</kbd>
<var>
. . .
</var>
<dfn>
. . .
</dfn>
<cite>
. . .
</cite>
<b>
. . . </b>
<i>
. . . </i>
<u>
. . . </u>
<tt>
. . . </tt>
<dl>
<dt>
First term to be defined
<dd>
Definition of first term
<dt>
Next term to be defined
<dd>
Next definition
</dl>
<dl>
attribute compact
can be used to
generate a definition list requiring less space.
<ul>
<li>
First item in the list
<li>
Next item in the list
</ul>
<ol>
<li>
First item in the list
<li>
Next item in the list
</ol>
<menu>
<li>
First item in the menu
<li>
Next item
</menu>
<dir>
<li>
First item in the list
<li>
Second item in the list
<li>
Next item in the list
</dir>
&
keyword;
&
specifies the
ampersand ( & ),
and the entity <
specifies the less than
( < ) character.
Note that the semicolon
following the keyword is required, and the keyword must be one from the
lists presented in:
&#
ascii_equivalent;
The following tags implement the forms interface:
<form>
. . . </form>
<input>
<select>
. . . </select>
<option>
<textarea>
. . . </textarea>
<form>
. . . </form>
element.
<form>
. . . </form>
Define a form within an HTML document.
A document may contain multiple <form>
elements, but
<form>
elements may not be nested.
Note that non-form tags can be used within a <form>
element.
Attributes and their arguments:
action="URL"
:
method=data_exchange method
get
or post
.
post
is preferred for most applications.
<form action="http://www.cc.ukans.edu/cgi-bin/register" method=post>
. . . </form>
<input>
(there is no ending tag)
Defines an input field where the user may enter information on the form.
Each input field assigns a value to a variable which has a specified
name
and a specified data type
.
Attributes and their arguments:
type="variable_type"
type="text"
and type="password"
fields
accept character data
type="checkbox"
fields are either selected or not
type="radio"
fields of the same name allow selection
of only one of the associated values
type="submit"
defines an action button that sends
the completed form to the query server
type="reset"
defines a button that resets the form
variables to their default values
type="hidden"
defines an invisible input field whose value
will be sent along with the other form values when the form is
submitted. This is used to pass state information from one
script or form to another.
type="image"
defines an image map within a form and
returns the coordinates of a mouse click within the image.
name="textstring"
textstring
is a symbolic
name (not displayed) identifying the input
variable as in:
<input type="checkbox" name="box1">
value="textstring"
textstring
depends on the argument for type
.
type="text"
or type="password"
,
textstring
is the default value for the
input
variable. Password values will not be shown on the
user's form. Anything entered by the user will replace any default value
defined with this attribute.
type="checkbox"
or type="radio"
,
textstring
is the value that will be sent to the server
if the checkbox is "checked".
type="reset"
or type="submit"
,
textstring
is a label that will appear on the submit or reset button in place of
the words "submit
" and "reset
".
checked
type="checkbox"
or type="radio"
,
if checked
is present the input
field
is "checked" by default.
size="display_width"
display_width
is an integer value
representing the number of
characters displayed for the type="text"
or type="password" input
field.
maxlength="string_length"
string_length
is the maximum number of characters
allowed within type="text"
or type="password"
variable values.
This attribute is only valid for single line "text"
or "password"
fields.
<select>
. . . </select>
defines and displays a set of optional list items from which the user
can select one or more items.
This element requires an <option>
element for each
item in the list.
Attributes and their arguments:
name="textstring"
textstring
is the
symbolic identifier for the select
field variable.
size="list_length"
list_length
is an integer value representing
the number of <option>
items that will be
displayed at one time.
multiple
multiple
attribute
allows selection of more than one <option>
value.
<option>
Within the <select>
element the <option>
tags are used to define the possible values for the select
field. If the attribute selected
is present then the
option
value is selected by default. In the following example
all three options may be chosen but bananas are selected by default.
<select multiple>
<option>Apples
<option selected>Bananas
<option>Cherries
</select>
<textarea>
. . . default text . . . </textarea>
Defines a rectangular field where the user may enter text data. If "default text" is present it will be displayed when the field appears. Otherwise the field will be blank. Attributes and their values:
name="textstring"
textstring
is a symbolic
name that identifies the <textarea>
variable.
rows="num_rows"
and cols="numcols"
<textarea>
to be displayed.
<!--
text -->
<address>
. . .
</address>
<img src="URL" alt="Alternate Text">
src
alt
align
align
can be one of top
,
middle
, or bottom
.
ismap
ismap
is present and the image tag is within
an anchor, the image will become a "clickable image". The pixel
coordinates of the cursor will be appended to the URL specified in the
anchor if the user clicks within the ismap image. The resulting URL will
take the form "URL?m,n" where m and n are integer coordinates, and the
URL will specify the location of a program that will examine
the pixel coordinates, and return an appropriate document.
<br>
<hr>
For an introduction to forms within HTML see: An Instantaneous Introduction to CGI Scripts and HTML Forms.
For general information about HTML, see http://www.w3.org/hypertext/WWW/MarkUp/MarkUp.html
Michael Grobe