Web Design / HTML

  1. Home
  2. Computing & Technology
  3. Web Design / HTML

<select></select>

By Jennifer Kyrnin, About.com

<select> Description:

The <select> tag creates drop-down lists in XHTML forms.

<select> Web Browser Support:

<select> Attributes:

<select> End Tag:

</select> REQUIRED

<select> Contents:

<option> text. Only the following tag is valid within the <select> tag:

<select> Valid Context:

The <select> tag is valid within the following tags:
a, acronym, address, applet, b, bdo, big, blockquote, body, caption, center, cite, code, dd, del, dfn, div, dt, em, fieldset, font, form, h1, h2, h3, h4, h5, h6, i, iframe, ins, kbd, label, legend, li, noframes, noscript, object, p, pre, q, s, samp, small, span, strike, strong, sub, sup, td, th, tt, u, var

<select> Usage:

  • basic select list
    <form>
    <select name="list">
    <option>Name your favorite pet
    <option>dog
    <option>cat
    <option>rabbit
    </select>
    </form>
  • multiple select list
    <form>
    <select name="list" multiple size="3">
    <option>Name your favorite pet
    <option>dog
    <option>cat
    <option>rabbit
    </select>
    </form>

<select> Special Notes:

  • Use the select list to keep larger lists of choices more readily available.
  • Items that are hidden in a select list are less usable, becuase your readers are less likely to see them.

More <select> Information:

Return to XHTML Element (HTML Tags) Library

Explore Web Design / HTML

About.com Special Features

Build Your Own Website

Step-by-step advice on how to do everything from choosing a Web host to promoting your content. More >

Connect Your Home Computers

Easy ways to connect two computers for networking purposes. More >

Web Design / HTML

  1. Home
  2. Computing & Technology
  3. Web Design / HTML

©2009 About.com, a part of The New York Times Company.

All rights reserved.