HyperText Markup Language/Tag List/option

From Wikibooks, open books for an open world
Jump to: navigation, search

Use[edit]

Used in relation to the select tag. It defines the options in the list box that should have been declared.

Example[edit]

Required attributes[edit]

value[edit]

The value of the option that has been selected. It is then sent to the form.

Optional attributes[edit]

class[edit]

Associated CSS classes.

dir[edit]

The direction of the text. The user has the choice of "rtl" (right to left) or "ltr" (left to right).

disabled[edit]

Locks the values away from the user. The user cannot modify the value within the tag.

id[edit]

A string that will be in the webpage.

lang[edit]

The ISO language code that the user wants to use for the tag.

selected[edit]

Defines the list item as the default selected.

style[edit]

CSS style command within the tag.

title[edit]

The title of the tag.

Standard attributes[edit]

More info[edit]

A link to a page with more info, then the name of the site the info came from (i.e. W3Schools).