HyperText Markup Language/Tag List/option

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

Use[edit | edit source]

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

Example[edit | edit source]

Required attributes[edit | edit source]

value[edit | edit source]

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

Optional attributes[edit | edit source]

class[edit | edit source]

Associated CSS classes.

dir[edit | edit source]

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

disabled[edit | edit source]

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

id[edit | edit source]

A string that will be in the webpage.

lang[edit | edit source]

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

selected[edit | edit source]

Defines the list item as the default selected.

style[edit | edit source]

CSS style command within the tag.

title[edit | edit source]

The title of the tag.

Standard attributes[edit | edit source]

More info[edit | edit source]

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