Annotation of html5/spec-author-view/the-button-element.html, revision 1.159

1.156     mike        1: <!DOCTYPE html>
                      2: <!-- when publishing, change bits marked ZZZ --><html lang="en-US-x-Hixie" class="split chapter"><head><meta content="text/html; charset=ascii" http-equiv="Content-Type"><title>4.10.8 The button element &#8212; HTML5 (Edition for Web Authors)</title><link href="whatwg.css" rel="stylesheet"><style type="text/css">
1.1       mike        3:    pre { margin-left: 2em; white-space: pre-wrap; }
                      4:    h2 { margin: 3em 0 1em 0; }
                      5:    h3 { margin: 2.5em 0 1em 0; }
                      6:    h4 { margin: 2.5em 0 0.75em 0; }
                      7:    h5, h6 { margin: 2.5em 0 1em; }
                      8:    h1 + h2, h1 + h2 + h2 { margin: 0.75em 0 0.75em; }
                      9:    h2 + h3, h3 + h4, h4 + h5, h5 + h6 { margin-top: 0.5em; }
                     10:    p { margin: 1em 0; }
                     11:    hr:not(.top) { display: block; background: none; border: none; padding: 0; margin: 2em 0; height: auto; }
                     12:    dl, dd { margin-top: 0; margin-bottom: 0; }
                     13:    dt { margin-top: 0.75em; margin-bottom: 0.25em; clear: left; }
                     14:    dt + dt { margin-top: 0; }
                     15:    dd dt { margin-top: 0.25em; margin-bottom: 0; }
                     16:    dd p { margin-top: 0; }
                     17:    dd dl + p { margin-top: 1em; }
                     18:    dd table + p { margin-top: 1em; }
                     19:    p + * > li, dd li { margin: 1em 0; }
                     20:    dt, dfn { font-weight: bold; font-style: normal; }
                     21:    dt dfn { font-style: italic; }
                     22:    pre, code { font-size: inherit; font-family: monospace; font-variant: normal; }
                     23:    pre strong { color: black; font: inherit; font-weight: bold; background: yellow; }
                     24:    pre em { font-weight: bolder; font-style: normal; }
                     25:    @media screen { code { color: orangered; } code :link, code :visited { color: inherit; } }
                     26:    var sub { vertical-align: bottom; font-size: smaller; position: relative; top: 0.1em; }
                     27:    table { border-collapse: collapse; border-style: hidden hidden none hidden; }
1.34      mike       28:    table thead, table tbody { border-bottom: solid; }
1.1       mike       29:    table tbody th:first-child { border-left: solid; }
                     30:    table tbody th { text-align: left; }
                     31:    table td, table th { border-left: solid; border-right: solid; border-bottom: solid thin; vertical-align: top; padding: 0.2em; }
                     32:    blockquote { margin: 0 0 0 2em; border: 0; padding: 0; font-style: italic; }
                     33: 
                     34:    .bad, .bad *:not(.XXX) { color: gray; border-color: gray; background: transparent; }
                     35:    .matrix, .matrix td { border: none; text-align: right; }
                     36:    .matrix { margin-left: 2em; }
                     37:    .dice-example { border-collapse: collapse; border-style: hidden solid solid hidden; border-width: thin; margin-left: 3em; }
                     38:    .dice-example caption { width: 30em; font-size: smaller; font-style: italic; padding: 0.75em 0; text-align: left; }
                     39:    .dice-example td, .dice-example th { border: solid thin; width: 1.35em; height: 1.05em; text-align: center; padding: 0; }
                     40: 
                     41:    .toc dfn, h1 dfn, h2 dfn, h3 dfn, h4 dfn, h5 dfn, h6 dfn { font: inherit; }
                     42:    img.extra { float: right; }
                     43:    pre.idl { border: solid thin; background: #EEEEEE; color: black; padding: 0.5em 1em; }
                     44:    pre.idl :link, pre.idl :visited { color: inherit; background: transparent; }
                     45:    pre.css { border: solid thin; background: #FFFFEE; color: black; padding: 0.5em 1em; }
                     46:    pre.css:first-line { color: #AAAA50; }
1.23      mike       47:    dl.domintro { color: green; margin: 2em 0 2em 2em; padding: 0.5em 1em; border: none; background: #DDFFDD; }
1.1       mike       48:    hr + dl.domintro, div.impl + dl.domintro { margin-top: 2.5em; margin-bottom: 1.5em; }
                     49:    dl.domintro dt, dl.domintro dt * { color: black; text-decoration: none; }
                     50:    dl.domintro dd { margin: 0.5em 0 1em 2em; padding: 0; }
                     51:    dl.domintro dd p { margin: 0.5em 0; }
                     52:    dl.switch { padding-left: 2em; }
                     53:    dl.switch > dt { text-indent: -1.5em; }
                     54:    dl.switch > dt:before { content: '\21AA'; padding: 0 0.5em 0 0; display: inline-block; width: 1em; text-align: right; line-height: 0.5em; }
                     55:    dl.triple { padding: 0 0 0 1em; }
                     56:    dl.triple dt, dl.triple dd { margin: 0; display: inline }
                     57:    dl.triple dt:after { content: ':'; }
                     58:    dl.triple dd:after { content: '\A'; white-space: pre; }
                     59:    .diff-old { text-decoration: line-through; color: silver; background: transparent; }
                     60:    .diff-chg, .diff-new { text-decoration: underline; color: green; background: transparent; }
                     61:    a .diff-new { border-bottom: 1px blue solid; }
                     62: 
                     63:    h2 { page-break-before: always; }
                     64:    h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
                     65:    h1 + h2, hr + h2.no-toc { page-break-before: auto; }
                     66: 
                     67:    p > span:not([title=""]):not([class="XXX"]):not([class="impl"]), li > span:not([title=""]):not([class="XXX"]):not([class="impl"]) { border-bottom: solid #9999CC; }
                     68: 
                     69:    div.head { margin: 0 0 1em; padding: 1em 0 0 0; }
                     70:    div.head p { margin: 0; }
                     71:    div.head h1 { margin: 0; }
                     72:    div.head .logo { float: right; margin: 0 1em; }
                     73:    div.head .logo img { border: none } /* remove border from top image */
                     74:    div.head dl { margin: 1em 0; }
                     75:    div.head p.copyright, div.head p.alt { font-size: x-small; font-style: oblique; margin: 0; }
                     76: 
                     77:    body > .toc > li { margin-top: 1em; margin-bottom: 1em; }
                     78:    body > .toc.brief > li { margin-top: 0.35em; margin-bottom: 0.35em; }
                     79:    body > .toc > li > * { margin-bottom: 0.5em; }
                     80:    body > .toc > li > * > li > * { margin-bottom: 0.25em; }
                     81:    .toc, .toc li { list-style: none; }
                     82: 
                     83:    .brief { margin-top: 1em; margin-bottom: 1em; line-height: 1.1; }
                     84:    .brief li { margin: 0; padding: 0; }
                     85:    .brief li p { margin: 0; padding: 0; }
                     86: 
                     87:    .category-list { margin-top: -0.75em; margin-bottom: 1em; line-height: 1.5; }
                     88:    .category-list::before { content: '\21D2\A0'; font-size: 1.2em; font-weight: 900; }
                     89:    .category-list li { display: inline; }
                     90:    .category-list li:not(:last-child)::after { content: ', '; }
                     91:    .category-list li > span, .category-list li > a { text-transform: lowercase; }
                     92:    .category-list li * { text-transform: none; } /* don't affect <code> nested in <a> */
                     93: 
                     94:    .XXX { color: #E50000; background: white; border: solid red; padding: 0.5em; margin: 1em 0; }
                     95:    .XXX > :first-child { margin-top: 0; }
                     96:    p .XXX { line-height: 3em; }
                     97:    .annotation { border: solid thin black; background: #0C479D; color: white; position: relative; margin: 8px 0 20px 0; }
                     98:    .annotation:before { position: absolute; left: 0; top: 0; width: 100%; height: 100%; margin: 6px -6px -6px 6px; background: #333333; z-index: -1; content: ''; }
                     99:    .annotation :link, .annotation :visited { color: inherit; }
                    100:    .annotation :link:hover, .annotation :visited:hover { background: transparent; }
                    101:    .annotation span { border: none ! important; }
                    102:    .note { color: green; background: transparent; font-family: sans-serif; }
                    103:    .warning { color: red; background: transparent; }
                    104:    .note, .warning { font-weight: bolder; font-style: italic; }
                    105:    p.note, div.note { padding: 0.5em 2em; }
                    106:    span.note { padding: 0 2em; }
                    107:    .note p:first-child, .warning p:first-child { margin-top: 0; }
                    108:    .note p:last-child, .warning p:last-child { margin-bottom: 0; }
                    109:    .warning:before { font-style: normal; }
                    110:    p.note:before { content: 'Note: '; }
                    111:    p.warning:before { content: '\26A0 Warning! '; }
                    112: 
                    113:    .bookkeeping:before { display: block; content: 'Bookkeeping details'; font-weight: bolder; font-style: italic; }
                    114:    .bookkeeping { font-size: 0.8em; margin: 2em 0; }
                    115:    .bookkeeping p { margin: 0.5em 2em; display: list-item; list-style: square; }
1.132     mike      116:    .bookkeeping dt { margin: 0.5em 2em 0; }
                    117:    .bookkeeping dd { margin: 0 3em 0.5em; }
1.1       mike      118: 
                    119:    h4 { position: relative; z-index: 3; }
                    120:    h4 + .element, h4 + div + .element { margin-top: -2.5em; padding-top: 2em; }
                    121:    .element {
                    122:      background: #EEEEFF;
                    123:      color: black;
                    124:      margin: 0 0 1em 0.15em;
                    125:      padding: 0 1em 0.25em 0.75em;
                    126:      border-left: solid #9999FF 0.25em;
                    127:      position: relative;
                    128:      z-index: 1;
                    129:    }
                    130:    .element:before {
                    131:      position: absolute;
                    132:      z-index: 2;
                    133:      top: 0;
                    134:      left: -1.15em;
                    135:      height: 2em;
                    136:      width: 0.9em;
                    137:      background: #EEEEFF;
                    138:      content: ' ';
                    139:      border-style: none none solid solid;
                    140:      border-color: #9999FF;
                    141:      border-width: 0.25em;
                    142:    }
                    143: 
                    144:    .example { display: block; color: #222222; background: #FCFCFC; border-left: double; margin-left: 2em; padding-left: 1em; }
                    145:    td > .example:only-child { margin: 0 0 0 0.1em; }
                    146: 
                    147:    ul.domTree, ul.domTree ul { padding: 0 0 0 1em; margin: 0; }
                    148:    ul.domTree li { padding: 0; margin: 0; list-style: none; position: relative; }
                    149:    ul.domTree li li { list-style: none; }
                    150:    ul.domTree li:first-child::before { position: absolute; top: 0; height: 0.6em; left: -0.75em; width: 0.5em; border-style: none none solid solid; content: ''; border-width: 0.1em; }
                    151:    ul.domTree li:not(:last-child)::after { position: absolute; top: 0; bottom: -0.6em; left: -0.75em; width: 0.5em; border-style: none none solid solid; content: ''; border-width: 0.1em; }
                    152:    ul.domTree span { font-style: italic; font-family: serif; }
                    153:    ul.domTree .t1 code { color: purple; font-weight: bold; }
                    154:    ul.domTree .t2 { font-style: normal; font-family: monospace; }
                    155:    ul.domTree .t2 .name { color: black; font-weight: bold; }
                    156:    ul.domTree .t2 .value { color: blue; font-weight: normal; }
                    157:    ul.domTree .t3 code, .domTree .t4 code, .domTree .t5 code { color: gray; }
                    158:    ul.domTree .t7 code, .domTree .t8 code { color: green; }
                    159:    ul.domTree .t10 code { color: teal; }
                    160: 
1.14      mike      161:    body.dfnEnabled dfn { cursor: pointer; }
                    162:    .dfnPanel {
                    163:      display: inline;
                    164:      position: absolute;
                    165:      z-index: 10;
                    166:      height: auto;
                    167:      width: auto;
                    168:      padding: 0.5em 0.75em;
                    169:      font: small sans-serif, Droid Sans Fallback;
                    170:      background: #DDDDDD;
                    171:      color: black;
                    172:      border: outset 0.2em;
                    173:    }
                    174:    .dfnPanel * { margin: 0; padding: 0; font: inherit; text-indent: 0; }
                    175:    .dfnPanel :link, .dfnPanel :visited { color: black; }
                    176:    .dfnPanel p { font-weight: bolder; }
                    177:    .dfnPanel * + p { margin-top: 0.25em; }
                    178:    .dfnPanel li { list-style-position: inside; }
                    179: 
1.1       mike      180:    #configUI { position: absolute; z-index: 20; top: 10em; right: 1em; width: 11em; font-size: small; }
                    181:    #configUI p { margin: 0.5em 0; padding: 0.3em; background: #EEEEEE; color: black; border: inset thin; }
                    182:    #configUI p label { display: block; }
                    183:    #configUI #updateUI, #configUI .loginUI { text-align: center; }
                    184:    #configUI input[type=button] { display: block; margin: auto; }
1.121     mike      185: 
1.1       mike      186:   </style><style type="text/css">
                    187: 
                    188:    .applies thead th > * { display: block; }
                    189:    .applies thead code { display: block; }
                    190:    .applies tbody th { whitespace: nowrap; }
                    191:    .applies td { text-align: center; }
                    192:    .applies .yes { background: yellow; }
                    193: 
1.136     mike      194:    .matrix, .matrix td { border: hidden; text-align: right; }
1.1       mike      195:    .matrix { margin-left: 2em; }
                    196: 
                    197:    .dice-example { border-collapse: collapse; border-style: hidden solid solid hidden; border-width: thin; margin-left: 3em; }
                    198:    .dice-example caption { width: 30em; font-size: smaller; font-style: italic; padding: 0.75em 0; text-align: left; }
                    199:    .dice-example td, .dice-example th { border: solid thin; width: 1.35em; height: 1.05em; text-align: center; padding: 0; }
                    200: 
                    201:    #table-example-1 { border: solid thin; border-collapse: collapse; margin-left: 3em; }
                    202:    #table-example-1 * { font-family: "Essays1743", serif; line-height: 1.01em; }
                    203:    #table-example-1 caption { padding-bottom: 0.5em; }
                    204:    #table-example-1 thead, #table-example-1 tbody { border: none; }
                    205:    #table-example-1 th, #table-example-1 td { border: solid thin; }
                    206:    #table-example-1 th { font-weight: normal; }
                    207:    #table-example-1 td { border-style: none solid; vertical-align: top; }
                    208:    #table-example-1 th { padding: 0.5em; vertical-align: middle; text-align: center; }
                    209:    #table-example-1 tbody tr:first-child td { padding-top: 0.5em; }
                    210:    #table-example-1 tbody tr:last-child td { padding-bottom: 1.5em; }
                    211:    #table-example-1 tbody td:first-child { padding-left: 2.5em; padding-right: 0; width: 9em; }
                    212:    #table-example-1 tbody td:first-child::after { content: leader(". "); }
                    213:    #table-example-1 tbody td { padding-left: 2em; padding-right: 2em; }
                    214:    #table-example-1 tbody td:first-child + td { width: 10em; }
                    215:    #table-example-1 tbody td:first-child + td ~ td { width: 2.5em; }
                    216:    #table-example-1 tbody td:first-child + td + td + td ~ td { width: 1.25em; }
                    217: 
                    218:    .apple-table-examples { border: none; border-collapse: separate; border-spacing: 1.5em 0em; width: 40em; margin-left: 3em; }
                    219:    .apple-table-examples * { font-family: "Times", serif; }
                    220:    .apple-table-examples td, .apple-table-examples th { border: none; white-space: nowrap; padding-top: 0; padding-bottom: 0; }
                    221:    .apple-table-examples tbody th:first-child { border-left: none; width: 100%; }
                    222:    .apple-table-examples thead th:first-child ~ th { font-size: smaller; font-weight: bolder; border-bottom: solid 2px; text-align: center; }
                    223:    .apple-table-examples tbody th::after, .apple-table-examples tfoot th::after { content: leader(". ") }
                    224:    .apple-table-examples tbody th, .apple-table-examples tfoot th { font: inherit; text-align: left; }
                    225:    .apple-table-examples td { text-align: right; vertical-align: top; }
                    226:    .apple-table-examples.e1 tbody tr:last-child td { border-bottom: solid 1px; }
1.9       mike      227:    .apple-table-examples.e1 tbody + tbody tr:last-child td { border-bottom: double 3px; }
                    228:    .apple-table-examples.e2 th[scope=row] { padding-left: 1em; }
                    229:    .apple-table-examples sup { line-height: 0; }
                    230: 
1.11      mike      231:    .details-example img { vertical-align: top; }
                    232: 
1.26      mike      233:    #named-character-references-table {
                    234:      font-size: 0.6em;
                    235:      column-width: 28em;
                    236:      column-gap: 1em;
                    237:      -moz-column-width: 28em;
                    238:      -moz-column-gap: 1em;
                    239:      -webkit-column-width: 28em;
                    240:      -webkit-column-gap: 1em;
                    241:    }
                    242:    #named-character-references-table > table > tbody > tr > td:last-child { text-align: center; }
                    243:    #named-character-references-table > table > tbody > tr > td:last-child:hover > span { position: absolute; top: auto; left: auto; margin-left: 0.5em; line-height: 1.2; font-size: 5em; border: outset; padding: 0.25em 0.5em; background: white; width: 1.25em; height: auto; text-align: center; }
                    244: 
1.35      mike      245:    .glyph.control { color: red; }
                    246: 
1.38      mike      247:    @font-face {
                    248:      font-family: 'Essays1743';
                    249:      src: url('http://www.whatwg.org/specs/web-apps/current-work/fonts/Essays1743.ttf');
                    250:    }
                    251:    @font-face {
                    252:      font-family: 'Essays1743';
                    253:      font-weight: bold;
                    254:      src: url('http://www.whatwg.org/specs/web-apps/current-work/fonts/Essays1743-Bold.ttf');
                    255:    }
                    256:    @font-face {
                    257:      font-family: 'Essays1743';
                    258:      font-style: italic;
                    259:      src: url('http://www.whatwg.org/specs/web-apps/current-work/fonts/Essays1743-Italic.ttf');
                    260:    }
                    261:    @font-face {
                    262:      font-family: 'Essays1743';
                    263:      font-style: italic;
                    264:      font-weight: bold;
                    265:      src: url('http://www.whatwg.org/specs/web-apps/current-work/fonts/Essays1743-BoldItalic.ttf');
                    266:    }
                    267: 
1.25      mike      268:   </style><link href="data:text/css," id="complete" rel="stylesheet" title="Complete specification"><link href="data:text/css,.impl%20%7B%20display:%20none;%20%7D%0Ahtml%20%7B%20border:%20solid%20yellow;%20%7D%20.domintro:before%20%7B%20display:%20none;%20%7D" id="author" rel="alternate stylesheet" title="Author documentation only"><link href="data:text/css,.impl%20%7B%20background:%20%23FFEEEE;%20%7D%20.domintro:before%20%7B%20background:%20%23FFEEEE;%20%7D" id="highlight" rel="alternate stylesheet" title="Highlight implementation requirements"><script type="text/javascript">
1.157     mike      269:  function getCookie(name) {
                    270:    var params = location.search.substr(1).split("&");
                    271:    for (var index = 0; index < params.length; index++) {
                    272:      if (params[index] == name)
                    273:        return "1";
                    274:      var data = params[index].split("=");
                    275:      if (data[0] == name)
                    276:        return unescape(data[1]);
1.9       mike      277:    }
1.157     mike      278:    var cookies = document.cookie.split("; ");
                    279:    for (var index = 0; index < cookies.length; index++) {
                    280:      var data = cookies[index].split("=");
                    281:      if (data[0] == name)
                    282:        return unescape(data[1]);
1.9       mike      283:    }
1.157     mike      284:    return null;
                    285:  }
                    286:  function load(script) {
                    287:    var e = document.createElement('script');
                    288:    e.setAttribute('src', script + '?' + encodeURIComponent(location) + '&' + encodeURIComponent(document.referrer));
                    289:    document.body.appendChild(e);
                    290:  }
                    291:  function init() {
                    292:    if (location.search == '?slow-browser')
                    293:      return;
                    294:    var configUI = document.createElement('div');
                    295:    configUI.id = 'configUI';
                    296:    document.body.appendChild(configUI);
                    297:    if (document.getElementById('head'))
                    298:      load('toc.js');
                    299:    load('dfn.js');
                    300:    if (getCookie('profile') == '1')
                    301:      document.getElementsByTagName('h2')[0].textContent += '; load: ' + (new Date() - loadTimer) + 'ms';
                    302:    fixBrokenLink();
                    303:  }
                    304: </script><link href="http://www.w3.org/StyleSheets/TR/W3C-ED" rel="stylesheet" type="text/css"><link href="style.css" rel="stylesheet"><script src="link-fixup.js"></script><link href="common-input-element-attributes.html" title="4.10.7.2 Common input element attributes" rel="prev">
1.156     mike      305:   <link href="Overview.html#contents" title="Table of contents" rel="index">
                    306:   <link href="association-of-controls-and-forms.html" title="4.10.18 Association of controls and forms" rel="next">
                    307:   </head><body onload="fixBrokenLink(); init()"><div class="head" id="head">
1.9       mike      308:    <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
1.36      mike      309: 
1.159   ! mike      310:    <h1>HTML5 (Edition for Web Authors)<span class="rcsrevision"> revision 1.4234</span></h1>
1.9       mike      311:    </div><div>
1.156     mike      312:    <a href="common-input-element-attributes.html">&#8592; 4.10.7.2 Common input element attributes</a> &#8211;
                    313:    <a href="Overview.html#contents">Table of contents</a> &#8211;
                    314:    <a href="association-of-controls-and-forms.html">4.10.18 Association of controls and forms &#8594;</a>
                    315:   <ol class="toc"><li><ol><li><ol><li><a href="the-button-element.html#the-button-element" id="x4.10.8-the-button-element"><span class="secno">4.10.8 </span>The <code>button</code> element</a></li><li><a href="the-button-element.html#the-select-element" id="x4.10.9-the-select-element"><span class="secno">4.10.9 </span>The <code>select</code> element</a></li><li><a href="the-button-element.html#the-datalist-element" id="x4.10.10-the-datalist-element"><span class="secno">4.10.10 </span>The <code>datalist</code> element</a></li><li><a href="the-button-element.html#the-optgroup-element" id="x4.10.11-the-optgroup-element"><span class="secno">4.10.11 </span>The <code>optgroup</code> element</a></li><li><a href="the-button-element.html#the-option-element" id="x4.10.12-the-option-element"><span class="secno">4.10.12 </span>The <code>option</code> element</a></li><li><a href="the-button-element.html#the-textarea-element" id="x4.10.13-the-textarea-element"><span class="secno">4.10.13 </span>The <code>textarea</code> element</a></li><li><a href="the-button-element.html#the-keygen-element" id="x4.10.14-the-keygen-element"><span class="secno">4.10.14 </span>The <code>keygen</code> element</a></li><li><a href="the-button-element.html#the-output-element" id="x4.10.15-the-output-element"><span class="secno">4.10.15 </span>The <code>output</code> element</a></li><li><a href="the-button-element.html#the-progress-element" id="x4.10.16-the-progress-element"><span class="secno">4.10.16 </span>The <code>progress</code> element</a></li><li><a href="the-button-element.html#the-meter-element" id="x4.10.17-the-meter-element"><span class="secno">4.10.17 </span>The <code>meter</code> element</a></li></ol></li></ol></li></ol></div>
                    316: 
                    317:   <h4 id="the-button-element"><span class="secno">4.10.8 </span>The <dfn><code>button</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i></p><dl class="element"><dt>Categories</dt>
                    318:    <dd><a href="content-models.html#flow-content" id="flow-content-114">Flow content</a>.</dd>
                    319:    <dd><a href="content-models.html#phrasing-content" id="phrasing-content-118">Phrasing content</a>.</dd>
                    320:    <dd><a href="content-models.html#interactive-content" id="interactive-content-14">Interactive content</a>.</dd>
                    321:    <dd><a href="forms.html#category-listed" id="category-listed-4" title="category-listed">Listed</a>, <a href="forms.html#category-label" id="category-label-3" title="category-label">labelable</a>, and <a href="forms.html#category-submit" id="category-submit-3" title="category-submit">submittable</a> <a href="forms.html#form-associated-element" id="form-associated-element-8">form-associated element</a>.</dd>
1.9       mike      322:    <dt>Contexts in which this element may be used:</dt>
1.156     mike      323:    <dd>Where <a href="content-models.html#phrasing-content" id="phrasing-content-119">phrasing content</a> is expected.</dd>
1.9       mike      324:    <dt>Content model:</dt>
1.156     mike      325:    <dd><a href="content-models.html#phrasing-content" id="phrasing-content-120">Phrasing content</a>, but there must be no <a href="content-models.html#interactive-content" id="interactive-content-15">interactive content</a> descendant.</dd>
1.9       mike      326:    <dt>Content attributes:</dt>
1.156     mike      327:    <dd><a href="elements.html#global-attributes" id="global-attributes-85">Global attributes</a></dd>
                    328:    <dd><code title="attr-fe-autofocus"><a href="association-of-controls-and-forms.html#attr-fe-autofocus" id="autofocus-1">autofocus</a></code></dd>
                    329:    <dd><code title="attr-fe-disabled"><a href="association-of-controls-and-forms.html#attr-fe-disabled" id="disabled-12">disabled</a></code></dd>
                    330:    <dd><code title="attr-fae-form"><a href="association-of-controls-and-forms.html#attr-fae-form" id="form-48">form</a></code></dd>
                    331:    <dd><code title="attr-fs-formaction"><a href="association-of-controls-and-forms.html#attr-fs-formaction" id="formaction-26">formaction</a></code></dd>
                    332:    <dd><code title="attr-fs-formenctype"><a href="association-of-controls-and-forms.html#attr-fs-formenctype" id="formenctype-26">formenctype</a></code></dd>
                    333:    <dd><code title="attr-fs-formmethod"><a href="association-of-controls-and-forms.html#attr-fs-formmethod" id="formmethod-26">formmethod</a></code></dd>
                    334:    <dd><code title="attr-fs-formnovalidate"><a href="association-of-controls-and-forms.html#attr-fs-formnovalidate" id="formnovalidate-27">formnovalidate</a></code></dd>
                    335:    <dd><code title="attr-fs-formtarget"><a href="association-of-controls-and-forms.html#attr-fs-formtarget" id="formtarget-26">formtarget</a></code></dd>
                    336:    <dd><code title="attr-fe-name"><a href="association-of-controls-and-forms.html#attr-fe-name" id="name-37">name</a></code></dd>
                    337:    <dd><code title="attr-button-type"><a href="#attr-button-type" id="type-68">type</a></code></dd>
                    338:    <dd><code title="attr-button-value"><a href="#attr-button-value" id="value-29">value</a></code></dd>
1.9       mike      339:    <dt>DOM interface:</dt>
                    340:    <dd>
1.156     mike      341: <pre class="idl">interface <dfn id="htmlbuttonelement">HTMLButtonElement</dfn> : <a href="elements.html#htmlelement" id="htmlelement-93">HTMLElement</a> {
                    342:            attribute boolean <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-fe-autofocus" title='Read about this "autofocus" reference in the full HTML5 spec.' class="full-spec-link">autofocus</a>;
                    343:            attribute boolean <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-fe-disabled" title='Read about this "disabled" reference in the full HTML5 spec.' class="full-spec-link">disabled</a>;
                    344:   readonly attribute <a href="forms.html#htmlformelement" id="htmlformelement-5">HTMLFormElement</a> <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-fae-form" title='Read about this "form" reference in the full HTML5 spec.' class="full-spec-link">form</a>;
                    345:            attribute DOMString <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-fs-formaction" title='Read about this "formAction" reference in the full HTML5 spec.' class="full-spec-link">formAction</a>;
                    346:            attribute DOMString <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-fs-formenctype" title='Read about this "formEnctype" reference in the full HTML5 spec.' class="full-spec-link">formEnctype</a>;
                    347:            attribute DOMString <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-fs-formmethod" title='Read about this "formMethod" reference in the full HTML5 spec.' class="full-spec-link">formMethod</a>;
                    348:            attribute DOMString <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-fs-formnovalidate" title='Read about this "formNoValidate" reference in the full HTML5 spec.' class="full-spec-link">formNoValidate</a>;
                    349:            attribute DOMString <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-fs-formtarget" title='Read about this "formTarget" reference in the full HTML5 spec.' class="full-spec-link">formTarget</a>;
                    350:            attribute DOMString <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-fe-name" title='Read about this "name" reference in the full HTML5 spec.' class="full-spec-link">name</a>;
                    351:            attribute DOMString <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-button-type" title='Read about this "type" reference in the full HTML5 spec.' class="full-spec-link">type</a>;
                    352:            attribute DOMString <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-button-value" title='Read about this "value" reference in the full HTML5 spec.' class="full-spec-link">value</a>;
                    353: 
                    354:   readonly attribute boolean <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-cva-willvalidate" title='Read about this "willValidate" reference in the full HTML5 spec.' class="full-spec-link">willValidate</a>;
                    355:   readonly attribute <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#validitystate" class="full-spec-link" title='Read about this "ValidityState" reference in the full HTML5 spec.'>ValidityState</a> <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-cva-validity" title='Read about this "validity" reference in the full HTML5 spec.' class="full-spec-link">validity</a>;
                    356:   readonly attribute DOMString <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-cva-validationmessage" title='Read about this "validationMessage" reference in the full HTML5 spec.' class="full-spec-link">validationMessage</a>;
                    357:   boolean <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-cva-checkvalidatity" title='Read about this "checkValidity" reference in the full HTML5 spec.' class="full-spec-link">checkValidity</a>();
                    358:   void <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-cva-setcustomvalidity" title='Read about this "setCustomValidity" reference in the full HTML5 spec.' class="full-spec-link">setCustomValidity</a>(in DOMString error);
1.9       mike      359: 
1.156     mike      360:   readonly attribute <a href="http://dev.w3.org/html5/spec/infrastructure.html#nodelist" class="full-spec-link" title='Read about this "NodeList" reference in the full HTML5 spec.'>NodeList</a> <a href="http://dev.w3.org/html5/spec/forms.html#dom-lfe-labels" title='Read about this "labels" reference in the full HTML5 spec.' class="full-spec-link">labels</a>;
1.9       mike      361: };</pre>
                    362:    </dd>
1.156     mike      363:   </dl><p>The <code><a href="#the-button-element" id="button-11">button</a></code> element <a href="http://dev.w3.org/html5/spec/rendering.html#represents" class="full-spec-link" title='Read about this "represents" reference in the full HTML5 spec.'>represents</a> a
                    364:   button. </p><p>The element is a <a href="forms.html#concept-button" id="concept-button-4" title="concept-button">button</a>.</p><p>The <dfn id="attr-button-type" title="attr-button-type"><code>type</code></dfn>
1.9       mike      365:   attribute controls the behavior of the button when it is activated.
1.156     mike      366:   It is an <a href="common-microsyntaxes.html#enumerated-attribute" id="enumerated-attribute-8">enumerated attribute</a>. The following table
                    367:   lists the keywords and states for the attribute &#8212; the keywords
1.9       mike      368:   in the left column map to the states in the cell in the second
1.156     mike      369:   column on the same row as the keyword.</p><table><thead><tr><th> Keyword
                    370:      </th><th> State
                    371:      </th><th> Brief description
                    372:    </th></tr></thead><tbody><tr><td><dfn id="attr-button-type-submit" title="attr-button-type-submit"><code>submit</code></dfn>
                    373:      </td><td><a href="http://dev.w3.org/html5/spec/the-button-element.html#attr-button-type-submit-state" title='Read about this "Submit Button" reference in the full HTML5 spec.' class="full-spec-link">Submit Button</a>
                    374:      </td><td>Submits the form.
                    375:     </td></tr><tr><td><dfn id="attr-button-type-reset" title="attr-button-type-reset"><code>reset</code></dfn>
                    376:      </td><td><a href="http://dev.w3.org/html5/spec/the-button-element.html#attr-button-type-reset-state" title='Read about this "Reset Button" reference in the full HTML5 spec.' class="full-spec-link">Reset Button</a>
                    377:      </td><td>Resets the form.
                    378:     </td></tr><tr><td><dfn id="attr-button-type-button" title="attr-button-type-button"><code>button</code></dfn>
                    379:      </td><td><a href="http://dev.w3.org/html5/spec/the-button-element.html#attr-button-type-button-state" title='Read about this "Button" reference in the full HTML5 spec.' class="full-spec-link">Button</a>
                    380:      </td><td>Does nothing.
                    381:   </td></tr></tbody></table><p>The <i>missing value default</i> is the <a href="http://dev.w3.org/html5/spec/the-button-element.html#attr-button-type-submit-state" title='Read about this "Submit Button" reference in the full HTML5 spec.' class="full-spec-link">Submit Button</a>
                    382:   state.</p><p>If the <code title="attr-button-type"><a href="#attr-button-type" id="type-69">type</a></code> attribute is in
                    383:   the <a href="http://dev.w3.org/html5/spec/the-button-element.html#attr-button-type-submit-state" title='Read about this "Submit Button" reference in the full HTML5 spec.' class="full-spec-link">Submit Button</a>
                    384:   state, the element is specifically a <a href="forms.html#concept-submit-button" id="concept-submit-button-2" title="concept-submit-button">submit button</a>.</p><p>The <code title="attr-fae-form"><a href="association-of-controls-and-forms.html#attr-fae-form" id="form-49">form</a></code> attribute is used to
                    385:   explicitly associate the <code><a href="#the-button-element" id="button-12">button</a></code> element with its
                    386:   <a href="association-of-controls-and-forms.html#form-owner" id="form-owner-8">form owner</a>. The <code title="attr-fe-name"><a href="association-of-controls-and-forms.html#attr-fe-name" id="name-38">name</a></code>
                    387:   attribute represents the element's name. The <code title="attr-fe-disabled"><a href="association-of-controls-and-forms.html#attr-fe-disabled" id="disabled-13">disabled</a></code> attribute is used to make
1.9       mike      388:   the control non-interactive and to prevent its value from being
1.156     mike      389:   submitted. The <code title="attr-fe-autofocus"><a href="association-of-controls-and-forms.html#attr-fe-autofocus" id="autofocus-2">autofocus</a></code>
                    390:   attribute controls focus. The <code title="attr-fs-formaction"><a href="association-of-controls-and-forms.html#attr-fs-formaction" id="formaction-27">formaction</a></code>, <code title="attr-fs-formenctype"><a href="association-of-controls-and-forms.html#attr-fs-formenctype" id="formenctype-27">formenctype</a></code>, <code title="attr-fs-formmethod"><a href="association-of-controls-and-forms.html#attr-fs-formmethod" id="formmethod-27">formmethod</a></code>, <code title="attr-fs-formnovalidate"><a href="association-of-controls-and-forms.html#attr-fs-formnovalidate" id="formnovalidate-28">formnovalidate</a></code>, and <code title="attr-fs-formtarget"><a href="association-of-controls-and-forms.html#attr-fs-formtarget" id="formtarget-27">formtarget</a></code> attributes are
                    391:   <a href="association-of-controls-and-forms.html#attributes-for-form-submission" id="attributes-for-form-submission-3">attributes for form submission</a>.</p><p class="note">The <code title="attr-fs-formnovalidate"><a href="association-of-controls-and-forms.html#attr-fs-formnovalidate" id="formnovalidate-29">formnovalidate</a></code> attribute can
1.9       mike      392:   be used to make submit buttons that do not trigger the constraint
1.156     mike      393:   validation.</p><p>The <code title="attr-fs-formaction"><a href="association-of-controls-and-forms.html#attr-fs-formaction" id="formaction-28">formaction</a></code>, <code title="attr-fs-formenctype"><a href="association-of-controls-and-forms.html#attr-fs-formenctype" id="formenctype-28">formenctype</a></code>, <code title="attr-fs-formmethod"><a href="association-of-controls-and-forms.html#attr-fs-formmethod" id="formmethod-28">formmethod</a></code>, <code title="attr-fs-formnovalidate"><a href="association-of-controls-and-forms.html#attr-fs-formnovalidate" id="formnovalidate-30">formnovalidate</a></code>, and <code title="attr-fs-formtarget"><a href="association-of-controls-and-forms.html#attr-fs-formtarget" id="formtarget-28">formtarget</a></code> must not be specified
                    394:   if the element's <code title="attr-button-type"><a href="#attr-button-type" id="type-70">type</a></code>
                    395:   attribute is not in the <a href="http://dev.w3.org/html5/spec/the-button-element.html#attr-button-type-submit-state" title='Read about this "Submit Button" reference in the full HTML5 spec.' class="full-spec-link">Submit Button</a>
                    396:   state.</p><p>The <dfn id="attr-button-value" title="attr-button-value"><code>value</code></dfn>
1.9       mike      397:   attribute gives the element's value for the purposes of form
1.156     mike      398:   submission. The element's <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#concept-fe-value" title='Read about this "value" reference in the full HTML5 spec.' class="full-spec-link">value</a> is the value of the element's
                    399:   <code title="attr-button-value"><a href="#attr-button-value" id="value-30">value</a></code> attribute, if there is
                    400:   one, or the empty string otherwise.</p><p class="note">A button (and its value) is only included in the
1.9       mike      401:   form submission if the button itself was used to initiate the form
1.156     mike      402:   submission.</p><div class="example">
1.9       mike      403: 
                    404:    <p>The following button is labeled "Show hint" and pops up a dialog
                    405:    box when activated:</p>
                    406: 
                    407:    <pre>&lt;button type=button
                    408:         onclick="alert('This 15-20 minute piece was composed by George Gershwin.')"&gt;
                    409:  Show hint
                    410: &lt;/button&gt;</pre>
                    411: 
1.156     mike      412:   </div><h4 id="the-select-element"><span class="secno">4.10.9 </span>The <dfn><code>select</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i></p><dl class="element"><dt>Categories</dt>
                    413:    <dd><a href="content-models.html#flow-content" id="flow-content-115">Flow content</a>.</dd>
                    414:    <dd><a href="content-models.html#phrasing-content" id="phrasing-content-121">Phrasing content</a>.</dd>
                    415:    <dd><a href="content-models.html#interactive-content" id="interactive-content-16">Interactive content</a>.</dd>
                    416:    <dd><a href="forms.html#category-listed" id="category-listed-5" title="category-listed">Listed</a>, <a href="forms.html#category-label" id="category-label-4" title="category-label">labelable</a>, <a href="forms.html#category-submit" id="category-submit-4" title="category-submit">submittable</a>, and <a href="forms.html#category-reset" id="category-reset-1" title="category-reset">resettable</a> <a href="forms.html#form-associated-element" id="form-associated-element-9">form-associated element</a>.</dd>
1.9       mike      417:    <dt>Contexts in which this element may be used:</dt>
1.156     mike      418:    <dd>Where <a href="content-models.html#phrasing-content" id="phrasing-content-122">phrasing content</a> is expected.</dd>
1.9       mike      419:    <dt>Content model:</dt>
1.156     mike      420:    <dd>Zero or more <code><a href="#the-option-element" id="option-9">option</a></code> or <code><a href="#the-optgroup-element" id="optgroup-2">optgroup</a></code> elements.</dd>
1.9       mike      421:    <dt>Content attributes:</dt>
1.156     mike      422:    <dd><a href="elements.html#global-attributes" id="global-attributes-86">Global attributes</a></dd>
                    423:    <dd><code title="attr-fe-autofocus"><a href="association-of-controls-and-forms.html#attr-fe-autofocus" id="autofocus-3">autofocus</a></code></dd>
                    424:    <dd><code title="attr-fe-disabled"><a href="association-of-controls-and-forms.html#attr-fe-disabled" id="disabled-14">disabled</a></code></dd>
                    425:    <dd><code title="attr-fae-form"><a href="association-of-controls-and-forms.html#attr-fae-form" id="form-50">form</a></code></dd>
                    426:    <dd><code title="attr-select-multiple"><a href="#attr-select-multiple" id="multiple-29">multiple</a></code></dd>
                    427:    <dd><code title="attr-fe-name"><a href="association-of-controls-and-forms.html#attr-fe-name" id="name-39">name</a></code></dd>
                    428:    <dd><code title="attr-select-required"><a href="#attr-select-required" id="required-27">required</a></code></dd>
                    429:    <dd><code title="attr-select-size"><a href="#attr-select-size" id="size-30">size</a></code></dd>
1.9       mike      430:    <dt>DOM interface:</dt>
                    431:    <dd>
1.156     mike      432: <pre class="idl">interface <dfn id="htmlselectelement">HTMLSelectElement</dfn> : <a href="elements.html#htmlelement" id="htmlelement-94">HTMLElement</a> {
                    433:            attribute boolean <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-fe-autofocus" title='Read about this "autofocus" reference in the full HTML5 spec.' class="full-spec-link">autofocus</a>;
                    434:            attribute boolean <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-fe-disabled" title='Read about this "disabled" reference in the full HTML5 spec.' class="full-spec-link">disabled</a>;
                    435:   readonly attribute <a href="forms.html#htmlformelement" id="htmlformelement-6">HTMLFormElement</a> <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-fae-form" title='Read about this "form" reference in the full HTML5 spec.' class="full-spec-link">form</a>;
                    436:            attribute boolean <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-select-multiple" title='Read about this "multiple" reference in the full HTML5 spec.' class="full-spec-link">multiple</a>;
                    437:            attribute DOMString <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-fe-name" title='Read about this "name" reference in the full HTML5 spec.' class="full-spec-link">name</a>;
                    438:            attribute boolean <a href="http://dev.w3.org/html5/spec/.html#dom-select-required" title='Read about this "required" reference in the full HTML5 spec.' class="full-spec-link">required</a>;
                    439:            attribute unsigned long <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-select-size" title='Read about this "size" reference in the full HTML5 spec.' class="full-spec-link">size</a>;
                    440: 
                    441:   readonly attribute DOMString <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-select-type" title='Read about this "type" reference in the full HTML5 spec.' class="full-spec-link">type</a>;
                    442: 
                    443:   readonly attribute <a href="urls.html#htmloptionscollection" id="htmloptionscollection-3">HTMLOptionsCollection</a> <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-select-options" title='Read about this "options" reference in the full HTML5 spec.' class="full-spec-link">options</a>;
                    444:            attribute unsigned long <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-select-length" title='Read about this "length" reference in the full HTML5 spec.' class="full-spec-link">length</a>;
                    445:   caller getter any <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-select-item" title='Read about this "item" reference in the full HTML5 spec.' class="full-spec-link">item</a>(in unsigned long index);
                    446:   caller getter any <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-select-nameditem" title='Read about this "namedItem" reference in the full HTML5 spec.' class="full-spec-link">namedItem</a>(in DOMString name);
                    447:   void <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-select-add" title='Read about this "add" reference in the full HTML5 spec.' class="full-spec-link">add</a>(in <a href="elements.html#htmlelement" id="htmlelement-95">HTMLElement</a> element, in optional <a href="elements.html#htmlelement" id="htmlelement-96">HTMLElement</a> before);
                    448:   void <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-select-add" title='Read about this "add" reference in the full HTML5 spec.' class="full-spec-link">add</a>(in <a href="elements.html#htmlelement" id="htmlelement-97">HTMLElement</a> element, in long before);
                    449:   void <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-select-remove" title='Read about this "remove" reference in the full HTML5 spec.' class="full-spec-link">remove</a>(in long index);
                    450: 
                    451:   readonly attribute <a href="urls.html#htmlcollection" id="htmlcollection-35">HTMLCollection</a> <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-select-selectedoptions" title='Read about this "selectedOptions" reference in the full HTML5 spec.' class="full-spec-link">selectedOptions</a>;
                    452:            attribute long <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-select-selectedindex" title='Read about this "selectedIndex" reference in the full HTML5 spec.' class="full-spec-link">selectedIndex</a>;
                    453:            attribute DOMString <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-select-value" title='Read about this "value" reference in the full HTML5 spec.' class="full-spec-link">value</a>;
                    454: 
                    455:   readonly attribute boolean <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-cva-willvalidate" title='Read about this "willValidate" reference in the full HTML5 spec.' class="full-spec-link">willValidate</a>;
                    456:   readonly attribute <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#validitystate" class="full-spec-link" title='Read about this "ValidityState" reference in the full HTML5 spec.'>ValidityState</a> <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-cva-validity" title='Read about this "validity" reference in the full HTML5 spec.' class="full-spec-link">validity</a>;
                    457:   readonly attribute DOMString <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-cva-validationmessage" title='Read about this "validationMessage" reference in the full HTML5 spec.' class="full-spec-link">validationMessage</a>;
                    458:   boolean <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-cva-checkvalidatity" title='Read about this "checkValidity" reference in the full HTML5 spec.' class="full-spec-link">checkValidity</a>();
                    459:   void <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-cva-setcustomvalidity" title='Read about this "setCustomValidity" reference in the full HTML5 spec.' class="full-spec-link">setCustomValidity</a>(in DOMString error);
1.9       mike      460: 
1.156     mike      461:   readonly attribute <a href="http://dev.w3.org/html5/spec/infrastructure.html#nodelist" class="full-spec-link" title='Read about this "NodeList" reference in the full HTML5 spec.'>NodeList</a> <a href="http://dev.w3.org/html5/spec/forms.html#dom-lfe-labels" title='Read about this "labels" reference in the full HTML5 spec.' class="full-spec-link">labels</a>;
1.9       mike      462: };</pre>
                    463:    </dd>
                    464:   </dl><!-- Proposals for v2:
                    465:        * <select value=""> as an alternative to <option selected>
                    466:          http://developers.slashdot.org/comments.pl?sid=426306&cid=22142072
1.11      mike      467:          <Philip`> http://www.ipiao.com.cn/ does <select size="1" name="to"><script type="text/javascript">City_Default="PEK"</script><SCRIPT language=javascript
1.9       mike      468:                    src="/js/flightcity.js"></SCRIPT></select> which is the kind of thing that could be much simpler with <select value="PEK">
1.156     mike      469:     --><p>The <code><a href="#the-select-element" id="select-17">select</a></code> element represents a control for
                    470:   selecting amongst a set of options.</p><p>The <dfn id="attr-select-multiple" title="attr-select-multiple"><code>multiple</code></dfn>
                    471:   attribute is a <a href="common-microsyntaxes.html#boolean-attribute" id="boolean-attribute-13">boolean attribute</a>. If the attribute is
                    472:   present, then the <code><a href="#the-select-element" id="select-18">select</a></code> element
                    473:   <a href="http://dev.w3.org/html5/spec/rendering.html#represents" class="full-spec-link" title='Read about this "represents" reference in the full HTML5 spec.'>represents</a> a control for selecting zero or more options
                    474:   from the <a href="#concept-select-option-list" id="concept-select-option-list-1" title="concept-select-option-list">list of
1.9       mike      475:   options</a>. If the attribute is absent, then the
1.156     mike      476:   <code><a href="#the-select-element" id="select-19">select</a></code> element <a href="http://dev.w3.org/html5/spec/rendering.html#represents" class="full-spec-link" title='Read about this "represents" reference in the full HTML5 spec.'>represents</a> a control for
                    477:   selecting a single option from the <a href="#concept-select-option-list" id="concept-select-option-list-2" title="concept-select-option-list">list of options</a>.</p><p>The <dfn id="attr-select-size" title="attr-select-size"><code>size</code></dfn>
                    478:   attribute gives the number of options to show to the user. The <code title="attr-input-size"><a href="common-input-element-attributes.html#attr-input-size" id="size-26">size</a></code> attribute, if specified, must
                    479:   have a value that is a <a href="common-microsyntaxes.html#valid-non-negative-integer" id="valid-non-negative-integer-10">valid non-negative integer</a>
                    480:   greater than zero. If the <code title="attr-select-multiple"><a href="#attr-select-multiple" id="multiple-30">multiple</a></code> attribute is present,
                    481:   then the <code title="attr-input-size"><a href="common-input-element-attributes.html#attr-input-size" id="size-27">size</a></code> attribute's
                    482:   default value is 4. If the <code title="attr-select-multiple"><a href="#attr-select-multiple" id="multiple-31">multiple</a></code> attribute is absent,
                    483:   then the <code title="attr-input-size"><a href="common-input-element-attributes.html#attr-input-size" id="size-28">size</a></code> attribute's
                    484:   default value is 1.</p><p>The <dfn id="concept-select-option-list" title="concept-select-option-list">list of options</dfn>
                    485:   for a <code><a href="#the-select-element" id="select-20">select</a></code> element consists of all the
                    486:   <code><a href="#the-option-element" id="option-10">option</a></code> element children of the <code><a href="#the-select-element" id="select-21">select</a></code>
                    487:   element, and all the <code><a href="#the-option-element" id="option-11">option</a></code> element children of all the
                    488:   <code><a href="#the-optgroup-element" id="optgroup-3">optgroup</a></code> element children of the <code><a href="#the-select-element" id="select-22">select</a></code>
                    489:   element, in <a href="infrastructure.html#tree-order" id="tree-order-5">tree order</a>.</p><p>The <dfn id="attr-select-required" title="attr-select-required"><code>required</code></dfn>
                    490:   attribute is a <a href="common-microsyntaxes.html#boolean-attribute" id="boolean-attribute-14">boolean attribute</a>. When specified, the
1.138     mike      491:   user will be required to select a value before submitting the
1.156     mike      492:   form.</p><p>If a <code><a href="#the-select-element" id="select-23">select</a></code> element has a <code title="attr-select-required"><a href="#attr-select-required" id="required-28">required</a></code> attribute specified,
                    493:   does not have a <code title="attr-select-multiple"><a href="#attr-select-multiple" id="multiple-32">multiple</a></code>
                    494:   attribute specified, and has a <a href="http://dev.w3.org/html5/spec/the-button-element.html#concept-select-size" title='Read about this "display size" reference in the full HTML5 spec.' class="full-spec-link">display size</a> of 1; and if the
                    495:   <a href="#concept-option-value" id="concept-option-value-0" title="concept-option-value">value</a> of the first
                    496:   <code><a href="#the-option-element" id="option-12">option</a></code> element in the <code><a href="#the-select-element" id="select-24">select</a></code> element's
                    497:   <a href="#concept-select-option-list" id="concept-select-option-list-3" title="concept-select-option-list">list of options</a> (if
                    498:   any) is the empty string, and that <code><a href="#the-option-element" id="option-13">option</a></code> is not <a href="#concept-option-disabled" id="concept-option-disabled-0" title="concept-option-disabled">disabled</a>, and, finally, that
                    499:   <code><a href="#the-option-element" id="option-14">option</a></code> element's parent node is the <code><a href="#the-select-element" id="select-25">select</a></code>
                    500:   element (and not an <code><a href="#the-optgroup-element" id="optgroup-4">optgroup</a></code> element), then that
                    501:   <code><a href="#the-option-element" id="option-15">option</a></code> is the <code><a href="#the-select-element" id="select-26">select</a></code> element's
                    502:   <dfn id="placeholder-label-option">placeholder label option</dfn>.</p><p>The <code title="attr-fae-form"><a href="association-of-controls-and-forms.html#attr-fae-form" id="form-51">form</a></code> attribute is used to
                    503:   explicitly associate the <code><a href="#the-select-element" id="select-27">select</a></code> element with its
                    504:   <a href="association-of-controls-and-forms.html#form-owner" id="form-owner-9">form owner</a>. The <code title="attr-fe-name"><a href="association-of-controls-and-forms.html#attr-fe-name" id="name-40">name</a></code>
                    505:   attribute represents the element's name. The <code title="attr-fe-disabled"><a href="association-of-controls-and-forms.html#attr-fe-disabled" id="disabled-15">disabled</a></code> attribute is used to make
1.9       mike      506:   the control non-interactive and to prevent its value from being
1.156     mike      507:   submitted. The <code title="attr-fe-autofocus"><a href="association-of-controls-and-forms.html#attr-fe-autofocus" id="autofocus-4">autofocus</a></code>
                    508:   attribute controls focus.</p><dl class="domintro"><dt><var title="">select</var> . <code title="dom-select-type"><a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-select-type" class="full-spec-link" title='Read about this "type" reference in the full HTML5 spec.'>type</a></code></dt>
1.9       mike      509: 
                    510:    <dd>
                    511: 
                    512:     <p>Returns "<code title="">select-multiple</code>" if the element
1.156     mike      513:     has a <code title="attr-select-multiple"><a href="#attr-select-multiple" id="multiple-33">multiple</a></code>
1.9       mike      514:     attribute, and "<code title="">select-one</code>"
                    515:     otherwise.</p>
                    516: 
                    517:    </dd>
                    518: 
1.156     mike      519:    <dt><var title="">select</var> . <code title="dom-select-options"><a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-select-options" class="full-spec-link" title='Read about this "options" reference in the full HTML5 spec.'>options</a></code></dt>
1.9       mike      520: 
                    521:    <dd>
                    522: 
1.156     mike      523:     <p>Returns an <code><a href="urls.html#htmloptionscollection" id="htmloptionscollection-4">HTMLOptionsCollection</a></code> of the <a href="#concept-select-option-list" id="concept-select-option-list-4" title="concept-select-option-list">list of options</a>.</p>
1.9       mike      524: 
                    525:    </dd>
                    526: 
1.156     mike      527:    <dt><var title="">select</var> . <code title="dom-select-length"><a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-select-length" class="full-spec-link" title='Read about this "length" reference in the full HTML5 spec.'>length</a></code> [ = <var title="">value</var> ]</dt>
1.9       mike      528:    <dd>
1.156     mike      529:     <p>Returns the number of elements in the <a href="#concept-select-option-list" id="concept-select-option-list-5" title="concept-select-option-list">list of options</a>.</p>
                    530:     <p>When set to a smaller number, truncates the number of <code><a href="#the-option-element" id="option-16">option</a></code> elements in the <code><a href="#the-select-element" id="select-28">select</a></code>.</p>
                    531:     <p>When set to a greater number, adds new blank <code><a href="#the-option-element" id="option-17">option</a></code> elements to the <code><a href="#the-select-element" id="select-29">select</a></code>.</p>
1.9       mike      532:    </dd>
                    533: 
1.156     mike      534:    <dt><var title="">element</var> = <var title="">select</var> . <code title="dom-select-item"><a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-select-item" class="full-spec-link" title='Read about this "item" reference in the full HTML5 spec.'>item</a></code>(<var title="">index</var>)</dt>
1.9       mike      535:    <dt><var title="">select</var>[<var title="">index</var>]</dt>
                    536:    <dt><var title="">select</var>(<var title="">index</var>)</dt>
                    537:    <dd>
1.156     mike      538:     <p>Returns the item with index <var title="">index</var> from the <a href="#concept-select-option-list" id="concept-select-option-list-6" title="concept-select-option-list">list of options</a>. The items are sorted in <a href="infrastructure.html#tree-order" id="tree-order-6">tree order</a>.</p>
1.9       mike      539:     <p>Returns null if <var title="">index</var> is out of range.</p>
                    540:    </dd>
                    541: 
1.156     mike      542:    <dt><var title="">element</var> = <var title="">select</var> . <code title="dom-select-item"><a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-select-item" class="full-spec-link" title='Read about this "namedItem" reference in the full HTML5 spec.'>namedItem</a></code>(<var title="">name</var>)</dt>
1.9       mike      543:    <dt><var title="">select</var>[<var title="">name</var>]</dt>
                    544:    <dt><var title="">select</var>(<var title="">name</var>)</dt>
                    545:    <dd>
1.156     mike      546:     <p>Returns the item with ID or <code title="attr-option-name"><a href="obsolete.html#attr-option-name" id="name-59">name</a></code> <var title="">name</var> from the <a href="#concept-select-option-list" id="concept-select-option-list-7" title="concept-select-option-list">list of options</a>.</p>
                    547:     <p>If there are multiple matching items, then a <code><a href="http://dev.w3.org/html5/spec/infrastructure.html#nodelist" class="full-spec-link" title='Read about this "NodeList" reference in the full HTML5 spec.'>NodeList</a></code> object containing all those elements is returned.</p>
1.9       mike      548:     <p>Returns null if no element with that ID could be found.</p>
                    549:    </dd>
                    550: 
1.156     mike      551:    <dt><var title="">select</var> . <code title="dom-select-add"><a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-select-add" class="full-spec-link" title='Read about this "add" reference in the full HTML5 spec.'>add</a></code>(<var title="">element</var> [, <var title="">before</var> ])</dt>
1.9       mike      552:    <dd>
                    553:     <p>Inserts <var title="">element</var> before the node given by <var title="">before</var>.</p>
                    554:     <p>The <var title="">before</var> argument can be a number, in
                    555:     which case <var title="">element</var> is inserted before the item
1.156     mike      556:     with that number, or an element from the <a href="#concept-select-option-list" id="concept-select-option-list-8" title="concept-select-option-list">list of options</a>, in
1.9       mike      557:     which case <var title="">element</var> is inserted before that
                    558:     element.</p>
                    559:     <p>If <var title="">before</var> is omitted, null, or a number out
                    560:     of range, then <var title="">element</var> will be added at the
                    561:     end of the list.</p>
1.156     mike      562:     <p>This method will throw a <code><a href="urls.html#hierarchy_request_err" id="hierarchy_request_err-5">HIERARCHY_REQUEST_ERR</a></code>
1.9       mike      563:     exception if <var title="">element</var> is an ancestor of the
1.156     mike      564:     element into which it is to be inserted. If <var title="">element</var> is not an <code><a href="#the-option-element" id="option-18">option</a></code> or
                    565:     <code><a href="#the-optgroup-element" id="optgroup-5">optgroup</a></code> element, then the method does nothing.</p>
1.9       mike      566:    </dd>
                    567: 
1.156     mike      568:    <dt><var title="">select</var> . <code title="dom-select-selectedOptions"><a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-select-selectedoptions" class="full-spec-link" title='Read about this "selectedOptions" reference in the full HTML5 spec.'>selectedOptions</a></code></dt>
1.9       mike      569: 
                    570:    <dd>
                    571: 
1.156     mike      572:     <p>Returns an <code><a href="urls.html#htmlcollection" id="htmlcollection-36">HTMLCollection</a></code> of the <a href="#concept-select-option-list" id="concept-select-option-list-9" title="concept-select-option-list">list of options</a> that are
1.9       mike      573:     selected.</p>
                    574: 
                    575:    </dd>
                    576: 
1.156     mike      577:    <dt><var title="">select</var> . <code title="dom-select-selectedIndex"><a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-select-selectedindex" class="full-spec-link" title='Read about this "selectedIndex" reference in the full HTML5 spec.'>selectedIndex</a></code> [ = <var title="">value</var> ]</dt>
1.9       mike      578: 
                    579:    <dd>
                    580: 
                    581:     <p>Returns the index of the first selected item, if any, or
1.156     mike      582:     &#8722;1 if there is no selected item.</p>
1.9       mike      583: 
                    584:     <p>Can be set, to change the selection.</p>
                    585: 
                    586:    </dd>
                    587: 
1.156     mike      588:    <dt><var title="">select</var> . <code title="dom-select-value"><a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-select-value" class="full-spec-link" title='Read about this "value" reference in the full HTML5 spec.'>value</a></code> [ = <var title="">value</var> ]</dt>
1.9       mike      589: 
                    590:    <dd>
                    591: 
1.156     mike      592:     <p>Returns the <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#concept-fe-value" title='Read about this "value" reference in the full HTML5 spec.' class="full-spec-link">value</a> of the
1.9       mike      593:     first selected item, if any, or the empty string if there is no
                    594:     selected item.</p>
                    595: 
                    596:     <p>Can be set, to change the selection.</p>
                    597: 
                    598:    </dd>
                    599: 
                    600:   </dl><div class="example">
                    601: 
1.156     mike      602:    <p>The following example shows how a <code><a href="#the-select-element" id="select-30">select</a></code> element
1.9       mike      603:    can be used to offer the user with a set of options from which the
                    604:    user can select a single option. The default option is
                    605:    preselected.</p>
                    606: 
                    607:    <pre>&lt;p&gt;
                    608:  &lt;label for="unittype"&gt;Select unit type:&lt;/label&gt;
                    609:  &lt;select id="unittype" name="unittype"&gt;
                    610:   &lt;option value="1"&gt; Miner &lt;/option&gt;
                    611:   &lt;option value="2"&gt; Puffer &lt;/option&gt;
                    612:   &lt;option value="3" selected&gt; Snipey &lt;/option&gt;
                    613:   &lt;option value="4"&gt; Max &lt;/option&gt;
                    614:   &lt;option value="5"&gt; Firebot &lt;/option&gt;
                    615:  &lt;/select&gt;
                    616: &lt;/p&gt;</pre>
                    617: 
                    618:   </div><div class="example">
                    619: 
                    620:    <p>Here, the user is offered a set of options from which he can
                    621:    select any number. By default, all five options are selected.</p>
                    622: 
                    623:    <pre>&lt;p&gt;
                    624:  &lt;label for="allowedunits"&gt;Select unit types to enable on this map:&lt;/label&gt;
                    625:  &lt;select id="allowedunits" name="allowedunits" multiple&gt;
                    626:   &lt;option value="1" selected&gt; Miner &lt;/option&gt;
                    627:   &lt;option value="2" selected&gt; Puffer &lt;/option&gt;
                    628:   &lt;option value="3" selected&gt; Snipey &lt;/option&gt;
                    629:   &lt;option value="4" selected&gt; Max &lt;/option&gt;
                    630:   &lt;option value="5" selected&gt; Firebot &lt;/option&gt;
                    631:  &lt;/select&gt;
                    632: &lt;/p&gt;</pre>
                    633: 
1.156     mike      634:   </div><h4 id="the-datalist-element"><span class="secno">4.10.10 </span>The <dfn><code>datalist</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i></p><dl class="element"><dt>Categories</dt>
                    635:    <dd><a href="content-models.html#flow-content" id="flow-content-116">Flow content</a>.</dd>
                    636:    <dd><a href="content-models.html#phrasing-content" id="phrasing-content-123">Phrasing content</a>.</dd>
1.9       mike      637:    <dt>Contexts in which this element may be used:</dt>
1.156     mike      638:    <dd>Where <a href="content-models.html#phrasing-content" id="phrasing-content-124">phrasing content</a> is expected.</dd>
1.9       mike      639:    <dt>Content model:</dt>
1.156     mike      640:    <dd>Either: <a href="content-models.html#phrasing-content" id="phrasing-content-125">phrasing content</a>.</dd>
                    641:    <dd>Or: Zero or more <code><a href="#the-option-element" id="option-19">option</a></code> elements.</dd>
1.9       mike      642:    <dt>Content attributes:</dt>
1.156     mike      643:    <dd><a href="elements.html#global-attributes" id="global-attributes-87">Global attributes</a></dd>
1.9       mike      644:    <dt>DOM interface:</dt>
                    645:    <dd>
1.156     mike      646: <pre class="idl">interface <dfn id="htmldatalistelement">HTMLDataListElement</dfn> : <a href="elements.html#htmlelement" id="htmlelement-98">HTMLElement</a> {
                    647:   readonly attribute <a href="urls.html#htmlcollection" id="htmlcollection-37">HTMLCollection</a> <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-datalist-options" title='Read about this "options" reference in the full HTML5 spec.' class="full-spec-link">options</a>;
1.9       mike      648: };</pre>
                    649:    </dd>
1.156     mike      650:   </dl><p>The <code><a href="#the-datalist-element" id="datalist-13">datalist</a></code> element represents a set of
                    651:   <code><a href="#the-option-element" id="option-20">option</a></code> elements that represent predefined options for
1.9       mike      652:   other controls. The contents of the element represents fallback
1.156     mike      653:   content for legacy user agents, intermixed with <code><a href="#the-option-element" id="option-21">option</a></code>
1.9       mike      654:   elements that represent the predefined options. In the rendering,
1.156     mike      655:   the <code><a href="#the-datalist-element" id="datalist-14">datalist</a></code> element <a href="http://dev.w3.org/html5/spec/rendering.html#represents" class="full-spec-link" title='Read about this "represents" reference in the full HTML5 spec.'>represents</a>
                    656:   nothing.</p><p>The <code><a href="#the-datalist-element" id="datalist-15">datalist</a></code> element is hooked up to an
                    657:   <code><a href="the-input-element.html#the-input-element" id="input-114">input</a></code> element using the <code title="attr-input-list"><a href="common-input-element-attributes.html#attr-input-list" id="list-29">list</a></code> attribute on the
                    658:   <code><a href="the-input-element.html#the-input-element" id="input-115">input</a></code> element. <!-- v2DATAGRID The
1.9       mike      659:   <code>datalist</code> element can also be used with a
                    660:   <code>datagrid</code> element, as the source of autocompletion hints
                    661:   for <code title="datagrid-type-editable">editable</code>
1.156     mike      662:   cells. --></p><p>Each <code><a href="#the-option-element" id="option-22">option</a></code> element that is a descendant of the
                    663:   <code><a href="#the-datalist-element" id="datalist-16">datalist</a></code> element, that is not <a href="#concept-option-disabled" id="concept-option-disabled-1" title="concept-option-disabled">disabled</a>, and whose <a href="#concept-option-value" id="concept-option-value-1" title="concept-option-value">value</a> is a string that isn't the
                    664:   empty string, represents a suggestion. Each suggestion has a <a href="#concept-option-value" id="concept-option-value-2" title="concept-option-value">value</a> and a <a href="#concept-option-label" id="concept-option-label-0" title="concept-option-label">label</a>.
1.9       mike      665: 
1.156     mike      666:   </p><dl class="domintro"><dt><var title="">datalist</var> . <code title="dom-datalist-options"><a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-datalist-options" class="full-spec-link" title='Read about this "options" reference in the full HTML5 spec.'>options</a></code></dt>
1.9       mike      667: 
                    668:    <dd>
1.156     mike      669:     <p>Returns an <code><a href="urls.html#htmlcollection" id="htmlcollection-38">HTMLCollection</a></code> of the <code>options</code> elements of the table.</p>
1.9       mike      670:    </dd>
                    671: 
1.156     mike      672:   </dl><h4 id="the-optgroup-element"><span class="secno">4.10.11 </span>The <dfn><code>optgroup</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i></p><dl class="element"><dt>Categories</dt>
1.9       mike      673:    <dd>None.</dd>
                    674:    <dt>Contexts in which this element may be used:</dt>
1.156     mike      675:    <dd>As a child of a <code><a href="#the-select-element" id="select-31">select</a></code> element.</dd>
1.9       mike      676:    <dt>Content model:</dt>
1.156     mike      677:    <dd>Zero or more <code><a href="#the-option-element" id="option-23">option</a></code> elements.</dd>
1.9       mike      678:    <dt>Content attributes:</dt>
1.156     mike      679:    <dd><a href="elements.html#global-attributes" id="global-attributes-88">Global attributes</a></dd>
                    680:    <dd><code title="attr-optgroup-disabled"><a href="#attr-optgroup-disabled" id="disabled-3">disabled</a></code></dd>
                    681:    <dd><code title="attr-optgroup-label"><a href="#attr-optgroup-label" id="label-25">label</a></code></dd>
1.9       mike      682:    <dt>DOM interface:</dt>
                    683:    <dd>
1.156     mike      684: <pre class="idl">interface <dfn id="htmloptgroupelement">HTMLOptGroupElement</dfn> : <a href="elements.html#htmlelement" id="htmlelement-99">HTMLElement</a> {
                    685:            attribute boolean <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-optgroup-disabled" title='Read about this "disabled" reference in the full HTML5 spec.' class="full-spec-link">disabled</a>;
                    686:            attribute DOMString <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-optgroup-label" title='Read about this "label" reference in the full HTML5 spec.' class="full-spec-link">label</a>;
1.9       mike      687: };</pre>
                    688:    </dd>
1.156     mike      689:   </dl><!-- v2: make optgroups selectable if they have a value. --><p>The <code><a href="#the-optgroup-element" id="optgroup-6">optgroup</a></code> element <a href="http://dev.w3.org/html5/spec/rendering.html#represents" class="full-spec-link" title='Read about this "represents" reference in the full HTML5 spec.'>represents</a> a group of
                    690:   <code><a href="#the-option-element" id="option-24">option</a></code> elements with a common label.</p><p>The element's group of <code><a href="#the-option-element" id="option-25">option</a></code> elements consists of
                    691:   the <code><a href="#the-option-element" id="option-26">option</a></code> elements that are children of the
                    692:   <code><a href="#the-optgroup-element" id="optgroup-7">optgroup</a></code> element.</p><p>The <dfn id="attr-optgroup-disabled" title="attr-optgroup-disabled"><code>disabled</code></dfn> attribute
                    693:   is a <a href="common-microsyntaxes.html#boolean-attribute" id="boolean-attribute-15">boolean attribute</a> and can be used to <a href="#concept-option-disabled" id="concept-option-disabled-2" title="concept-option-disabled">disable</a> a group of
                    694:   <code><a href="#the-option-element" id="option-27">option</a></code> elements together.</p><p>The <dfn id="attr-optgroup-label" title="attr-optgroup-label"><code>label</code></dfn>
1.9       mike      695:   attribute must be specified. Its value gives the name of the group,
1.156     mike      696:   for the purposes of the user interface. </p><div class="example">
1.9       mike      697: 
                    698:    <p>The following snippet shows how a set of lessons from three
1.156     mike      699:    courses could be offered in a <code><a href="#the-select-element" id="select-32">select</a></code> drop-down
1.9       mike      700:    widget:</p>
                    701: 
                    702:    <pre>&lt;form action="courseselector.dll" method="get"&gt;
                    703:  &lt;p&gt;Which course would you like to watch today?
                    704:  &lt;p&gt;&lt;label&gt;Course:
                    705:   &lt;select name="c"&gt;
                    706:    &lt;optgroup label="8.01 Physics I: Classical Mechanics"&gt;
                    707:     &lt;option value="8.01.1"&gt;Lecture 01: Powers of Ten
                    708:     &lt;option value="8.01.2"&gt;Lecture 02: 1D Kinematics
                    709:     &lt;option value="8.01.3"&gt;Lecture 03: Vectors
                    710:    &lt;optgroup label="8.02 Electricity and Magnestism"&gt;
                    711:     &lt;option value="8.02.1"&gt;Lecture 01: What holds our world together?
                    712:     &lt;option value="8.02.2"&gt;Lecture 02: Electric Field
                    713:     &lt;option value="8.02.3"&gt;Lecture 03: Electric Flux
                    714:    &lt;optgroup label="8.03 Physics III: Vibrations and Waves"&gt;
                    715:     &lt;option value="8.03.1"&gt;Lecture 01: Periodic Phenomenon
                    716:     &lt;option value="8.03.2"&gt;Lecture 02: Beats
                    717:     &lt;option value="8.03.3"&gt;Lecture 03: Forced Oscillations with Damping
                    718:   &lt;/select&gt;
                    719:  &lt;/label&gt;
1.55      mike      720:  &lt;p&gt;&lt;input type=submit value="&#9654; Play"&gt;
1.9       mike      721: &lt;/form&gt;</pre>
                    722: 
1.156     mike      723:   </div><h4 id="the-option-element"><span class="secno">4.10.12 </span>The <dfn><code>option</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i></p><dl class="element"><dt>Categories</dt>
1.9       mike      724:    <dd>None.</dd>
                    725:    <dt>Contexts in which this element may be used:</dt>
1.156     mike      726:    <dd>As a child of a <code><a href="#the-select-element" id="select-33">select</a></code> element.</dd>
                    727:    <dd>As a child of a <code><a href="#the-datalist-element" id="datalist-17">datalist</a></code> element.</dd>
                    728:    <dd>As a child of an <code><a href="#the-optgroup-element" id="optgroup-8">optgroup</a></code> element.</dd>
1.9       mike      729:    <dt>Content model:</dt>
1.156     mike      730:    <dd><a href="content-models.html#text-content" id="text-content-4" title="text content">Text</a>.</dd>
1.9       mike      731:    <dt>Content attributes:</dt>
1.156     mike      732:    <dd><a href="elements.html#global-attributes" id="global-attributes-89">Global attributes</a></dd>
                    733:    <dd><code title="attr-option-disabled"><a href="#attr-option-disabled" id="disabled-6">disabled</a></code></dd>
                    734:    <dd><code title="attr-option-label"><a href="#attr-option-label" id="label-27">label</a></code></dd>
                    735:    <dd><code title="attr-option-selected"><a href="#attr-option-selected" id="selected-0">selected</a></code></dd>
                    736:    <dd><code title="attr-option-value"><a href="#attr-option-value" id="value-33">value</a></code></dd>
1.9       mike      737:    <dt>DOM interface:</dt>
                    738:    <dd>
1.156     mike      739: <pre class="idl">[NamedConstructor=<a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-option" title='Read about this "Option" reference in the full HTML5 spec.' class="full-spec-link">Option</a>(),
                    740:  NamedConstructor=<a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-option-t" title='Read about this "Option" reference in the full HTML5 spec.' class="full-spec-link">Option</a>(in DOMString text),
                    741:  NamedConstructor=<a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-option-tv" title='Read about this "Option" reference in the full HTML5 spec.' class="full-spec-link">Option</a>(in DOMString text, in DOMString value),
                    742:  NamedConstructor=<a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-option-tvd" title='Read about this "Option" reference in the full HTML5 spec.' class="full-spec-link">Option</a>(in DOMString text, in DOMString value, in boolean defaultSelected),
                    743:  NamedConstructor=<a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-option-tvds" title='Read about this "Option" reference in the full HTML5 spec.' class="full-spec-link">Option</a>(in DOMString text, in DOMString value, in boolean defaultSelected, in boolean selected)]
                    744: interface <dfn id="htmloptionelement">HTMLOptionElement</dfn> : <a href="elements.html#htmlelement" id="htmlelement-100">HTMLElement</a> {
                    745:            attribute boolean <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-option-disabled" title='Read about this "disabled" reference in the full HTML5 spec.' class="full-spec-link">disabled</a>;
                    746:   readonly attribute <a href="forms.html#htmlformelement" id="htmlformelement-7">HTMLFormElement</a> <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-option-form" title='Read about this "form" reference in the full HTML5 spec.' class="full-spec-link">form</a>;
                    747:            attribute DOMString <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-option-label" title='Read about this "label" reference in the full HTML5 spec.' class="full-spec-link">label</a>;
                    748:            attribute boolean <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-option-defaultselected" title='Read about this "defaultSelected" reference in the full HTML5 spec.' class="full-spec-link">defaultSelected</a>;
                    749:            attribute boolean <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-option-selected" title='Read about this "selected" reference in the full HTML5 spec.' class="full-spec-link">selected</a>;
                    750:            attribute DOMString <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-option-value" title='Read about this "value" reference in the full HTML5 spec.' class="full-spec-link">value</a>;
1.9       mike      751: 
1.156     mike      752:            attribute DOMString <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-option-text" title='Read about this "text" reference in the full HTML5 spec.' class="full-spec-link">text</a>;
                    753:   readonly attribute long <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-option-index" title='Read about this "index" reference in the full HTML5 spec.' class="full-spec-link">index</a>;
1.9       mike      754: };</pre>
                    755:    </dd>
1.156     mike      756:   </dl><p>The <code><a href="#the-option-element" id="option-28">option</a></code> element <a href="http://dev.w3.org/html5/spec/rendering.html#represents" class="full-spec-link" title='Read about this "represents" reference in the full HTML5 spec.'>represents</a> an option
                    757:   in a <code><a href="#the-select-element" id="select-34">select</a></code> element or as part of a list of suggestions
                    758:   in a <code><a href="#the-datalist-element" id="datalist-18">datalist</a></code> element.</p><p>In certain circumstances described in the definition of the
                    759:   <code><a href="#the-select-element" id="select-35">select</a></code> element, an <code><a href="#the-option-element" id="option-29">option</a></code> element can be a
                    760:   <code><a href="#the-select-element" id="select-36">select</a></code> element's <a href="#placeholder-label-option" id="placeholder-label-option-0">placeholder label option</a>.
                    761:   A <a href="#placeholder-label-option" id="placeholder-label-option-1">placeholder label option</a> does not represent an actual
                    762:   option, but instead represents a label for the <code><a href="#the-select-element" id="select-37">select</a></code>
                    763:   control.</p><p>The <dfn id="attr-option-disabled" title="attr-option-disabled"><code>disabled</code></dfn>
                    764:   attribute is a <a href="common-microsyntaxes.html#boolean-attribute" id="boolean-attribute-16">boolean attribute</a>. An
                    765:   <code><a href="#the-option-element" id="option-30">option</a></code> element is <dfn id="concept-option-disabled" title="concept-option-disabled">disabled</dfn> if its <code title="attr-option-disabled"><a href="#attr-option-disabled" id="disabled-7">disabled</a></code> attribute is present or
                    766:   if it is a child of an <code><a href="#the-optgroup-element" id="optgroup-9">optgroup</a></code> element whose <code title="attr-optgroup-disabled"><a href="#attr-optgroup-disabled" id="disabled-4">disabled</a></code> attribute is
                    767:   present.</p><p>The <dfn id="attr-option-label" title="attr-option-label"><code>label</code></dfn>
                    768:   attribute provides a label for element. The <dfn id="concept-option-label" title="concept-option-label">label</dfn> of an <code><a href="#the-option-element" id="option-31">option</a></code>
                    769:   element is the value of the <code title="attr-option-label"><a href="#attr-option-label" id="label-28">label</a></code> attribute, if there is one,
                    770:   or the <code><a href="http://dev.w3.org/html5/spec/infrastructure.html#textcontent" class="full-spec-link" title='Read about this "textContent" reference in the full HTML5 spec.'>textContent</a></code> of the element, if there isn't.</p><p>The <dfn id="attr-option-value" title="attr-option-value"><code>value</code></dfn>
                    771:   attribute provides a value for element. The <dfn id="concept-option-value" title="concept-option-value">value</dfn> of an <code><a href="#the-option-element" id="option-32">option</a></code>
                    772:   element is the value of the <code title="attr-option-value"><a href="#attr-option-value" id="value-34">value</a></code> attribute, if there is one,
                    773:   or the <code><a href="http://dev.w3.org/html5/spec/infrastructure.html#textcontent" class="full-spec-link" title='Read about this "textContent" reference in the full HTML5 spec.'>textContent</a></code> of the element, if there isn't.</p><p>The <dfn id="attr-option-selected" title="attr-option-selected"><code>selected</code></dfn>
                    774:   attribute represents the default <a href="http://dev.w3.org/html5/spec/the-button-element.html#concept-option-selectedness" title='Read about this "selectedness" reference in the full HTML5 spec.' class="full-spec-link">selectedness</a> of the
                    775:   element.</p><p>A <code><a href="#the-select-element" id="select-38">select</a></code> element whose <code title="attr-select-multiple"><a href="#attr-select-multiple" id="multiple-34">multiple</a></code> attribute is not
                    776:   specified must not have more than one descendant <code><a href="#the-option-element" id="option-33">option</a></code>
                    777:   element with its <code title="attr-option-selected"><a href="#attr-option-selected" id="selected-1">selected</a></code>
                    778:   attribute set.</p><dl class="domintro"><dt><var title="">option</var> . <code title="dom-option-selected"><a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-option-selected" class="full-spec-link" title='Read about this "selected" reference in the full HTML5 spec.'>selected</a></code></dt>
1.9       mike      779: 
                    780:    <dd>
                    781: 
                    782:     <p>Returns true if the element is selected, and false otherwise.</p>
                    783: 
                    784:    </dd>
                    785: 
1.156     mike      786:    <dt><var title="">option</var> . <code title="dom-option-index"><a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-option-index" class="full-spec-link" title='Read about this "index" reference in the full HTML5 spec.'>index</a></code></dt>
1.9       mike      787: 
                    788:    <dd>
                    789: 
1.156     mike      790:     <p>Returns the index of the element in its <code><a href="#the-select-element" id="select-39">select</a></code>
                    791:     element's <code title="dom-select-options"><a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-select-options" class="full-spec-link" title='Read about this "options" reference in the full HTML5 spec.'>options</a></code>
1.9       mike      792:     list.</p>
                    793: 
                    794:    </dd>
                    795: 
1.156     mike      796:    <dt><var title="">option</var> . <code title="dom-option-form"><a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-option-form" class="full-spec-link" title='Read about this "form" reference in the full HTML5 spec.'>form</a></code></dt>
1.9       mike      797: 
                    798:    <dd>
                    799: 
1.156     mike      800:     <p>Returns the element's <code><a href="forms.html#the-form-element" id="form-22">form</a></code> element, if any, or
1.9       mike      801:     null otherwise.</p>
                    802: 
                    803:    </dd>
                    804: 
1.156     mike      805:    <dt><var title="">option</var> . <code title="dom-option-text"><a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-option-text" class="full-spec-link" title='Read about this "text" reference in the full HTML5 spec.'>text</a></code></dt>
1.11      mike      806: 
                    807:    <dd>
                    808: 
1.156     mike      809:     <p>Same as <code><a href="http://dev.w3.org/html5/spec/infrastructure.html#textcontent" class="full-spec-link" title='Read about this "textContent" reference in the full HTML5 spec.'>textContent</a></code>.</p>
1.11      mike      810: 
                    811:    </dd>
                    812: 
1.156     mike      813:    <dt><var title="">option</var> = new <code title="dom-option"><a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-option" class="full-spec-link" title='Read about this "Option" reference in the full HTML5 spec.'>Option</a></code>( [ <var title="">text</var> [, <var title="">value</var> [, <var title="">defaultSelected</var> [, <var title="">selected</var> ] ] ] ] )</dt>
1.9       mike      814: 
                    815:    <dd>
                    816: 
1.156     mike      817:     <p>Returns a new <code><a href="#the-option-element" id="option-34">option</a></code> element.</p>
1.9       mike      818: 
                    819:     <p>The <var title="">text</var> argument sets the contents of the element.</p>
1.156     mike      820:     <p>The <var title="">value</var> argument sets the <code title="attr-option-value"><a href="#attr-option-value" id="value-35">value</a></code> attribute.</p>
                    821:     <p>The <var title="">defaultSelected</var> argument sets the <code title="attr-option-selected"><a href="#attr-option-selected" id="selected-2">selected</a></code> attribute.</p>
1.9       mike      822:     <p>The <var title="">selected</var> argument sets whether or not the element is selected. If it is omitted, even if the <var title="">defaultSelected</var> argument is true, the element is not selected.</p>
                    823: 
                    824:    </dd>
                    825: 
1.156     mike      826:   </dl><h4 id="the-textarea-element"><span class="secno">4.10.13 </span>The <dfn><code>textarea</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i></p><dl class="element"><dt>Categories</dt>
                    827:    <dd><a href="content-models.html#flow-content" id="flow-content-117">Flow content</a>.</dd>
                    828:    <dd><a href="content-models.html#phrasing-content" id="phrasing-content-126">Phrasing content</a>.</dd>
                    829:    <dd><a href="content-models.html#interactive-content" id="interactive-content-17">Interactive content</a>.</dd>
                    830:    <dd><a href="forms.html#category-listed" id="category-listed-6" title="category-listed">Listed</a>, <a href="forms.html#category-label" id="category-label-5" title="category-label">labelable</a>, <a href="forms.html#category-submit" id="category-submit-5" title="category-submit">submittable</a>, and <a href="forms.html#category-reset" id="category-reset-2" title="category-reset">resettable</a> <a href="forms.html#form-associated-element" id="form-associated-element-10">form-associated element</a>.</dd>
1.9       mike      831:    <dt>Contexts in which this element may be used:</dt>
1.156     mike      832:    <dd>Where <a href="content-models.html#phrasing-content" id="phrasing-content-127">phrasing content</a> is expected.</dd>
1.9       mike      833:    <dt>Content model:</dt>
1.156     mike      834:    <dd><a href="content-models.html#text-content" id="text-content-5" title="text content">Text</a>.</dd>
1.9       mike      835:    <dt>Content attributes:</dt>
1.156     mike      836:    <dd><a href="elements.html#global-attributes" id="global-attributes-90">Global attributes</a></dd>
                    837:    <dd><code title="attr-fe-autofocus"><a href="association-of-controls-and-forms.html#attr-fe-autofocus" id="autofocus-5">autofocus</a></code></dd>
                    838:    <dd><code title="attr-textarea-cols"><a href="#attr-textarea-cols" id="cols">cols</a></code></dd>
                    839:    <dd><code title="attr-fe-disabled"><a href="association-of-controls-and-forms.html#attr-fe-disabled" id="disabled-16">disabled</a></code></dd>
                    840:    <dd><code title="attr-fae-form"><a href="association-of-controls-and-forms.html#attr-fae-form" id="form-52">form</a></code></dd>
                    841:    <dd><code title="attr-textarea-maxlength"><a href="#attr-textarea-maxlength" id="maxlength-27">maxlength</a></code></dd>
                    842:    <dd><code title="attr-fe-name"><a href="association-of-controls-and-forms.html#attr-fe-name" id="name-41">name</a></code></dd>
                    843:    <dd><code title="attr-textarea-placeholder"><a href="#attr-textarea-placeholder" id="placeholder-28">placeholder</a></code></dd>
                    844:    <dd><code title="attr-textarea-readonly"><a href="#attr-textarea-readonly" id="readonly-41">readonly</a></code></dd>
                    845:    <dd><code title="attr-textarea-required"><a href="#attr-textarea-required" id="required-30">required</a></code></dd>
                    846:    <dd><code title="attr-textarea-rows"><a href="#attr-textarea-rows" id="rows">rows</a></code></dd>
                    847:    <dd><code title="attr-textarea-wrap"><a href="#attr-textarea-wrap" id="wrap">wrap</a></code></dd>
1.9       mike      848:    <dt>DOM interface:</dt>
                    849:    <dd>
1.156     mike      850: <pre class="idl">interface <dfn id="htmltextareaelement">HTMLTextAreaElement</dfn> : <a href="elements.html#htmlelement" id="htmlelement-101">HTMLElement</a> {
                    851:            attribute boolean <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-fe-autofocus" title='Read about this "autofocus" reference in the full HTML5 spec.' class="full-spec-link">autofocus</a>;
                    852:            attribute unsigned long <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-textarea-cols" title='Read about this "cols" reference in the full HTML5 spec.' class="full-spec-link">cols</a>;
                    853:            attribute boolean <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-fe-disabled" title='Read about this "disabled" reference in the full HTML5 spec.' class="full-spec-link">disabled</a>;
                    854:   readonly attribute <a href="forms.html#htmlformelement" id="htmlformelement-8">HTMLFormElement</a> <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-fae-form" title='Read about this "form" reference in the full HTML5 spec.' class="full-spec-link">form</a>;
                    855:            attribute long <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-textarea-maxlength" title='Read about this "maxLength" reference in the full HTML5 spec.' class="full-spec-link">maxLength</a>;
                    856:            attribute DOMString <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-fe-name" title='Read about this "name" reference in the full HTML5 spec.' class="full-spec-link">name</a>;
                    857:            attribute DOMString <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-textarea-placeholder" title='Read about this "placeholder" reference in the full HTML5 spec.' class="full-spec-link">placeholder</a>;
                    858:            attribute boolean <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-textarea-readonly" title='Read about this "readOnly" reference in the full HTML5 spec.' class="full-spec-link">readOnly</a>;
                    859:            attribute boolean <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-textarea-required" title='Read about this "required" reference in the full HTML5 spec.' class="full-spec-link">required</a>;
                    860:            attribute unsigned long <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-textarea-rows" title='Read about this "rows" reference in the full HTML5 spec.' class="full-spec-link">rows</a>;
                    861:            attribute DOMString <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-textarea-wrap" title='Read about this "wrap" reference in the full HTML5 spec.' class="full-spec-link">wrap</a>;
                    862: 
                    863:   readonly attribute DOMString <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-textarea-type" title='Read about this "type" reference in the full HTML5 spec.' class="full-spec-link">type</a>;
                    864:            attribute DOMString <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-textarea-defaultvalue" title='Read about this "defaultValue" reference in the full HTML5 spec.' class="full-spec-link">defaultValue</a>;
                    865:            attribute DOMString <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-textarea-value" title='Read about this "value" reference in the full HTML5 spec.' class="full-spec-link">value</a>;
                    866:   readonly attribute unsigned long <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-textarea-textlength" title='Read about this "textLength" reference in the full HTML5 spec.' class="full-spec-link">textLength</a>;
                    867: 
                    868:   readonly attribute boolean <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-cva-willvalidate" title='Read about this "willValidate" reference in the full HTML5 spec.' class="full-spec-link">willValidate</a>;
                    869:   readonly attribute <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#validitystate" class="full-spec-link" title='Read about this "ValidityState" reference in the full HTML5 spec.'>ValidityState</a> <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-cva-validity" title='Read about this "validity" reference in the full HTML5 spec.' class="full-spec-link">validity</a>;
                    870:   readonly attribute DOMString <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-cva-validationmessage" title='Read about this "validationMessage" reference in the full HTML5 spec.' class="full-spec-link">validationMessage</a>;
                    871:   boolean <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-cva-checkvalidatity" title='Read about this "checkValidity" reference in the full HTML5 spec.' class="full-spec-link">checkValidity</a>();
                    872:   void <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-cva-setcustomvalidity" title='Read about this "setCustomValidity" reference in the full HTML5 spec.' class="full-spec-link">setCustomValidity</a>(in DOMString error);
                    873: 
                    874:   readonly attribute <a href="http://dev.w3.org/html5/spec/infrastructure.html#nodelist" class="full-spec-link" title='Read about this "NodeList" reference in the full HTML5 spec.'>NodeList</a> <a href="http://dev.w3.org/html5/spec/forms.html#dom-lfe-labels" title='Read about this "labels" reference in the full HTML5 spec.' class="full-spec-link">labels</a>;
                    875: 
                    876:   void <a href="http://dev.w3.org/html5/spec/editing.html#dom-textarea-input-select" title='Read about this "select" reference in the full HTML5 spec.' class="full-spec-link">select</a>();
                    877:            attribute unsigned long <a href="http://dev.w3.org/html5/spec/editing.html#dom-textarea-input-selectionstart" title='Read about this "selectionStart" reference in the full HTML5 spec.' class="full-spec-link">selectionStart</a>;
                    878:            attribute unsigned long <a href="http://dev.w3.org/html5/spec/editing.html#dom-textarea-input-selectionend" title='Read about this "selectionEnd" reference in the full HTML5 spec.' class="full-spec-link">selectionEnd</a>;
                    879:   void <a href="http://dev.w3.org/html5/spec/editing.html#dom-textarea-input-setselectionrange" title='Read about this "setSelectionRange" reference in the full HTML5 spec.' class="full-spec-link">setSelectionRange</a>(in unsigned long start, in unsigned long end);
1.9       mike      880: };</pre>
                    881:    </dd>
1.156     mike      882:   </dl><p>The <code><a href="#the-textarea-element" id="textarea-21">textarea</a></code> element <a href="http://dev.w3.org/html5/spec/rendering.html#represents" class="full-spec-link" title='Read about this "represents" reference in the full HTML5 spec.'>represents</a> a
1.9       mike      883:   multiline plain text edit control. The contents of the control represent the
1.156     mike      884:   control's default value.</p><p>The <dfn id="attr-textarea-readonly" title="attr-textarea-readonly"><code>readonly</code></dfn> attribute
                    885:   is a <a href="common-microsyntaxes.html#boolean-attribute" id="boolean-attribute-17">boolean attribute</a> used to control whether the text
                    886:   can be edited by the user or not.</p><p>The <dfn id="attr-textarea-cols" title="attr-textarea-cols"><code>cols</code></dfn>
1.9       mike      887:   attribute specifies the expected maximum number of characters per
1.156     mike      888:   line. If the <code title="attr-textarea-cols"><a href="#attr-textarea-cols" id="cols-0">cols</a></code> attribute
                    889:   is specified, its value must be a <a href="common-microsyntaxes.html#valid-non-negative-integer" id="valid-non-negative-integer-11">valid non-negative
                    890:   integer</a> greater than zero. </p><p>The <dfn id="attr-textarea-rows" title="attr-textarea-rows"><code>rows</code></dfn>
                    891:   attribute specifies the number of lines to show. If the <code title="attr-textarea-rows"><a href="#attr-textarea-rows" id="rows-0">rows</a></code> attribute is specified, its
                    892:   value must be a <a href="common-microsyntaxes.html#valid-non-negative-integer" id="valid-non-negative-integer-12">valid non-negative integer</a> greater than
                    893:   zero. </p><p>The <dfn id="attr-textarea-wrap" title="attr-textarea-wrap"><code>wrap</code></dfn>
                    894:   attribute is an <a href="common-microsyntaxes.html#enumerated-attribute" id="enumerated-attribute-9">enumerated attribute</a> with two keywords
1.9       mike      895:   and states: the <dfn id="attr-textarea-wrap-soft" title="attr-textarea-wrap-soft"><code>soft</code></dfn> keyword
                    896:   which maps to the <dfn id="attr-textarea-wrap-soft-state" title="attr-textarea-wrap-soft-state">Soft</dfn> state, and the
                    897:   <dfn id="attr-textarea-wrap-hard" title="attr-textarea-wrap-hard"><code>hard</code></dfn> keyword
                    898:   which maps to the <dfn id="attr-textarea-wrap-hard-state" title="attr-textarea-wrap-hard-state">Hard</dfn> state. The
1.156     mike      899:   <i>missing value default</i> is the <a href="#attr-textarea-wrap-soft-state" id="attr-textarea-wrap-soft-state-0" title="attr-textarea-wrap-soft-state">Soft</a> state.</p><p>If the element's <code title="attr-textarea-wrap"><a href="#attr-textarea-wrap" id="wrap-0">wrap</a></code>
                    900:   attribute is in the <a href="#attr-textarea-wrap-hard-state" id="attr-textarea-wrap-hard-state-0" title="attr-textarea-wrap-hard-state">Hard</a> state, the <code title="attr-textarea-cols"><a href="#attr-textarea-cols" id="cols-1">cols</a></code> attribute must be
1.9       mike      901:   specified.</p><!-- attr-textarea-wrap-off (attr-textarea-wrap-off-state): not
                    902:   conforming; turns off the rendering of wrapping but otherwise acts
                    903:   like 'soft' --><p>The <dfn id="attr-textarea-maxlength" title="attr-textarea-maxlength"><code>maxlength</code></dfn>
1.156     mike      904:   attribute is a <a href="association-of-controls-and-forms.html#attr-fe-maxlength" id="attr-fe-maxlength-1" title="attr-fe-maxlength">form control <code title="">maxlength</code> attribute</a> controlled by the
                    905:   <code><a href="#the-textarea-element" id="textarea-22">textarea</a></code> element's <a href="http://dev.w3.org/html5/spec/the-button-element.html#concept-textarea-dirty" title='Read about this "dirty value flag" reference in the full HTML5 spec.' class="full-spec-link">dirty value flag</a>.</p><p>If the <code><a href="#the-textarea-element" id="textarea-23">textarea</a></code> element has a <a href="association-of-controls-and-forms.html#maximum-allowed-value-length" id="maximum-allowed-value-length-2">maximum allowed
1.9       mike      906:   value length</a>, then the element's children must be such that
1.156     mike      907:   the <a href="http://dev.w3.org/html5/spec/common-microsyntaxes.html#code-point-length" class="full-spec-link" title='Read about this "code-point length" reference in the full HTML5 spec.'>code-point length</a> of the value of the element's
                    908:   <code><a href="http://dev.w3.org/html5/spec/infrastructure.html#textcontent" class="full-spec-link" title='Read about this "textContent" reference in the full HTML5 spec.'>textContent</a></code> IDL attribute is equal to or less than the
                    909:   element's <a href="association-of-controls-and-forms.html#maximum-allowed-value-length" id="maximum-allowed-value-length-3">maximum allowed value length</a>.</p><p>The <dfn id="attr-textarea-required" title="attr-textarea-required"><code>required</code></dfn> attribute
                    910:   is a <a href="common-microsyntaxes.html#boolean-attribute" id="boolean-attribute-18">boolean attribute</a>. When specified, the user will
1.9       mike      911:   be required to enter a value before submitting the form.</p><!-- similar text in the <input> section --><p>The <dfn id="attr-textarea-placeholder" title="attr-textarea-placeholder"><code>placeholder</code></dfn>
                    912:   attribute represents a hint (a word or short phrase) intended to aid
                    913:   the user with data entry. A hint could be a sample value or a brief
                    914:   description of the expected format. The attribute, if specified,
                    915:   must have a value that contains no U+000A LINE FEED (LF) or U+000D
1.156     mike      916:   CARRIAGE RETURN (CR) characters.</p><p class="note">For a longer hint or other advisory text, the <code title="attr-title"><a href="elements.html#the-title-attribute" id="title-26">title</a></code> attribute is more appropriate.</p><p>The <code title="attr-textarea-placeholder"><a href="#attr-textarea-placeholder" id="placeholder-29">placeholder</a></code>
1.9       mike      917:   attribute should not be used as an alternative to a
1.156     mike      918:   <code><a href="forms.html#the-label-element" id="label-15">label</a></code>.</p><p>The <code title="attr-fae-form"><a href="association-of-controls-and-forms.html#attr-fae-form" id="form-53">form</a></code> attribute is used to
                    919:   explicitly associate the <code><a href="#the-textarea-element" id="textarea-24">textarea</a></code> element with its
                    920:   <a href="association-of-controls-and-forms.html#form-owner" id="form-owner-10">form owner</a>. The <code title="attr-fe-name"><a href="association-of-controls-and-forms.html#attr-fe-name" id="name-42">name</a></code>
                    921:   attribute represents the element's name. The <code title="attr-fe-disabled"><a href="association-of-controls-and-forms.html#attr-fe-disabled" id="disabled-17">disabled</a></code> attribute is used to make
1.9       mike      922:   the control non-interactive and to prevent its value from being
1.156     mike      923:   submitted. The <code title="attr-fe-autofocus"><a href="association-of-controls-and-forms.html#attr-fe-autofocus" id="autofocus-6">autofocus</a></code>
                    924:   attribute controls focus.</p><dl class="domintro"><dt><var title="">textarea</var> . <code title="attr-textarea-type">type</code></dt>
1.9       mike      925: 
                    926:    <dd>
                    927: 
                    928:     <p>Returns the string "<code title="">textarea</code>".</p>
                    929: 
                    930:    </dd>
                    931: 
                    932:    <dt><var title="">textarea</var> . <code title="attr-textarea-value">value</code></dt>
                    933: 
                    934:    <dd>
                    935: 
                    936:     <p>Returns the current value of the element.</p>
                    937: 
                    938:     <p>Can be set, to change the value.</p>
                    939: 
                    940:    </dd>
                    941: 
                    942:   </dl><div class="example">
                    943: 
1.156     mike      944:    <p>Here is an example of a <code><a href="#the-textarea-element" id="textarea-25">textarea</a></code> being used for
1.9       mike      945:    unrestricted free-form text input in a form:</p>
                    946: 
                    947:    <pre>&lt;p&gt;If you have any comments, please let us know: &lt;textarea cols=80 name=comments&gt;&lt;/textarea&gt;&lt;/p&gt;</pre>
                    948: 
1.156     mike      949:   </div><h4 id="the-keygen-element"><span class="secno">4.10.14 </span>The <dfn><code>keygen</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i></p><dl class="element"><dt>Categories</dt>
                    950:    <dd><a href="content-models.html#flow-content" id="flow-content-118">Flow content</a>.</dd>
                    951:    <dd><a href="content-models.html#phrasing-content" id="phrasing-content-128">Phrasing content</a>.</dd>
                    952:    <dd><a href="content-models.html#interactive-content" id="interactive-content-18">Interactive content</a>.</dd>
                    953:    <dd><a href="forms.html#category-listed" id="category-listed-7" title="category-listed">Listed</a>, <a href="forms.html#category-label" id="category-label-6" title="category-label">labelable</a>, <a href="forms.html#category-submit" id="category-submit-6" title="category-submit">submittable</a>, and <a href="forms.html#category-reset" id="category-reset-3" title="category-reset">resettable</a> <a href="forms.html#form-associated-element" id="form-associated-element-11">form-associated element</a>.</dd>
1.9       mike      954:    <dt>Contexts in which this element may be used:</dt>
1.156     mike      955:    <dd>Where <a href="content-models.html#phrasing-content" id="phrasing-content-129">phrasing content</a> is expected.</dd>
1.9       mike      956:    <dt>Content model:</dt>
                    957:    <dd>Empty.</dd>
                    958:    <dt>Content attributes:</dt>
1.156     mike      959:    <dd><a href="elements.html#global-attributes" id="global-attributes-91">Global attributes</a></dd>
                    960:    <dd><code title="attr-fe-autofocus"><a href="association-of-controls-and-forms.html#attr-fe-autofocus" id="autofocus-7">autofocus</a></code></dd>
                    961:    <dd><code title="attr-keygen-challenge"><a href="#attr-keygen-challenge" id="challenge">challenge</a></code></dd>
                    962:    <dd><code title="attr-fe-disabled"><a href="association-of-controls-and-forms.html#attr-fe-disabled" id="disabled-18">disabled</a></code></dd>
                    963:    <dd><code title="attr-fae-form"><a href="association-of-controls-and-forms.html#attr-fae-form" id="form-54">form</a></code></dd>
                    964:    <dd><code title="attr-keygen-keytype"><a href="#attr-keygen-keytype" id="keytype">keytype</a></code></dd>
                    965:    <dd><code title="attr-fe-name"><a href="association-of-controls-and-forms.html#attr-fe-name" id="name-43">name</a></code></dd>
1.9       mike      966:    <dt>DOM interface:</dt>
                    967:    <dd>
1.156     mike      968: <pre class="idl">interface <dfn id="htmlkeygenelement">HTMLKeygenElement</dfn> : <a href="elements.html#htmlelement" id="htmlelement-102">HTMLElement</a> {
                    969:            attribute boolean <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-fe-autofocus" title='Read about this "autofocus" reference in the full HTML5 spec.' class="full-spec-link">autofocus</a>;
                    970:            attribute DOMString <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-keygen-challenge" title='Read about this "challenge" reference in the full HTML5 spec.' class="full-spec-link">challenge</a>;
                    971:            attribute boolean <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-fe-disabled" title='Read about this "disabled" reference in the full HTML5 spec.' class="full-spec-link">disabled</a>;
                    972:   readonly attribute <a href="forms.html#htmlformelement" id="htmlformelement-9">HTMLFormElement</a> <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-fae-form" title='Read about this "form" reference in the full HTML5 spec.' class="full-spec-link">form</a>;
                    973:            attribute DOMString <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-keygen-keytype" title='Read about this "keytype" reference in the full HTML5 spec.' class="full-spec-link">keytype</a>;
                    974:            attribute DOMString <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-fe-name" title='Read about this "name" reference in the full HTML5 spec.' class="full-spec-link">name</a>;
                    975: 
                    976:   readonly attribute DOMString <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-keygen-type" title='Read about this "type" reference in the full HTML5 spec.' class="full-spec-link">type</a>;
                    977: 
                    978:   readonly attribute boolean <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-cva-willvalidate" title='Read about this "willValidate" reference in the full HTML5 spec.' class="full-spec-link">willValidate</a>;
                    979:   readonly attribute <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#validitystate" class="full-spec-link" title='Read about this "ValidityState" reference in the full HTML5 spec.'>ValidityState</a> <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-cva-validity" title='Read about this "validity" reference in the full HTML5 spec.' class="full-spec-link">validity</a>;
                    980:   readonly attribute DOMString <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-cva-validationmessage" title='Read about this "validationMessage" reference in the full HTML5 spec.' class="full-spec-link">validationMessage</a>;
                    981:   boolean <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-cva-checkvalidatity" title='Read about this "checkValidity" reference in the full HTML5 spec.' class="full-spec-link">checkValidity</a>();
                    982:   void <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-cva-setcustomvalidity" title='Read about this "setCustomValidity" reference in the full HTML5 spec.' class="full-spec-link">setCustomValidity</a>(in DOMString error);
1.9       mike      983: 
1.156     mike      984:   readonly attribute <a href="http://dev.w3.org/html5/spec/infrastructure.html#nodelist" class="full-spec-link" title='Read about this "NodeList" reference in the full HTML5 spec.'>NodeList</a> <a href="http://dev.w3.org/html5/spec/forms.html#dom-lfe-labels" title='Read about this "labels" reference in the full HTML5 spec.' class="full-spec-link">labels</a>;
1.9       mike      985: };</pre>
                    986:    </dd>
1.156     mike      987:   </dl><p>The <code><a href="#the-keygen-element" id="keygen-11">keygen</a></code> element <a href="http://dev.w3.org/html5/spec/rendering.html#represents" class="full-spec-link" title='Read about this "represents" reference in the full HTML5 spec.'>represents</a> a key
1.9       mike      988:   pair generator control. When the control's form is submitted, the
                    989:   private key is stored in the local keystore, and the public key is
1.156     mike      990:   packaged and sent to the server.</p><p>The <dfn id="attr-keygen-challenge" title="attr-keygen-challenge"><code>challenge</code></dfn> attribute
1.9       mike      991:   may be specified. Its value will be packaged with the submitted
1.156     mike      992:   key.</p><p>The <dfn id="attr-keygen-keytype" title="attr-keygen-keytype"><code>keytype</code></dfn>
                    993:   attribute is an <a href="common-microsyntaxes.html#enumerated-attribute" id="enumerated-attribute-10">enumerated attribute</a>. The following
                    994:   table lists the keywords and states for the attribute &#8212; the
1.9       mike      995:   keywords in the left column map to the states listed in the cell in
                    996:   the second column on the same row as the keyword. User agents are
1.26      mike      997:   not required to support these values, and must only recognize values
1.156     mike      998:   whose corresponding algorithms they support.</p><table><thead><tr><th> Keyword </th><th> State
                    999:    </th></tr></thead><tbody><tr><td> <code title="">rsa</code>
                   1000:      </td><td> <i title="">RSA</i>
1.9       mike     1001: <!-- v2 (see below)
                   1002:     <tr>
                   1003:      <td> <code title="">ec</code>
                   1004:      <td> <i title="">EC</i>
                   1005: -->
1.156     mike     1006:   </td></tr></tbody></table><p>The <i>invalid value default</i> state is the <i title="">unknown</i> state. The <i>missing value default</i> state
                   1007:   is the <i title="">RSA</i> state, if it is supported, or the <i title="">unknown</i> state otherwise.</p><p class="note">This specification does not specify what key types
                   1008:   user agents are to support &#8212; it is possible for a user agent
                   1009:   to not support any key types at all.</p><p>The <code title="attr-fae-form"><a href="association-of-controls-and-forms.html#attr-fae-form" id="form-55">form</a></code> attribute is used to
                   1010:   explicitly associate the <code><a href="#the-keygen-element" id="keygen-12">keygen</a></code> element with its
                   1011:   <a href="association-of-controls-and-forms.html#form-owner" id="form-owner-11">form owner</a>. The <code title="attr-fe-name"><a href="association-of-controls-and-forms.html#attr-fe-name" id="name-44">name</a></code>
                   1012:   attribute represents the element's name. The <code title="attr-fe-disabled"><a href="association-of-controls-and-forms.html#attr-fe-disabled" id="disabled-19">disabled</a></code> attribute is used to make
1.9       mike     1013:   the control non-interactive and to prevent its value from being
1.156     mike     1014:   submitted. The <code title="attr-fe-autofocus"><a href="association-of-controls-and-forms.html#attr-fe-autofocus" id="autofocus-8">autofocus</a></code>
                   1015:   attribute controls focus.</p><dl class="domintro"><dt><var title="">keygen</var> . <code title="attr-keygen-type">type</code></dt>
1.9       mike     1016: 
                   1017:    <dd>
                   1018: 
                   1019:     <p>Returns the string "<code title="">keygen</code>".</p>
                   1020: 
                   1021:    </dd>
                   1022: 
                   1023:   </dl><p class="note">This specification does not specify how the private
                   1024:   key generated is to be used. It is expected that after receiving the
1.156     mike     1025:   <code><a href="http://dev.w3.org/html5/spec/the-button-element.html#signedpublickeyandchallenge" class="full-spec-link" title='Read about this "SignedPublicKeyAndChallenge" reference in the full HTML5 spec.'>SignedPublicKeyAndChallenge</a></code> (SPKAC) structure, the
1.9       mike     1026:   server will generate a client certificate and offer it back to the
                   1027:   user for download; this certificate, once downloaded and stored in
                   1028:   the key store along with the private key, can then be used to
1.88      mike     1029:   authenticate to services that use TLS and certificate
1.9       mike     1030:   authentication.</p><!-- how does the UA know which private key is associated with a
                   1031:   certificate it gets back after the server has taken the public key
                   1032:   created by <keygen> and turned it into a client cert? --><div class="example">
                   1033: 
                   1034:    <p>To generate a key pair, add the private key to the user's key
                   1035:    store, and submit the public key to the server, markup such as the
                   1036:    following can be used:</p>
                   1037: 
1.22      mike     1038:    <pre>&lt;form action="processkey.cgi" method="post" enctype="multipart/form-data"&gt;
1.9       mike     1039:  &lt;p&gt;&lt;keygen name="key"&gt;&lt;/p&gt;
                   1040:  &lt;p&gt;&lt;input type=submit value="Submit key..."&gt;&lt;/p&gt;
                   1041: &lt;/form&gt;</pre>
                   1042: 
                   1043:    <p>The server will then receive a form submission with a packaged
                   1044:    RSA public key as the value of "<code title="">key</code>". This
                   1045:    can then be used for various purposes, such as generating a client
                   1046:    certificate, as mentioned above.</p>
                   1047: 
1.156     mike     1048:   </div><h4 id="the-output-element"><span class="secno">4.10.15 </span>The <dfn><code>output</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i></p><dl class="element"><dt>Categories</dt>
                   1049:    <dd><a href="content-models.html#flow-content" id="flow-content-119">Flow content</a>.</dd>
                   1050:    <dd><a href="content-models.html#phrasing-content" id="phrasing-content-130">Phrasing content</a>.</dd>
                   1051:    <dd><a href="forms.html#category-listed" id="category-listed-8" title="category-listed">Listed</a>, <a href="forms.html#category-label" id="category-label-7" title="category-label">labelable</a>, and <a href="forms.html#category-reset" id="category-reset-4" title="category-reset">resettable</a> <a href="forms.html#form-associated-element" id="form-associated-element-12">form-associated element</a>.</dd>
1.9       mike     1052:    <dt>Contexts in which this element may be used:</dt>
1.156     mike     1053:    <dd>Where <a href="content-models.html#phrasing-content" id="phrasing-content-131">phrasing content</a> is expected.</dd>
1.9       mike     1054:    <dt>Content model:</dt>
1.156     mike     1055:    <dd><a href="content-models.html#phrasing-content" id="phrasing-content-132">Phrasing content</a>.</dd>
1.9       mike     1056:    <dt>Content attributes:</dt>
1.156     mike     1057:    <dd><a href="elements.html#global-attributes" id="global-attributes-92">Global attributes</a></dd>
                   1058:    <dd><code title="attr-output-for"><a href="#attr-output-for" id="for-2">for</a></code></dd>
                   1059:    <dd><code title="attr-fae-form"><a href="association-of-controls-and-forms.html#attr-fae-form" id="form-56">form</a></code></dd>
                   1060:    <dd><code title="attr-fe-name"><a href="association-of-controls-and-forms.html#attr-fe-name" id="name-45">name</a></code></dd>
1.9       mike     1061:    <dt>DOM interface:</dt>
                   1062:    <dd>
1.156     mike     1063: <pre class="idl">interface <dfn id="htmloutputelement">HTMLOutputElement</dfn> : <a href="elements.html#htmlelement" id="htmlelement-103">HTMLElement</a> {
                   1064:   [PutForwards=<a href="http://dev.w3.org/html5/spec/common-dom-interfaces.html#dom-domsettabletokenlist-value" title='Read about this "value" reference in the full HTML5 spec.' class="full-spec-link">value</a>] readonly attribute <a href="urls.html#domsettabletokenlist" id="domsettabletokenlist-5">DOMSettableTokenList</a> <span title="dom-output-wrap">htmlFor</span>;
                   1065:   readonly attribute <a href="forms.html#htmlformelement" id="htmlformelement-10">HTMLFormElement</a> <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-fae-form" title='Read about this "form" reference in the full HTML5 spec.' class="full-spec-link">form</a>;
                   1066:            attribute DOMString <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-fe-name" title='Read about this "name" reference in the full HTML5 spec.' class="full-spec-link">name</a>;
                   1067: 
                   1068:   readonly attribute DOMString <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-output-type" title='Read about this "type" reference in the full HTML5 spec.' class="full-spec-link">type</a>;
                   1069:            attribute DOMString <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-output-defaultvalue" title='Read about this "defaultValue" reference in the full HTML5 spec.' class="full-spec-link">defaultValue</a>;
                   1070:            attribute DOMString <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-output-value" title='Read about this "value" reference in the full HTML5 spec.' class="full-spec-link">value</a>;
                   1071: 
                   1072:   readonly attribute boolean <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-cva-willvalidate" title='Read about this "willValidate" reference in the full HTML5 spec.' class="full-spec-link">willValidate</a>;
                   1073:   readonly attribute <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#validitystate" class="full-spec-link" title='Read about this "ValidityState" reference in the full HTML5 spec.'>ValidityState</a> <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-cva-validity" title='Read about this "validity" reference in the full HTML5 spec.' class="full-spec-link">validity</a>;
                   1074:   readonly attribute DOMString <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-cva-validationmessage" title='Read about this "validationMessage" reference in the full HTML5 spec.' class="full-spec-link">validationMessage</a>;
                   1075:   boolean <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-cva-checkvalidatity" title='Read about this "checkValidity" reference in the full HTML5 spec.' class="full-spec-link">checkValidity</a>();
                   1076:   void <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-cva-setcustomvalidity" title='Read about this "setCustomValidity" reference in the full HTML5 spec.' class="full-spec-link">setCustomValidity</a>(in DOMString error);
1.11      mike     1077: 
1.156     mike     1078:   readonly attribute <a href="http://dev.w3.org/html5/spec/infrastructure.html#nodelist" class="full-spec-link" title='Read about this "NodeList" reference in the full HTML5 spec.'>NodeList</a> <a href="http://dev.w3.org/html5/spec/forms.html#dom-lfe-labels" title='Read about this "labels" reference in the full HTML5 spec.' class="full-spec-link">labels</a>;
1.9       mike     1079: };</pre>
                   1080:    </dd>
1.156     mike     1081:   </dl><p>The <code><a href="#the-output-element" id="output-11">output</a></code> element <a href="http://dev.w3.org/html5/spec/rendering.html#represents" class="full-spec-link" title='Read about this "represents" reference in the full HTML5 spec.'>represents</a> the result of a
                   1082:   calculation.</p><p>The <dfn id="attr-output-for" title="attr-output-for"><code>for</code></dfn> content
1.9       mike     1083:   attribute allows an explicit relationship to be made between the
                   1084:   result of a calculation and the elements that represent the values
                   1085:   that went into the calculation or that otherwise influenced the
1.156     mike     1086:   calculation. The <code title="attr-output-for"><a href="#attr-output-for" id="for-3">for</a></code> attribute,
                   1087:   if specified, must contain a string consisting of an <a href="common-microsyntaxes.html#unordered-set-of-unique-space-separated-tokens" id="unordered-set-of-unique-space-separated-tokens-2">unordered
1.9       mike     1088:   set of unique space-separated tokens</a>, each of which must have
                   1089:   the value of an ID of an element in the same
1.156     mike     1090:   <code><a href="http://dev.w3.org/html5/spec/infrastructure.html#document" class="full-spec-link" title='Read about this "Document" reference in the full HTML5 spec.'>Document</a></code>.</p><p>The <code title="attr-fae-form"><a href="association-of-controls-and-forms.html#attr-fae-form" id="form-57">form</a></code> attribute is used to
                   1091:   explicitly associate the <code><a href="#the-output-element" id="output-12">output</a></code> element with its
                   1092:   <a href="association-of-controls-and-forms.html#form-owner" id="form-owner-12">form owner</a>. The <code title="attr-fe-name"><a href="association-of-controls-and-forms.html#attr-fe-name" id="name-46">name</a></code>
                   1093:   attribute represents the element's name.</p><dl class="domintro"><dt><var title="">output</var> . <code title="dom-output-value"><a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-output-value" class="full-spec-link" title='Read about this "value" reference in the full HTML5 spec.'>value</a></code> [ = <var title="">value</var> ]</dt>
1.9       mike     1094: 
                   1095:    <dd>
                   1096: 
                   1097:     <p>Returns the element's current value.</p>
                   1098: 
                   1099:     <p>Can be set, to change the value.</p>
                   1100: 
                   1101:    </dd>
                   1102: 
1.156     mike     1103:    <dt><var title="">output</var> . <code title="dom-output-defaultValue"><a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-output-defaultvalue" class="full-spec-link" title='Read about this "defaultValue" reference in the full HTML5 spec.'>defaultValue</a></code> [ = <var title="">value</var> ]</dt>
1.9       mike     1104: 
                   1105:    <dd>
                   1106: 
                   1107:     <p>Returns the element's current default value.</p>
                   1108: 
                   1109:     <p>Can be set, to change the default value.</p>
                   1110: 
                   1111:    </dd>
                   1112: 
1.156     mike     1113:    <dt><var title="">output</var> . <code title="dom-output-type"><a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-output-type" class="full-spec-link" title='Read about this "type" reference in the full HTML5 spec.'>type</a></code></dt>
1.9       mike     1114: 
                   1115:    <dd>
                   1116: 
                   1117:     <p>Returns the string "<code title="">output</code>".</p>
                   1118: 
                   1119:    </dd>
                   1120: 
                   1121:   </dl><div class="example">
                   1122: 
1.156     mike     1123:    <p>A simple calculator could use <code><a href="#the-output-element" id="output-13">output</a></code> for its
1.9       mike     1124:    display of calculated results:</p>
                   1125: 
                   1126:    <pre>&lt;form onsubmit="return false"&gt;
                   1127:  &lt;input name=a type=number step=any&gt; +
                   1128:  &lt;input name=b type=number step=any&gt; =
1.32      mike     1129:  &lt;output onforminput="value = a.valueAsNumber + b.valueAsNumber"&gt;&lt;/output&gt;
1.9       mike     1130: &lt;/form&gt;</pre>
                   1131: 
1.156     mike     1132:   </div><h4 id="the-progress-element"><span class="secno">4.10.16 </span>The <dfn><code>progress</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments. </i><span><a href="http://www.w3.org/html/wg/tracker/issues/96">ISSUE-96</a> (progress) blocks progress to Last Call</span></p><dl class="element"><dt>Categories</dt>
                   1133:    <dd><a href="content-models.html#flow-content" id="flow-content-120">Flow content</a>.</dd>
                   1134:    <dd><a href="content-models.html#phrasing-content" id="phrasing-content-133">Phrasing content</a>.</dd>
                   1135:    <dd><a href="forms.html#category-label" id="category-label-8" title="category-label">Labelable</a> <a href="forms.html#form-associated-element" id="form-associated-element-13">form-associated element</a>.</dd>
1.11      mike     1136:    <dt>Contexts in which this element may be used:</dt>
1.156     mike     1137:    <dd>Where <a href="content-models.html#phrasing-content" id="phrasing-content-134">phrasing content</a> is expected.</dd>
1.11      mike     1138:    <dt>Content model:</dt>
1.156     mike     1139:    <dd><a href="content-models.html#phrasing-content" id="phrasing-content-135">Phrasing content</a>, but there must be no <code><a href="#the-progress-element" id="progress-8">progress</a></code> element descendants.</dd>
1.11      mike     1140:    <dt>Content attributes:</dt>
1.156     mike     1141:    <dd><a href="elements.html#global-attributes" id="global-attributes-93">Global attributes</a></dd>
                   1142:    <dd><code title="attr-progress-value"><a href="#attr-progress-value" id="value-37">value</a></code></dd>
                   1143:    <dd><code title="attr-progress-max"><a href="#attr-progress-max" id="max-36">max</a></code></dd>
                   1144:    <dd><code title="attr-fae-form"><a href="association-of-controls-and-forms.html#attr-fae-form" id="form-58">form</a></code></dd>
1.11      mike     1145:    <dt>DOM interface:</dt>
                   1146:    <dd>
1.156     mike     1147: <pre class="idl">interface <dfn id="htmlprogresselement">HTMLProgressElement</dfn> : <a href="elements.html#htmlelement" id="htmlelement-104">HTMLElement</a> {
                   1148:            attribute float <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-progress-value" title='Read about this "value" reference in the full HTML5 spec.' class="full-spec-link">value</a>;
                   1149:            attribute float <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-progress-max" title='Read about this "max" reference in the full HTML5 spec.' class="full-spec-link">max</a>;
                   1150:   readonly attribute float <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-progress-position" title='Read about this "position" reference in the full HTML5 spec.' class="full-spec-link">position</a>;
                   1151:   readonly attribute <a href="forms.html#htmlformelement" id="htmlformelement-11">HTMLFormElement</a> <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-fae-form" title='Read about this "form" reference in the full HTML5 spec.' class="full-spec-link">form</a>;
                   1152:   readonly attribute <a href="http://dev.w3.org/html5/spec/infrastructure.html#nodelist" class="full-spec-link" title='Read about this "NodeList" reference in the full HTML5 spec.'>NodeList</a> <a href="http://dev.w3.org/html5/spec/forms.html#dom-lfe-labels" title='Read about this "labels" reference in the full HTML5 spec.' class="full-spec-link">labels</a>;
1.11      mike     1153: };</pre>
                   1154:    </dd>
1.156     mike     1155:   </dl><p>The <code><a href="#the-progress-element" id="progress-9">progress</a></code> element <a href="http://dev.w3.org/html5/spec/rendering.html#represents" class="full-spec-link" title='Read about this "represents" reference in the full HTML5 spec.'>represents</a> the
1.11      mike     1156:   completion progress of a task. The progress is either indeterminate,
                   1157:   indicating that progress is being made but that it is not clear how
                   1158:   much more work remains to be done before the task is complete
                   1159:   (e.g. because the task is waiting for a remote host to respond), or
                   1160:   the progress is a number in the range zero to a maximum, giving the
1.156     mike     1161:   fraction of work that has so far been completed.</p><p>There are two attributes that determine the current task
                   1162:   completion represented by the element.</p><p>The <dfn id="attr-progress-value" title="attr-progress-value"><code>value</code></dfn>
1.11      mike     1163:   attribute specifies how much of the task has been completed, and the
                   1164:   <dfn id="attr-progress-max" title="attr-progress-max"><code>max</code></dfn> attribute
                   1165:   specifies how much work the task requires in total. The units are
1.156     mike     1166:   arbitrary and not specified.</p><p>Authors are encouraged to also include the current value and the
1.11      mike     1167:   maximum value inline as text inside the element, so that the
1.156     mike     1168:   progress is made available to users of legacy user agents.</p><div class="example">
1.11      mike     1169:    <p>Here is a snippet of a Web application that shows the progress
                   1170:    of some automated task:</p>
                   1171:    <pre>&lt;section&gt;
                   1172:  &lt;h2&gt;Task Progress&lt;/h2&gt;
                   1173:  &lt;p&gt;Progress: &lt;progress id="p" max=100&gt;&lt;span&gt;0&lt;/span&gt;%&lt;/progress&gt;&lt;/p&gt;
                   1174:  &lt;script&gt;
                   1175:   var progressBar = document.getElementById('p');
                   1176:   function updateProgress(newValue) {
                   1177:     progressBar.value = newValue;
                   1178:     progressBar.getElementsByTagName('span')[0].textContent = newValue;
                   1179:   }
                   1180:  &lt;/script&gt;
                   1181: &lt;/section&gt;</pre>
                   1182:    <p>(The <code>updateProgress()</code> method in this example would
                   1183:    be called by some other code on the page to update the actual
                   1184:    progress bar as the task progressed.)</p>
1.156     mike     1185:   </div><p>The <code title="attr-progress-value"><a href="#attr-progress-value" id="value-38">value</a></code> and <code title="attr-progress-max"><a href="#attr-progress-max" id="max-37">max</a></code> attributes, when present, must
                   1186:   have values that are <a href="common-microsyntaxes.html#valid-floating-point-number" id="valid-floating-point-number-9" title="valid floating point number">valid
                   1187:   floating point numbers</a>. The <code title="attr-progress-value"><a href="#attr-progress-value" id="value-39">value</a></code> attribute, if present, must
1.11      mike     1188:   have a value equal to or greater than zero, and less than or equal
1.156     mike     1189:   to the value of the <code title="attr-progress-max"><a href="#attr-progress-max" id="max-38">max</a></code>
                   1190:   attribute, if present, or 1.0, otherwise. The <code title="attr-progress-max"><a href="#attr-progress-max" id="max-39">max</a></code> attribute, if present, must
                   1191:   have a value greater than zero.</p><p class="note">The <code><a href="#the-progress-element" id="progress-10">progress</a></code> element is the wrong
1.11      mike     1192:   element to use for something that is just a gauge, as opposed to
                   1193:   task progress. For instance, indicating disk space usage using
1.156     mike     1194:   <code><a href="#the-progress-element" id="progress-11">progress</a></code> would be inappropriate. Instead, the
                   1195:   <code><a href="#the-meter-element" id="meter-7">meter</a></code> element is available for such use cases.</p><dl class="domintro"><dt><var title="">progress</var> . <code title="dom-progress-position"><a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-progress-position" class="full-spec-link" title='Read about this "position" reference in the full HTML5 spec.'>position</a></code></dt>
1.11      mike     1196: 
                   1197:    <dd>
                   1198: 
                   1199:     <p>For a determinate progress bar (one with known current and
                   1200:     maximum values), returns the result of dividing the current value
                   1201:     by the maximum value.</p>
                   1202: 
1.156     mike     1203:     <p>For an indeterminate progress bar, returns &#8722;1.</p>
1.11      mike     1204: 
1.156     mike     1205:   </dd></dl><h4 id="the-meter-element"><span class="secno">4.10.17 </span>The <dfn><code>meter</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments. </i><span><a href="http://www.w3.org/html/wg/tracker/issues/97">ISSUE-97</a> (meter) blocks progress to Last Call</span></p><!-- Keep this after <progress> and NOT close to <time> --><dl class="element"><dt>Categories</dt>
                   1206:    <dd><a href="content-models.html#flow-content" id="flow-content-121">Flow content</a>.</dd>
                   1207:    <dd><a href="content-models.html#phrasing-content" id="phrasing-content-136">Phrasing content</a>.</dd>
                   1208:    <dd><a href="forms.html#category-label" id="category-label-9" title="category-label">Labelable</a> <a href="forms.html#form-associated-element" id="form-associated-element-14">form-associated element</a>.</dd>
1.11      mike     1209:    <dt>Contexts in which this element may be used:</dt>
1.156     mike     1210:    <dd>Where <a href="content-models.html#phrasing-content" id="phrasing-content-137">phrasing content</a> is expected.</dd>
1.11      mike     1211:    <dt>Content model:</dt>
1.156     mike     1212:    <dd><a href="content-models.html#phrasing-content" id="phrasing-content-138">Phrasing content</a>, but there must be no <code><a href="#the-meter-element" id="meter-8">meter</a></code> element descendants.</dd>
1.11      mike     1213:    <dt>Content attributes:</dt>
1.156     mike     1214:    <dd><a href="elements.html#global-attributes" id="global-attributes-94">Global attributes</a></dd>
                   1215:    <dd><code title="attr-meter-value"><a href="#attr-meter-value" id="value-41">value</a></code></dd>
                   1216:    <dd><code title="attr-meter-min"><a href="#attr-meter-min" id="min-38">min</a></code></dd>
                   1217:    <dd><code title="attr-meter-max"><a href="#attr-meter-max" id="max-41">max</a></code></dd>
                   1218:    <dd><code title="attr-meter-low"><a href="#attr-meter-low" id="low">low</a></code></dd>
                   1219:    <dd><code title="attr-meter-high"><a href="#attr-meter-high" id="high">high</a></code></dd>
                   1220:    <dd><code title="attr-meter-optimum"><a href="#attr-meter-optimum" id="optimum">optimum</a></code></dd>
                   1221:    <dd><code title="attr-fae-form"><a href="association-of-controls-and-forms.html#attr-fae-form" id="form-59">form</a></code></dd>
1.11      mike     1222:    <dt>DOM interface:</dt>
                   1223:    <dd>
1.156     mike     1224: <pre class="idl">interface <dfn id="htmlmeterelement">HTMLMeterElement</dfn> : <a href="elements.html#htmlelement" id="htmlelement-105">HTMLElement</a> {
                   1225:            attribute float <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-meter-value" title='Read about this "value" reference in the full HTML5 spec.' class="full-spec-link">value</a>;
                   1226:            attribute float <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-meter-min" title='Read about this "min" reference in the full HTML5 spec.' class="full-spec-link">min</a>;
                   1227:            attribute float <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-meter-max" title='Read about this "max" reference in the full HTML5 spec.' class="full-spec-link">max</a>;
                   1228:            attribute float <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-meter-low" title='Read about this "low" reference in the full HTML5 spec.' class="full-spec-link">low</a>;
                   1229:            attribute float <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-meter-high" title='Read about this "high" reference in the full HTML5 spec.' class="full-spec-link">high</a>;
                   1230:            attribute float <a href="http://dev.w3.org/html5/spec/the-button-element.html#dom-meter-optimum" title='Read about this "optimum" reference in the full HTML5 spec.' class="full-spec-link">optimum</a>;
                   1231:   readonly attribute <a href="forms.html#htmlformelement" id="htmlformelement-12">HTMLFormElement</a> <a href="http://dev.w3.org/html5/spec/association-of-controls-and-forms.html#dom-fae-form" title='Read about this "form" reference in the full HTML5 spec.' class="full-spec-link">form</a>;
                   1232:   readonly attribute <a href="http://dev.w3.org/html5/spec/infrastructure.html#nodelist" class="full-spec-link" title='Read about this "NodeList" reference in the full HTML5 spec.'>NodeList</a> <a href="http://dev.w3.org/html5/spec/forms.html#dom-lfe-labels" title='Read about this "labels" reference in the full HTML5 spec.' class="full-spec-link">labels</a>;
1.11      mike     1233: };</pre>
                   1234:    </dd>
1.156     mike     1235:   </dl><p>The <code><a href="#the-meter-element" id="meter-9">meter</a></code> element <a href="http://dev.w3.org/html5/spec/rendering.html#represents" class="full-spec-link" title='Read about this "represents" reference in the full HTML5 spec.'>represents</a> a scalar
1.11      mike     1236:   measurement within a known range, or a fractional value; for example
                   1237:   disk usage, the relevance of a query result, or the fraction of a
1.156     mike     1238:   voting population to have selected a particular candidate.</p><p>This is also known as a gauge.</p><p class="note">The <code><a href="#the-meter-element" id="meter-10">meter</a></code> element should not be used to
1.11      mike     1239:   indicate progress (as in a progress bar). For that role, HTML
1.156     mike     1240:   provides a separate <code><a href="#the-progress-element" id="progress-12">progress</a></code> element.</p><p class="note">The <code><a href="#the-meter-element" id="meter-11">meter</a></code> element also does not
                   1241:   represent a scalar value of arbitrary range &#8212; for example, it
1.11      mike     1242:   would be wrong to use this to report a weight, or height, unless
1.156     mike     1243:   there is a known maximum value.</p><p>There are six attributes that determine the semantics of the
                   1244:   gauge represented by the element.</p><p>The <dfn id="attr-meter-min" title="attr-meter-min"><code>min</code></dfn> attribute
1.11      mike     1245:   specifies the lower bound of the range, and the <dfn id="attr-meter-max" title="attr-meter-max"><code>max</code></dfn> attribute specifies
                   1246:   the upper bound. The <dfn id="attr-meter-value" title="attr-meter-value"><code>value</code></dfn> attribute
                   1247:   specifies the value to have the gauge indicate as the "measured"
1.156     mike     1248:   value.</p><p>The other three attributes can be used to segment the gauge's
1.11      mike     1249:   range into "low", "medium", and "high" parts, and to indicate which
                   1250:   part of the gauge is the "optimum" part. The <dfn id="attr-meter-low" title="attr-meter-low"><code>low</code></dfn> attribute specifies
                   1251:   the range that is considered to be the "low" part, and the <dfn id="attr-meter-high" title="attr-meter-high"><code>high</code></dfn> attribute specifies
                   1252:   the range that is considered to be the "high" part. The <dfn id="attr-meter-optimum" title="attr-meter-optimum"><code>optimum</code></dfn> attribute
                   1253:   gives the position that is "optimum"; if that is higher than the
                   1254:   "high" value  then this indicates that the higher the value, the
                   1255:   better; if it's lower than the "low" mark then it indicates that
                   1256:   lower values are better, and naturally if it is in between then it
1.156     mike     1257:   indicates that neither high nor low values are good.</p><p> The <code title="attr-meter-value"><a href="#attr-meter-value" id="value-42">value</a></code> attribute must be
                   1258:   specified. The <code title="attr-meter-value"><a href="#attr-meter-value" id="value-43">value</a></code>, <code title="attr-meter-min"><a href="#attr-meter-min" id="min-39">min</a></code>, <code title="attr-meter-low"><a href="#attr-meter-low" id="low-0">low</a></code>, <code title="attr-meter-high"><a href="#attr-meter-high" id="high-0">high</a></code>, <code title="attr-meter-max"><a href="#attr-meter-max" id="max-42">max</a></code>, and <code title="attr-meter-optimum"><a href="#attr-meter-optimum" id="optimum-0">optimum</a></code> attributes, when present,
                   1259:   must have values that are <a href="common-microsyntaxes.html#valid-floating-point-number" id="valid-floating-point-number-10" title="valid floating point
                   1260:   number">valid floating point numbers</a>.</p><p>In addition, the attributes' values are further constrained:</p><p>Let <var title="">value</var> be the <code title="attr-meter-value"><a href="#attr-meter-value" id="value-44">value</a></code> attribute's number.</p><p>If the <code title="attr-meter-min"><a href="#attr-meter-min" id="min-40">min</a></code> attribute
1.11      mike     1261:   attribute is specified, then let <var title="">minimum</var> be that
1.156     mike     1262:   attribute's value; otherwise, let it be zero.</p><p>If the <code title="attr-meter-max"><a href="#attr-meter-max" id="max-43">max</a></code> attribute
1.11      mike     1263:   attribute is specified, then let <var title="">maximum</var> be that
1.156     mike     1264:   attribute's value; otherwise, let it be 1.0.</p><p>The following inequalities must hold, as applicable:</p><ul class="brief"><li><var title="">minimum</var> &#8804; <var title="">value</var> &#8804; <var title="">maximum</var></li>
                   1265:    <li><var title="">minimum</var> &#8804; <code title="attr-meter-low"><a href="#attr-meter-low" id="low-1">low</a></code> &#8804; <var title="">maximum</var> (if <code title="attr-meter-low"><a href="#attr-meter-low" id="low-2">low</a></code> is specified)</li>
                   1266:    <li><var title="">minimum</var> &#8804; <code title="attr-meter-high"><a href="#attr-meter-high" id="high-1">high</a></code> &#8804; <var title="">maximum</var> (if <code title="attr-meter-high"><a href="#attr-meter-high" id="high-2">high</a></code> is specified)</li>
                   1267:    <li><var title="">minimum</var> &#8804; <code title="attr-meter-optimum"><a href="#attr-meter-optimum" id="optimum-1">optimum</a></code> &#8804; <var title="">maximum</var> (if <code title="attr-meter-optimum"><a href="#attr-meter-optimum" id="optimum-2">optimum</a></code> is specified)</li>
                   1268:    <li><code title="attr-meter-low"><a href="#attr-meter-low" id="low-3">low</a></code> &#8804; <code title="attr-meter-high"><a href="#attr-meter-high" id="high-3">high</a></code> (if both <code title="attr-meter-low"><a href="#attr-meter-low" id="low-4">low</a></code> and <code title="attr-meter-high"><a href="#attr-meter-high" id="high-4">high</a></code> are specified)</li>
1.21      mike     1269:   </ul><p class="note">If no minimum or maximum is specified, then the
1.11      mike     1270:   range is assumed to be 0..1, and the value thus has to be within
1.156     mike     1271:   that range.</p><p>Authors are encouraged to include a textual representation of the
1.11      mike     1272:   gauge's state in the element's contents, for users of user agents
1.156     mike     1273:   that do not support the <code><a href="#the-meter-element" id="meter-12">meter</a></code> element.</p><div class="example">
1.11      mike     1274: 
                   1275:    <p>The following examples show three gauges that would all be
                   1276:    three-quarters full:</p>
                   1277: 
                   1278:    <pre>Storage space usage: &lt;meter value=6 max=8&gt;6 blocks used (out of 8 total)&lt;/meter&gt;
                   1279: Voter turnout: &lt;meter value=0.75&gt;&lt;img alt="75%" src="graph75.png"&gt;&lt;/meter&gt;
                   1280: Tickets sold: &lt;meter min="0" max="100" value="75"&gt;&lt;/meter&gt;</pre>
                   1281: 
                   1282:    <p>The following example is incorrect use of the element, because
                   1283:    it doesn't give a range (and since the default maximum is 1, both
                   1284:    of the gauges would end up looking maxed out):</p>
                   1285: 
                   1286:    <pre class="bad">&lt;p&gt;The grapefruit pie had a radius of &lt;meter value=12&gt;12cm&lt;/meter&gt;
                   1287: and a height of &lt;meter value=2&gt;2cm&lt;/meter&gt;.&lt;/p&gt; &lt;!-- <strong>BAD!</strong> --&gt;</pre>
                   1288: 
                   1289:    <p>Instead, one would either not include the meter element, or use
                   1290:    the meter element with a defined range to give the dimensions in
                   1291:    context compared to other pies:</p>
                   1292: 
                   1293:    <pre>&lt;p&gt;The grapefruit pie had a radius of 12cm and a height of
                   1294: 2cm.&lt;/p&gt;
                   1295: &lt;dl&gt;
                   1296:  &lt;dt&gt;Radius: &lt;dd&gt; &lt;meter min=0 max=20 value=12&gt;12cm&lt;/meter&gt;
                   1297:  &lt;dt&gt;Height: &lt;dd&gt; &lt;meter min=0 max=10 value=2&gt;2cm&lt;/meter&gt;
                   1298: &lt;/dl&gt;</pre>
                   1299: 
                   1300:   </div><p>There is no explicit way to specify units in the
1.156     mike     1301:   <code><a href="#the-meter-element" id="meter-13">meter</a></code> element, but the units may be specified in the
                   1302:   <code title="attr-title"><a href="elements.html#the-title-attribute" id="title-27">title</a></code> attribute in free-form text.</p><div class="example">
1.11      mike     1303: 
                   1304:    <p>The example above could be extended to mention the units:</p>
                   1305: 
                   1306:    <pre>&lt;dl&gt;
                   1307:  &lt;dt&gt;Radius: &lt;dd&gt; &lt;meter min=0 max=20 value=12 title="centimeters"&gt;12cm&lt;/meter&gt;
                   1308:  &lt;dt&gt;Height: &lt;dd&gt; &lt;meter min=0 max=10 value=2 title="centimeters"&gt;2cm&lt;/meter&gt;
                   1309: &lt;/dl&gt;</pre>
                   1310: 
                   1311:   </div><div class="example">
                   1312:    <p>The following markup:</p>
                   1313:    <pre>&lt;h3&gt;Suggested groups&lt;/h3&gt;
                   1314: &lt;menu type="toolbar"&gt;
                   1315:  &lt;a href="?cmd=hsg" onclick="hideSuggestedGroups()"&gt;Hide suggested groups&lt;/a&gt;
                   1316: &lt;/menu&gt;
                   1317: &lt;ul&gt;
                   1318:  &lt;li&gt;
                   1319:   &lt;p&gt;&lt;a href="/group/comp.infosystems.www.authoring.stylesheets/view"&gt;comp.infosystems.www.authoring.stylesheets&lt;/a&gt; -
                   1320:      &lt;a href="/group/comp.infosystems.www.authoring.stylesheets/subscribe"&gt;join&lt;/a&gt;&lt;/p&gt;
                   1321:   &lt;p&gt;Group description: &lt;strong&gt;Layout/presentation on the WWW.&lt;/strong&gt;&lt;/p&gt;
                   1322:   &lt;p&gt;<strong>&lt;meter value="0.5"&gt;Moderate activity,&lt;/meter&gt;</strong> Usenet, 618 subscribers&lt;/p&gt;
                   1323:  &lt;/li&gt;
                   1324:  &lt;li&gt;
                   1325:   &lt;p&gt;&lt;a href="/group/netscape.public.mozilla.xpinstall/view"&gt;netscape.public.mozilla.xpinstall&lt;/a&gt; -
                   1326:      &lt;a href="/group/netscape.public.mozilla.xpinstall/subscribe"&gt;join&lt;/a&gt;&lt;/p&gt;
                   1327:   &lt;p&gt;Group description: &lt;strong&gt;Mozilla XPInstall discussion.&lt;/strong&gt;&lt;/p&gt;
                   1328:   &lt;p&gt;<strong>&lt;meter value="0.25"&gt;Low activity,&lt;/meter&gt;</strong> Usenet, 22 subscribers&lt;/p&gt;
                   1329:  &lt;/li&gt;
                   1330:  &lt;li&gt;
                   1331:   &lt;p&gt;&lt;a href="/group/mozilla.dev.general/view"&gt;mozilla.dev.general&lt;/a&gt; -
                   1332:      &lt;a href="/group/mozilla.dev.general/subscribe"&gt;join&lt;/a&gt;&lt;/p&gt;
                   1333:   &lt;p&gt;<strong>&lt;meter value="0.25"&gt;Low activity,&lt;/meter&gt;</strong> Usenet, 66 subscribers&lt;/p&gt;
                   1334:  &lt;/li&gt;
                   1335: &lt;/ul&gt;</pre>
                   1336:    <p>Might be rendered as follows:</p>
1.156     mike     1337:    <p><img alt="With the &lt;meter&gt; elements rendered as inline green bars of varying lengths." src="http://dev.w3.org/html5/spec/images/sample-meter.png"></p>
1.13      mike     1338:   </div><p>User agents  combine the value of
1.156     mike     1339:   the <code title="attr-title"><a href="elements.html#the-title-attribute" id="title-28">title</a></code> attribute and the other
1.11      mike     1340:   attributes to provide context-sensitive help or inline text
1.156     mike     1341:   detailing the actual values.</p><div class="example">
1.11      mike     1342:    <p>For example, the following snippet:</p>
                   1343:    <pre>&lt;meter min=0 max=60 value=23.2 title=seconds&gt;&lt;/meter&gt;</pre>
                   1344:    <p>...might cause the user agent to display a gauge with a tooltip
                   1345:    saying "Value: 23.2 out of 60." on one line and "seconds" on a
                   1346:    second line.</p>
1.156     mike     1347:   </div><p>The <code title="attr-fae-form"><a href="association-of-controls-and-forms.html#attr-fae-form" id="form-60">form</a></code> attribute is used to
                   1348:   explicitly associate the <code><a href="#the-meter-element" id="meter-14">meter</a></code> element with its
                   1349:   <a href="association-of-controls-and-forms.html#form-owner" id="form-owner-13">form owner</a>.</p><div class="example">
1.11      mike     1350: 
                   1351:    <p>The following example shows how a gauge could fall back to
                   1352:    localized or pretty-printed text.</p>
                   1353: 
1.156     mike     1354:    <pre>&lt;p&gt;Disk usage: &lt;meter min=0 value=170261928 max=233257824&gt;170&#8201;261&#8201;928 bytes used
                   1355: out of 233&#8201;257&#8201;824 bytes available&lt;/meter&gt;&lt;/p&gt;</pre>
1.11      mike     1356: 
1.156     mike     1357:   </div></body></html>

Webmaster