The option element defines an option in the drop-down list.
Differences Between HTML and XHTML
In HTML the <option> tag has no end tag.
In XHTML the <option> tag must be properly closed.
Tips and Notes
Note: The <option> tag can be used without any attributes, but
you usually need the value attribute, which indicates what is sent to the
server.
Note: Use this tag in conjunction with the select element, elsewhere
it is meaningless.
Example
Source
Output
<select>
<option value ="volvo">Volvo</option>
<option value ="saab">Saab</option>
<option value ="opel" selected="selected">Opel</option>
<option value ="audi">Audi</option>
</select>
Optional Attributes
DTD indicates in which DTD the attribute is
allowed. S=Strict, T=Transitional, and F=Frameset.
Attribute
Value
Description
DTD
disabled
disabled
Specifies that the option should be disabled when it first
loads
STF
label
text
Defines a label to use when using <optgroup>
STF
selected
selected
Specifies that the option should appear selected (will be
displayed first in the list)
STF
value
text
Defines the value of the option to be sent to the
server
Simple drop down box
How to create a simple drop-down box on an HTML page. A drop-down box is a
selectable list.
Another drop down box
How to create a simple drop-down box with a pre-selected value.
What do you want your Web site to do?
Ektron’s new Extranet for Client Collaboration is designed to manage documents and timelines while facilitating collaboration among
your internal and external project stake holders.
Features include:
Client authentication using Ektron's robust membership module, allowing you to add, manage and notify your project stake holders
Project Status Dashboard allowing for visual navigation across all aspects of your project, efficiently and effectively from one single location
Wiki Scribble Pad for tracking major additions, changes or other related announcements for your project teams
Discussion forums and message boards to facilitate conversations within a non real-time environment
Integrated Document Management allowing you to maintain a complete history and audit trail of all documents that can affect the success of your project
Milestone Tracking with Outlook synchronization ensuring all your goals and deadlines are met
Public and Private Blogs for further extending communication across the team regarding status, feature creep or other external changes
See why there are 20,000+ Ektron integrations worldwide.
W3Schools provides material for training only. We do not warrant the correctness of its contents.
The risk from using it lies entirely with the user.
While using this site, you agree to have read and accepted our
terms of use and
privacy policy.