Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

option

Description

The option element for HTML represents an option in a select element or as part of a list of suggestions in a datalist element.

Syntax

HTML

<option attribute-name="attribute-value"></option>

Attributes

Global

NameValueDescription
disableddisabled | emptySpecifies that the element represents a disabled control
labelstringSpecifies the label of the element
selectedselected | emptySpecifies that this option is pre-selected
valuestringSpecifies a value

Examples

1 · disabled

2 · label

3 · selected

4 · value

datalist

select

!doctype

a

abbr

address

area

article

aside

audio

b

base

bdi

bdo

blockquote

body

br

button

canvas

caption

cite

code

col

colgroup

data

datalist

dd

del

details

dfn

dialog

div

dl

dt

em

embed

fieldset

figcaption

figure

footer

form

h1

h2

h3

h4

h5

h6

head

header

hgroup

hr

html

i

iframe

img

input

ins

kbd

label

legend

li

link

main

map

mark

menu

meta

meter

nav

noscript

object

ol

optgroup

output

p

param

picture

pre

progress

q

rb

rp

rt

rtc

ruby

s

samp

script

search

section

select

slot

small

source

span

strong

style

sub

summary

sup

table

tbody

td

template

textarea

tfoot

th

thead

time

title

tr

track

u

ul

var

video

wbr

Web Hypertext Application Technology Working Group (WHATWG)

HomeMenu