HOME BACK NEXT MENU

 Tag Description:

-==--==--==--==--==-

<OPTION> From Select Option

Definition: The OPTION element represents a possible choice; the only place that it can occur is within a SELECT element. Its only permitted contents are text and SGML entries for accented characters, etc.

Standard Attributes: CLASS, ID, LANG

Attributes:

VALUE

VALUE is a number or character string that is used with the name attribute of the enclosing select element when the form is submitted. It defaults to the OPTION element’s content.

DISABLED

When DISABLED is present, the option cannot be modified by the user, although it should be rendered as normal regardless. Wherever the option is disabled, the rendering should ideally provide a clue to this state (by changing the background color, for example).

ERROR

ERROR specifies an error message that explains why the option's current value registers as incorrect. The option can be assumed to be OK when this attribute is not present. It is recommended that user agents provide a cue indicating that the option is in error.

SELECTED

When SELECTED is present, it signifies that the option should be initialized in its selected state. Having more than one option selected for single choice menus is an error.

SHAPE

SHAPE defines shaped hotzones associated with this option's values within menus. It has an attribute value of a string taking one of these forms:

* "circle x, y, r": x and y define the center, and r is the radius.

* "rect x, y, w, h": w, h define the width and height, x, y define the upper left corner

* "default": defines a default link for the figure background

* "polygon x1, y1, x2, y2": Intersecting polygons utilize the non-zero winding rule to determine whether a point lies inside or outside a polygon. The polygon is also closed by a line that links the nth point to the first (when given n pairs of x, y coordinates).

SHAPE is useful in creating closely spaced hotzones. When two or more shapes are overlapping in an area when a pointer event occurs, then the closest of the overlapping shapes is chosen by computing the distance from the point to the center of gravity for each shape. Just as in IMG and image maps, the x coordinate increases to the right and the y coordinate increases downwards. The coordinates are seen as pixel offsets from the figure's upper left corner when both numbers are integers, but if the numbers are not integers, then the coordinates are interpreted as scaled values across the figure (in the range 0.0 to 1.0). The syntax does tolerate repeated white space characters between tokens.

Context: <OPTION> is legal within

<SELECT>

The following markup can be used within <OPTION>: None

Suggested style/usage: Close Tag: OPTIONAL

-==--==--==--==--==-
HOME BACK NEXT MENU

E-Mail: HTML for Dummies at html4dum@lanw.com
URL: http://www.lanw.com/html4dum/h4d2e/t0060.htm
Text - Copyright © 1995, 1996 Ed Tittel & Steve James.
For Dummies, the Dummies Man logo and Dummies Press are trademarks or registered trademarks of Wiley Publishing, Inc. Used with Permission.
Web Layout - Copyright © 1996, LANWrights
Revised -- May, 2002 [MCB]