Level 2 HTML Summary
A Level 2 HTML document can include the following elements
and attributes in addition to Level 0 and
Level 1 elements and entities.
In this document, the elements are listed in all capital letters;
the attributes are indicated by initial capital letters.
In order to benefit from the information in this file, view both
its HTML source
as well as its rendered form in a Web browser.
The tags are explained in the list below as well as demonstrated in this
file.
HTML structure and comment elements
Level 2 specifies no additions in this category over
Level 0's structure features.
The HEAD and Related Elements
Level 2 specifies no additions in this category over
Level 1's head features.
The BODY and Related Elements
Form Elements
Forms are used to present an interface consisting of fill-in-the
blank boxes, checklists, radio buttons, or other features to
gather input from a user. The FORM element brackets
an input data form; the elements INPUT, SELECT, OPTION,
and TEXTAREA are used to set up areas within the Form for input.
A Form sets up a set of paired variable name fields and
value value fields. The variable name is supplied in the
Form. The user filling out the Form supplies or selects
the variable values (except for variables with hidden values).
Each Form has a method and action associated with it. The method
specifies how the data from the Form is to be handled in processing.
The action identifies the executable program or
script which will process the data from the From.
- FORM: delimits the start and end of a data input form.
Forms can not be nested although there may be several
in each document. Forms can include other elements such as lists or
<PRE>.
Attributes:
- INPUT: This element is used for collecting information
from the user.
Attributes:
- Align: this attribute is used only with the image
Type (see list below). Possible values are
"top," "middle," and "bottom," and define the
relationship of the image to the text following it.
- Checked: this attribute causes the initial state
of a checkbox or radio button to be "selected."
Without this attribute, the initial state is unselected.
- Maxlength: this attribute sets a maximum number
of characters that a user can enter in a text
a field. The default value of this is unlimited.
- Name: this is the symbolic name that is used in
transferring and identifying the output from this element
of the Form.
- Size: specifies the field width as displayed to
the user. If Size is less than Maxlength, the
text field is scrollable.
- Src: Used to define the source file for the
image used with the attribute Type is set to "image."
- Type:
- checkbox: This is used for gathering data that
can have multiple values at a time.
- hidden: This is for values that are set by the
form without input from the user.
- image: An image field be used to submit the Form:
when the user clicks on the image, the Form is submitted,
and the x and y coordinates of the click location
are transmitted with the name/value pairs.
- password: This is a field in which the user enters text,
but the text is not displayed (could appear as stars).
- radio: Used to collect information where there
is one and only one possible value from a set of
alternatives. The Checked attribute can set the
initial value of this element.
- reset: This is used to reset and clear the Form to
its default values. The Value attribute sets the
string displayed to the user for this element.
- submit: This button is used to submit the Form.
The Value attribute sets the string displayed to
the user for this element.
- text: This is used for a single line of
text; this uses the Size and Maxlength
attributes. For multiple lines, use TEXTAREA (below).
- Text: a single line text-entry area (Textarea element is used
for multi-line text input). If the only element in the Form
has attribute Text, then the user can submit the Form by
hitting keyboard Enter (or Return).
- Value: This sets the initial displayed value of the field
or the value of the field when it is selected (the radio
button type must have this attribute set).
- SELECT: this element allows a user to choose
one of a set of alternatives. The OPTION element is used
to define each alternative.
Attributes:
- Name: The logical name that will be submitted and associated
with the data as a result of the user choosing select.
- Multiple: By default, the user can only make one selection
from the group in the SELECT element. By using the
Multiple attribute, the user may select one or
more of the OPTIONs.
- Size: specifies the number of visible items.
If this is more than one, the visual display will be
a list.
- OPTION: This element occurs only within the SELECT element (above) and
is used to represent each choice of the SELECT.
Attributes:
- Selected: indicates that this option is initially
selected.
- Value: If present, this is the value that will be returned
by the SELECT if this option is chosen; otherwise,
the value returned is that set by the OPTION element.
- TEXTAREA: This element is used to collect multiple lines
of text from the user; the user is presented with a scrollable
pane in which text can be written.
Attributes:
- Name: The logical name that will be associated with the
returned text.
- Rows: The number of rows that will be displayed (note
the user can use more rows and scroll down to them).
- Cols: The number of columns that will be displayed
(the user can use the scrollbar to move through more
columns if necessary.)
References
Copyright © 1995 by John December. All rights reserved.
John December ([email protected]) / 31 May 95
Hyperlinks:
Table of Contents
Questions? E-mail your Instructor -
Dr. Charles Rubenstein
Tutorial Copyright (c) 1996-2006
C.P.Rubenstein