Annotation of html5/spec-author-view/grouping-content.html, revision 1.68

1.58      mike        1: <!DOCTYPE html><!-- when publishing, change bits marked ZZZ --><html class="split chapter" lang="en-US-x-Hixie"><head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"><title>4.5 Grouping content &mdash; HTML5 (Edition for Web Authors)</title><link href="whatwg.css" rel="stylesheet"><style type="text/css">
1.12      mike        2:    pre { margin-left: 2em; white-space: pre-wrap; }
                      3:    h2 { margin: 3em 0 1em 0; }
                      4:    h3 { margin: 2.5em 0 1em 0; }
                      5:    h4 { margin: 2.5em 0 0.75em 0; }
                      6:    h5, h6 { margin: 2.5em 0 1em; }
                      7:    h1 + h2, h1 + h2 + h2 { margin: 0.75em 0 0.75em; }
                      8:    h2 + h3, h3 + h4, h4 + h5, h5 + h6 { margin-top: 0.5em; }
                      9:    p { margin: 1em 0; }
                     10:    hr:not(.top) { display: block; background: none; border: none; padding: 0; margin: 2em 0; height: auto; }
                     11:    dl, dd { margin-top: 0; margin-bottom: 0; }
                     12:    dt { margin-top: 0.75em; margin-bottom: 0.25em; clear: left; }
                     13:    dt + dt { margin-top: 0; }
                     14:    dd dt { margin-top: 0.25em; margin-bottom: 0; }
                     15:    dd p { margin-top: 0; }
                     16:    dd dl + p { margin-top: 1em; }
                     17:    dd table + p { margin-top: 1em; }
                     18:    p + * > li, dd li { margin: 1em 0; }
                     19:    dt, dfn { font-weight: bold; font-style: normal; }
                     20:    dt dfn { font-style: italic; }
                     21:    pre, code { font-size: inherit; font-family: monospace; font-variant: normal; }
                     22:    pre strong { color: black; font: inherit; font-weight: bold; background: yellow; }
                     23:    pre em { font-weight: bolder; font-style: normal; }
                     24:    @media screen { code { color: orangered; } code :link, code :visited { color: inherit; } }
                     25:    var sub { vertical-align: bottom; font-size: smaller; position: relative; top: 0.1em; }
                     26:    table { border-collapse: collapse; border-style: hidden hidden none hidden; }
1.37      mike       27:    table thead, table tbody { border-bottom: solid; }
1.12      mike       28:    table tbody th:first-child { border-left: solid; }
                     29:    table tbody th { text-align: left; }
                     30:    table td, table th { border-left: solid; border-right: solid; border-bottom: solid thin; vertical-align: top; padding: 0.2em; }
                     31:    blockquote { margin: 0 0 0 2em; border: 0; padding: 0; font-style: italic; }
                     32: 
                     33:    .bad, .bad *:not(.XXX) { color: gray; border-color: gray; background: transparent; }
                     34:    .matrix, .matrix td { border: none; text-align: right; }
                     35:    .matrix { margin-left: 2em; }
                     36:    .dice-example { border-collapse: collapse; border-style: hidden solid solid hidden; border-width: thin; margin-left: 3em; }
                     37:    .dice-example caption { width: 30em; font-size: smaller; font-style: italic; padding: 0.75em 0; text-align: left; }
                     38:    .dice-example td, .dice-example th { border: solid thin; width: 1.35em; height: 1.05em; text-align: center; padding: 0; }
                     39: 
                     40:    .toc dfn, h1 dfn, h2 dfn, h3 dfn, h4 dfn, h5 dfn, h6 dfn { font: inherit; }
                     41:    img.extra { float: right; }
                     42:    pre.idl { border: solid thin; background: #EEEEEE; color: black; padding: 0.5em 1em; }
                     43:    pre.idl :link, pre.idl :visited { color: inherit; background: transparent; }
                     44:    pre.css { border: solid thin; background: #FFFFEE; color: black; padding: 0.5em 1em; }
                     45:    pre.css:first-line { color: #AAAA50; }
1.21      mike       46:    dl.domintro { color: green; margin: 2em 0 2em 2em; padding: 0.5em 1em; border: none; background: #DDFFDD; }
1.12      mike       47:    hr + dl.domintro, div.impl + dl.domintro { margin-top: 2.5em; margin-bottom: 1.5em; }
                     48:    dl.domintro dt, dl.domintro dt * { color: black; text-decoration: none; }
                     49:    dl.domintro dd { margin: 0.5em 0 1em 2em; padding: 0; }
                     50:    dl.domintro dd p { margin: 0.5em 0; }
                     51:    dl.switch { padding-left: 2em; }
                     52:    dl.switch > dt { text-indent: -1.5em; }
                     53:    dl.switch > dt:before { content: '\21AA'; padding: 0 0.5em 0 0; display: inline-block; width: 1em; text-align: right; line-height: 0.5em; }
                     54:    dl.triple { padding: 0 0 0 1em; }
                     55:    dl.triple dt, dl.triple dd { margin: 0; display: inline }
                     56:    dl.triple dt:after { content: ':'; }
                     57:    dl.triple dd:after { content: '\A'; white-space: pre; }
                     58:    .diff-old { text-decoration: line-through; color: silver; background: transparent; }
                     59:    .diff-chg, .diff-new { text-decoration: underline; color: green; background: transparent; }
                     60:    a .diff-new { border-bottom: 1px blue solid; }
                     61: 
                     62:    h2 { page-break-before: always; }
                     63:    h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
                     64:    h1 + h2, hr + h2.no-toc { page-break-before: auto; }
                     65: 
                     66:    p > span:not([title=""]):not([class="XXX"]):not([class="impl"]), li > span:not([title=""]):not([class="XXX"]):not([class="impl"]) { border-bottom: solid #9999CC; }
                     67: 
                     68:    div.head { margin: 0 0 1em; padding: 1em 0 0 0; }
                     69:    div.head p { margin: 0; }
                     70:    div.head h1 { margin: 0; }
                     71:    div.head .logo { float: right; margin: 0 1em; }
                     72:    div.head .logo img { border: none } /* remove border from top image */
                     73:    div.head dl { margin: 1em 0; }
                     74:    div.head p.copyright, div.head p.alt { font-size: x-small; font-style: oblique; margin: 0; }
                     75: 
                     76:    body > .toc > li { margin-top: 1em; margin-bottom: 1em; }
                     77:    body > .toc.brief > li { margin-top: 0.35em; margin-bottom: 0.35em; }
                     78:    body > .toc > li > * { margin-bottom: 0.5em; }
                     79:    body > .toc > li > * > li > * { margin-bottom: 0.25em; }
                     80:    .toc, .toc li { list-style: none; }
                     81: 
                     82:    .brief { margin-top: 1em; margin-bottom: 1em; line-height: 1.1; }
                     83:    .brief li { margin: 0; padding: 0; }
                     84:    .brief li p { margin: 0; padding: 0; }
                     85: 
                     86:    .category-list { margin-top: -0.75em; margin-bottom: 1em; line-height: 1.5; }
                     87:    .category-list::before { content: '\21D2\A0'; font-size: 1.2em; font-weight: 900; }
                     88:    .category-list li { display: inline; }
                     89:    .category-list li:not(:last-child)::after { content: ', '; }
                     90:    .category-list li > span, .category-list li > a { text-transform: lowercase; }
                     91:    .category-list li * { text-transform: none; } /* don't affect <code> nested in <a> */
                     92: 
                     93:    .XXX { color: #E50000; background: white; border: solid red; padding: 0.5em; margin: 1em 0; }
                     94:    .XXX > :first-child { margin-top: 0; }
                     95:    p .XXX { line-height: 3em; }
                     96:    .annotation { border: solid thin black; background: #0C479D; color: white; position: relative; margin: 8px 0 20px 0; }
                     97:    .annotation:before { position: absolute; left: 0; top: 0; width: 100%; height: 100%; margin: 6px -6px -6px 6px; background: #333333; z-index: -1; content: ''; }
                     98:    .annotation :link, .annotation :visited { color: inherit; }
                     99:    .annotation :link:hover, .annotation :visited:hover { background: transparent; }
                    100:    .annotation span { border: none ! important; }
                    101:    .note { color: green; background: transparent; font-family: sans-serif; }
                    102:    .warning { color: red; background: transparent; }
                    103:    .note, .warning { font-weight: bolder; font-style: italic; }
                    104:    p.note, div.note { padding: 0.5em 2em; }
                    105:    span.note { padding: 0 2em; }
                    106:    .note p:first-child, .warning p:first-child { margin-top: 0; }
                    107:    .note p:last-child, .warning p:last-child { margin-bottom: 0; }
                    108:    .warning:before { font-style: normal; }
                    109:    p.note:before { content: 'Note: '; }
                    110:    p.warning:before { content: '\26A0 Warning! '; }
                    111: 
                    112:    .bookkeeping:before { display: block; content: 'Bookkeeping details'; font-weight: bolder; font-style: italic; }
                    113:    .bookkeeping { font-size: 0.8em; margin: 2em 0; }
                    114:    .bookkeeping p { margin: 0.5em 2em; display: list-item; list-style: square; }
                    115: 
                    116:    h4 { position: relative; z-index: 3; }
                    117:    h4 + .element, h4 + div + .element { margin-top: -2.5em; padding-top: 2em; }
                    118:    .element {
                    119:      background: #EEEEFF;
                    120:      color: black;
                    121:      margin: 0 0 1em 0.15em;
                    122:      padding: 0 1em 0.25em 0.75em;
                    123:      border-left: solid #9999FF 0.25em;
                    124:      position: relative;
                    125:      z-index: 1;
                    126:    }
                    127:    .element:before {
                    128:      position: absolute;
                    129:      z-index: 2;
                    130:      top: 0;
                    131:      left: -1.15em;
                    132:      height: 2em;
                    133:      width: 0.9em;
                    134:      background: #EEEEFF;
                    135:      content: ' ';
                    136:      border-style: none none solid solid;
                    137:      border-color: #9999FF;
                    138:      border-width: 0.25em;
                    139:    }
                    140: 
                    141:    .example { display: block; color: #222222; background: #FCFCFC; border-left: double; margin-left: 2em; padding-left: 1em; }
                    142:    td > .example:only-child { margin: 0 0 0 0.1em; }
                    143: 
                    144:    ul.domTree, ul.domTree ul { padding: 0 0 0 1em; margin: 0; }
                    145:    ul.domTree li { padding: 0; margin: 0; list-style: none; position: relative; }
                    146:    ul.domTree li li { list-style: none; }
                    147:    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; }
                    148:    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; }
                    149:    ul.domTree span { font-style: italic; font-family: serif; }
                    150:    ul.domTree .t1 code { color: purple; font-weight: bold; }
                    151:    ul.domTree .t2 { font-style: normal; font-family: monospace; }
                    152:    ul.domTree .t2 .name { color: black; font-weight: bold; }
                    153:    ul.domTree .t2 .value { color: blue; font-weight: normal; }
                    154:    ul.domTree .t3 code, .domTree .t4 code, .domTree .t5 code { color: gray; }
                    155:    ul.domTree .t7 code, .domTree .t8 code { color: green; }
                    156:    ul.domTree .t10 code { color: teal; }
                    157: 
1.15      mike      158:    body.dfnEnabled dfn { cursor: pointer; }
                    159:    .dfnPanel {
                    160:      display: inline;
                    161:      position: absolute;
                    162:      z-index: 10;
                    163:      height: auto;
                    164:      width: auto;
                    165:      padding: 0.5em 0.75em;
                    166:      font: small sans-serif, Droid Sans Fallback;
                    167:      background: #DDDDDD;
                    168:      color: black;
                    169:      border: outset 0.2em;
                    170:    }
                    171:    .dfnPanel * { margin: 0; padding: 0; font: inherit; text-indent: 0; }
                    172:    .dfnPanel :link, .dfnPanel :visited { color: black; }
                    173:    .dfnPanel p { font-weight: bolder; }
                    174:    .dfnPanel * + p { margin-top: 0.25em; }
                    175:    .dfnPanel li { list-style-position: inside; }
                    176: 
1.12      mike      177:    #configUI { position: absolute; z-index: 20; top: 10em; right: 1em; width: 11em; font-size: small; }
                    178:    #configUI p { margin: 0.5em 0; padding: 0.3em; background: #EEEEEE; color: black; border: inset thin; }
                    179:    #configUI p label { display: block; }
                    180:    #configUI #updateUI, #configUI .loginUI { text-align: center; }
                    181:    #configUI input[type=button] { display: block; margin: auto; }
                    182:   </style><style type="text/css">
                    183: 
                    184:    .applies thead th > * { display: block; }
                    185:    .applies thead code { display: block; }
                    186:    .applies tbody th { whitespace: nowrap; }
                    187:    .applies td { text-align: center; }
                    188:    .applies .yes { background: yellow; }
                    189: 
                    190:    .matrix, .matrix td { border: none; text-align: right; }
                    191:    .matrix { margin-left: 2em; }
                    192: 
                    193:    .dice-example { border-collapse: collapse; border-style: hidden solid solid hidden; border-width: thin; margin-left: 3em; }
                    194:    .dice-example caption { width: 30em; font-size: smaller; font-style: italic; padding: 0.75em 0; text-align: left; }
                    195:    .dice-example td, .dice-example th { border: solid thin; width: 1.35em; height: 1.05em; text-align: center; padding: 0; }
                    196: 
                    197:    #table-example-1 { border: solid thin; border-collapse: collapse; margin-left: 3em; }
                    198:    #table-example-1 * { font-family: "Essays1743", serif; line-height: 1.01em; }
                    199:    #table-example-1 caption { padding-bottom: 0.5em; }
                    200:    #table-example-1 thead, #table-example-1 tbody { border: none; }
                    201:    #table-example-1 th, #table-example-1 td { border: solid thin; }
                    202:    #table-example-1 th { font-weight: normal; }
                    203:    #table-example-1 td { border-style: none solid; vertical-align: top; }
                    204:    #table-example-1 th { padding: 0.5em; vertical-align: middle; text-align: center; }
                    205:    #table-example-1 tbody tr:first-child td { padding-top: 0.5em; }
                    206:    #table-example-1 tbody tr:last-child td { padding-bottom: 1.5em; }
                    207:    #table-example-1 tbody td:first-child { padding-left: 2.5em; padding-right: 0; width: 9em; }
                    208:    #table-example-1 tbody td:first-child::after { content: leader(". "); }
                    209:    #table-example-1 tbody td { padding-left: 2em; padding-right: 2em; }
                    210:    #table-example-1 tbody td:first-child + td { width: 10em; }
                    211:    #table-example-1 tbody td:first-child + td ~ td { width: 2.5em; }
                    212:    #table-example-1 tbody td:first-child + td + td + td ~ td { width: 1.25em; }
                    213: 
                    214:    .apple-table-examples { border: none; border-collapse: separate; border-spacing: 1.5em 0em; width: 40em; margin-left: 3em; }
                    215:    .apple-table-examples * { font-family: "Times", serif; }
                    216:    .apple-table-examples td, .apple-table-examples th { border: none; white-space: nowrap; padding-top: 0; padding-bottom: 0; }
                    217:    .apple-table-examples tbody th:first-child { border-left: none; width: 100%; }
                    218:    .apple-table-examples thead th:first-child ~ th { font-size: smaller; font-weight: bolder; border-bottom: solid 2px; text-align: center; }
                    219:    .apple-table-examples tbody th::after, .apple-table-examples tfoot th::after { content: leader(". ") }
                    220:    .apple-table-examples tbody th, .apple-table-examples tfoot th { font: inherit; text-align: left; }
                    221:    .apple-table-examples td { text-align: right; vertical-align: top; }
                    222:    .apple-table-examples.e1 tbody tr:last-child td { border-bottom: solid 1px; }
                    223:    .apple-table-examples.e1 tbody + tbody tr:last-child td { border-bottom: double 3px; }
                    224:    .apple-table-examples.e2 th[scope=row] { padding-left: 1em; }
                    225:    .apple-table-examples sup { line-height: 0; }
                    226: 
1.13      mike      227:    .details-example img { vertical-align: top; }
                    228: 
1.25      mike      229:    #named-character-references-table {
                    230:      font-size: 0.6em;
                    231:      column-width: 28em;
                    232:      column-gap: 1em;
                    233:      -moz-column-width: 28em;
                    234:      -moz-column-gap: 1em;
                    235:      -webkit-column-width: 28em;
                    236:      -webkit-column-gap: 1em;
                    237:    }
                    238:    #named-character-references-table > table > tbody > tr > td:last-child { text-align: center; }
                    239:    #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; }
                    240: 
1.38      mike      241:    .glyph.control { color: red; }
                    242: 
1.41      mike      243:    @font-face {
                    244:      font-family: 'Essays1743';
                    245:      src: url('http://www.whatwg.org/specs/web-apps/current-work/fonts/Essays1743.ttf');
                    246:    }
                    247:    @font-face {
                    248:      font-family: 'Essays1743';
                    249:      font-weight: bold;
                    250:      src: url('http://www.whatwg.org/specs/web-apps/current-work/fonts/Essays1743-Bold.ttf');
                    251:    }
                    252:    @font-face {
                    253:      font-family: 'Essays1743';
                    254:      font-style: italic;
                    255:      src: url('http://www.whatwg.org/specs/web-apps/current-work/fonts/Essays1743-Italic.ttf');
                    256:    }
                    257:    @font-face {
                    258:      font-family: 'Essays1743';
                    259:      font-style: italic;
                    260:      font-weight: bold;
                    261:      src: url('http://www.whatwg.org/specs/web-apps/current-work/fonts/Essays1743-BoldItalic.ttf');
                    262:    }
                    263: 
1.24      mike      264:   </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.12      mike      265:    function getCookie(name) {
                    266:      var params = location.search.substr(1).split("&");
                    267:      for (var index = 0; index < params.length; index++) {
                    268:        if (params[index] == name)
                    269:          return "1";
                    270:        var data = params[index].split("=");
                    271:        if (data[0] == name)
                    272:          return unescape(data[1]);
                    273:      }
                    274:      var cookies = document.cookie.split("; ");
                    275:      for (var index = 0; index < cookies.length; index++) {
                    276:        var data = cookies[index].split("=");
                    277:        if (data[0] == name)
                    278:          return unescape(data[1]);
                    279:      }
                    280:      return null;
                    281:    }
                    282:    function load(script) {
                    283:      var e = document.createElement('script');
                    284:      e.setAttribute('src', 'http://www.whatwg.org/specs/web-apps/current-work/' + script + '?' + encodeURIComponent(location) + '&' + encodeURIComponent(document.referrer));
                    285:      document.body.appendChild(e);
                    286:    }
                    287:    function init() {
                    288:      if (location.search == '?slow-browser')
                    289:        return;
                    290:      var configUI = document.createElement('div');
                    291:      configUI.id = 'configUI';
                    292:      document.body.appendChild(configUI);
                    293:      // load('reviewer.js'); // would need cross-site XHR
                    294:      if (document.getElementById('head'))
                    295:        load('toc.js');
                    296:      
                    297:      // load('updater.js'); // would need cross-site XHR
1.13      mike      298:      load('dfn.js'); // doesn't support split-out specs, but, oh well.
1.12      mike      299:      // load('status.js'); // would need cross-site XHR
                    300:      if (getCookie('profile') == '1')
                    301:        document.getElementsByTagName('h2')[0].textContent += '; load: ' + (new Date() - loadTimer) + 'ms';
                    302:      fixBrokenLink();
                    303:    }
1.57      mike      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="sections.html" rel="prev" title="4.4 Sections">
1.51      mike      305:   <link href="Overview.html#contents" rel="index" title="Table of contents">
                    306:   <link href="text-level-semantics.html" rel="next" title="4.6 Text-level semantics">
                    307:   <body onload="fixBrokenLink(); init()"><div class="head" id="head">
1.12      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.39      mike      309: 
1.68    ! mike      310:    <h1>HTML5 (Edition for Web Authors)<span class="rcsrevision"> revision 1.4121</span></h1>
1.12      mike      311:    </div><div>
1.51      mike      312:    <a href="sections.html">&larr; 4.4 Sections</a> &ndash;
                    313:    <a href="Overview.html#contents">Table of contents</a> &ndash;
                    314:    <a href="text-level-semantics.html">4.6 Text-level semantics &rarr;</a>
1.12      mike      315:   <ol class="toc"><li><ol><li><a href="grouping-content.html#grouping-content"><span class="secno">4.5 </span>Grouping content</a>
1.51      mike      316:     <ol><li><a href="grouping-content.html#the-p-element"><span class="secno">4.5.1 </span>The <code>p</code> element</a><li><a href="grouping-content.html#the-hr-element"><span class="secno">4.5.2 </span>The <code>hr</code> element</a><li><a href="grouping-content.html#the-pre-element"><span class="secno">4.5.3 </span>The <code>pre</code> element</a><li><a href="grouping-content.html#the-blockquote-element"><span class="secno">4.5.4 </span>The <code>blockquote</code> element</a><li><a href="grouping-content.html#the-ol-element"><span class="secno">4.5.5 </span>The <code>ol</code> element</a><li><a href="grouping-content.html#the-ul-element"><span class="secno">4.5.6 </span>The <code>ul</code> element</a><li><a href="grouping-content.html#the-li-element"><span class="secno">4.5.7 </span>The <code>li</code> element</a><li><a href="grouping-content.html#the-dl-element"><span class="secno">4.5.8 </span>The <code>dl</code> element</a><li><a href="grouping-content.html#the-dt-element"><span class="secno">4.5.9 </span>The <code>dt</code> element</a><li><a href="grouping-content.html#the-dd-element"><span class="secno">4.5.10 </span>The <code>dd</code> element</a><li><a href="grouping-content.html#the-figure-element"><span class="secno">4.5.11 </span>The <code>figure</code> element</a><li><a href="grouping-content.html#the-figcaption-element"><span class="secno">4.5.12 </span>The <code>figcaption</code> element</a><li><a href="grouping-content.html#the-div-element"><span class="secno">4.5.13 </span>The <code>div</code> element</a></ol></ol></ol></div>
1.12      mike      317: 
1.51      mike      318:   <h3 id="grouping-content"><span class="secno">4.5 </span>Grouping content</h3><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><h4 id="the-p-element"><span class="secno">4.5.1 </span>The <dfn><code>p</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><dl class="element"><dt>Categories</dt>
1.12      mike      319:    <dd><a href="content-models.html#flow-content">Flow content</a>.</dd>
                    320:    <dd><a href="dnd.html#formatblock-candidate"><code title="">formatBlock</code> candidate</a>.</dd>
                    321:    <dt>Contexts in which this element may be used:</dt>
                    322:    <dd>Where <a href="content-models.html#flow-content">flow content</a> is expected.</dd>
                    323:    <dt>Content model:</dt>
                    324:    <dd><a href="content-models.html#phrasing-content">Phrasing content</a>.</dd>
                    325:    <dt>Content attributes:</dt>
                    326:    <dd><a href="elements.html#global-attributes">Global attributes</a></dd>
                    327:    <dt>DOM interface:</dt>
                    328:    <dd>
                    329:     <pre class="idl">interface <dfn id="htmlparagraphelement">HTMLParagraphElement</dfn> : <a href="elements.html#htmlelement">HTMLElement</a> {};</pre>
                    330:    </dd>
1.51      mike      331:   </dl><p>The <code><a href="#the-p-element">p</a></code> element <a class="full-spec-link" href="http://dev.w3.org/html5/spec/rendering.html#represents" title='Read about this "represents" reference in the full HTML5 spec.'>represents</a> a
                    332:   <a href="content-models.html#paragraph">paragraph</a>.<div class="example">
1.12      mike      333:    <p>The following examples are conforming HTML fragments:</p>
                    334:    <pre>&lt;p&gt;The little kitten gently seated himself on a piece of
                    335: carpet. Later in his life, this would be referred to as the time the
                    336: cat sat on the mat.&lt;/p&gt;</pre>
                    337:    <pre>&lt;fieldset&gt;
                    338:  &lt;legend&gt;Personal information&lt;/legend&gt;
                    339:  &lt;p&gt;
                    340:    &lt;label&gt;Name: &lt;input name="n"&gt;&lt;/label&gt;
                    341:    &lt;label&gt;&lt;input name="anon" type="checkbox"&gt; Hide from other users&lt;/label&gt;
                    342:  &lt;/p&gt;
                    343:  &lt;p&gt;&lt;label&gt;Address: &lt;textarea name="a"&gt;&lt;/textarea&gt;&lt;/label&gt;&lt;/p&gt;
                    344: &lt;/fieldset&gt;</pre>
                    345:    <pre>&lt;p&gt;There was once an example from Femley,&lt;br&gt;
                    346: Whose markup was of dubious quality.&lt;br&gt;
                    347: The validator complained,&lt;br&gt;
                    348: So the author was pained,&lt;br&gt;
                    349: To move the error from the markup to the rhyming.&lt;/p&gt;</pre>
                    350:   </div><p>The <code><a href="#the-p-element">p</a></code> element should not be used when a more
1.51      mike      351:   specific element is more appropriate.<div class="example">
1.12      mike      352: 
                    353:    <p>The following example is technically correct:</p>
                    354: 
                    355: <pre>&lt;section&gt;
                    356:  &lt;!-- ... --&gt;
                    357:  &lt;p&gt;Last modified: 2001-04-23&lt;/p&gt;
                    358:  &lt;p&gt;Author: fred@example.com&lt;/p&gt;
                    359: &lt;/section&gt;</pre>
                    360: 
                    361:    <p>However, it would be better marked-up as:</p>
                    362: 
                    363: <pre>&lt;section&gt;
                    364:  &lt;!-- ... --&gt;
                    365:  &lt;footer&gt;Last modified: 2001-04-23&lt;/footer&gt;
                    366:  &lt;address&gt;Author: fred@example.com&lt;/address&gt;
                    367: &lt;/section&gt;</pre>
                    368: 
                    369:    <p>Or:</p>
                    370: 
                    371: <pre>&lt;section&gt;
                    372:  &lt;!-- ... --&gt;
                    373:  &lt;footer&gt;
                    374:   &lt;p&gt;Last modified: 2001-04-23&lt;/p&gt;
                    375:   &lt;address&gt;Author: fred@example.com&lt;/address&gt;
                    376:  &lt;/footer&gt;
                    377: &lt;/section&gt;</pre>
                    378: 
1.51      mike      379:   </div><h4 id="the-hr-element"><span class="secno">4.5.2 </span>The <dfn><code>hr</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><dl class="element"><dt>Categories</dt>
1.12      mike      380:    <dd><a href="content-models.html#flow-content">Flow content</a>.</dd>
                    381:    <dt>Contexts in which this element may be used:</dt>
                    382:    <dd>Where <a href="content-models.html#flow-content">flow content</a> is expected.</dd>
                    383:    <dt>Content model:</dt>
                    384:    <dd>Empty.</dd>
                    385:    <dt>Content attributes:</dt>
                    386:    <dd><a href="elements.html#global-attributes">Global attributes</a></dd>
                    387:    <dt>DOM interface:</dt>
                    388:    <dd>
                    389:     <pre class="idl">interface <dfn id="htmlhrelement">HTMLHRElement</dfn> : <a href="elements.html#htmlelement">HTMLElement</a> {};</pre>
                    390:    </dd>
1.51      mike      391:   </dl><p>The <code><a href="#the-hr-element">hr</a></code> element <a class="full-spec-link" href="http://dev.w3.org/html5/spec/rendering.html#represents" title='Read about this "represents" reference in the full HTML5 spec.'>represents</a> a
1.12      mike      392:   <a href="content-models.html#paragraph">paragraph</a>-level thematic break, e.g. a scene change in
                    393:   a story, or a transition to another topic within a section of a
1.51      mike      394:   reference book.<div class="example">
1.12      mike      395: 
1.33      mike      396:    <p>The following fictional extract from a project manual shows two
                    397:    sections that use the <code><a href="#the-hr-element">hr</a></code> element to separate topics
                    398:    within the section.</p>
                    399: 
                    400:    <pre>&lt;section&gt;
                    401:  &lt;h1&gt;Communication&lt;/h1&gt;
                    402:  &lt;p&gt;There are various methods of communication. This section
                    403:  covers a few of the important ones used by the project.&lt;/p&gt;
                    404:  <strong>&lt;hr&gt;</strong>
                    405:  &lt;p&gt;Communication stones seem to come in pairs and have mysterious
                    406:  properties:&lt;/p&gt;
                    407:  &lt;ul&gt;
                    408:   &lt;li&gt;They can transfer thoughts in two directions once activated
                    409:   if used alone.&lt;/li&gt;
                    410:   &lt;li&gt;If used with another device, they can transfer one's
                    411:   consciousness to another body.&lt;/li&gt;
                    412:   &lt;li&gt;If both stones are used with another device, the
                    413:   consciousnesses switch bodies.&lt;/li&gt;
                    414:  &lt;/ul&gt;
                    415:  <strong>&lt;hr&gt;</strong>
                    416:  &lt;p&gt;Radios use the electromagnetic spectrum in the meter range and
                    417:  longer.&lt;/p&gt;
                    418:  <strong>&lt;hr&gt;</strong>
                    419:  &lt;p&gt;Signal flares use the electromagnetic spectrum in the
                    420:  nanometer range.&lt;/p&gt;
                    421: &lt;/section&gt;
                    422: &lt;section&gt;
                    423:  &lt;h1&gt;Food&lt;/h1&gt;
                    424:  &lt;p&gt;All food at the project is rationed:&lt;/p&gt;
                    425:  &lt;dl&gt;
                    426:   &lt;dt&gt;Potatoes&lt;/dt&gt;
                    427:   &lt;dd&gt;Two per day&lt;/dd&gt;
                    428:   &lt;dt&gt;Soup&lt;/dt&gt;
                    429:   &lt;dd&gt;One bowl per day&lt;/dd&gt;
                    430:  &lt;/dl&gt;
                    431:  <strong>&lt;hr&gt;</strong>
                    432:  &lt;p&gt;Cooking is done by the chefs on a set rotation.&lt;/p&gt;
                    433: &lt;/section&gt;</pre>
                    434: 
                    435:    <p>There is no need for an <code><a href="#the-hr-element">hr</a></code> element between the
                    436:    sections themselves, since the <code><a href="sections.html#the-section-element">section</a></code> elements and
                    437:    the <code><a href="sections.html#the-h1-h2-h3-h4-h5-and-h6-elements">h1</a></code> elements imply thematic changes themselves.</p>
                    438: 
                    439:   </div><div class="example">
                    440: 
1.12      mike      441:    <p>The following extract from <cite>Pandora's Star</cite> by Peter
                    442:    F. Hamilton shows two paragraphs that precede a scene change and
                    443:    the paragraph that follows it. The scene change, represented in the
                    444:    printed book by a gap containing a solitary centered star between
                    445:    the second and third paragraphs, is here represented using the
                    446:    <code><a href="#the-hr-element">hr</a></code> element.</p>
                    447: 
                    448:    <!-- ISBN 1-4050-0020-1; bottom of page 14 -->
                    449: 
                    450:    <pre lang="en-GB">&lt;p&gt;Dudley was ninety-two, in his second life, and fast approaching
                    451: time for another rejuvenation. Despite his body having the physical
                    452: age of a standard fifty-year-old, the prospect of a long degrading
                    453: campaign within academia was one he regarded with dread. For a
                    454: supposedly advanced civilization, the Intersolar Commonwearth could be
                    455: appallingly backward at times, not to mention cruel.&lt;/p&gt;
                    456: &lt;p&gt;&lt;i&gt;Maybe it won't be that bad&lt;/i&gt;, he told himself. The lie was
                    457: comforting enough to get him through the rest of the night's
                    458: shift.&lt;/p&gt;
                    459: <strong>&lt;hr&gt;</strong>
                    460: &lt;p&gt;The Carlton AllLander drove Dudley home just after dawn. Like the
                    461: astronomer, the vehicle was old and worn, but perfectly capable of
                    462: doing its job. It had a cheap diesel engine, common enough on a
                    463: semi-frontier world like Gralmond, although its drive array was a
                    464: thoroughly modern photoneural processor. With its high suspension and
                    465: deep-tread tyres it could plough along the dirt track to the
                    466: observatory in all weather and seasons, including the metre-deep snow
                    467: of Gralmond's winters.&lt;/p&gt;</pre>
                    468: 
1.34      mike      469:   </div><p class="note">The <code><a href="#the-hr-element">hr</a></code> element does not affect the
1.51      mike      470:   document's <a href="sections.html#outline">outline</a>.<h4 id="the-pre-element"><span class="secno">4.5.3 </span>The <dfn><code>pre</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><dl class="element"><dt>Categories</dt>
1.12      mike      471:    <dd><a href="content-models.html#flow-content">Flow content</a>.</dd>
                    472:    <dd><a href="dnd.html#formatblock-candidate"><code title="">formatBlock</code> candidate</a>.</dd>
                    473:    <dt>Contexts in which this element may be used:</dt>
                    474:    <dd>Where <a href="content-models.html#flow-content">flow content</a> is expected.</dd>
                    475:    <dt>Content model:</dt>
                    476:    <dd><a href="content-models.html#phrasing-content">Phrasing content</a>.</dd>
                    477:    <dt>Content attributes:</dt>
                    478:    <dd><a href="elements.html#global-attributes">Global attributes</a></dd>
                    479:    <dt>DOM interface:</dt>
                    480:    <dd>
                    481:     <pre class="idl">interface <dfn id="htmlpreelement">HTMLPreElement</dfn> : <a href="elements.html#htmlelement">HTMLElement</a> {};</pre>
                    482:    </dd>
1.51      mike      483:   </dl><p>The <code><a href="#the-pre-element">pre</a></code> element <a class="full-spec-link" href="http://dev.w3.org/html5/spec/rendering.html#represents" title='Read about this "represents" reference in the full HTML5 spec.'>represents</a> a block of
1.12      mike      484:   preformatted text, in which structure is represented by typographic
1.51      mike      485:   conventions rather than by elements.<p class="note">In <a href="syntax.html#syntax">the HTML syntax</a>, a leading
1.12      mike      486:   newline character immediately following the <code><a href="#the-pre-element">pre</a></code> element
1.51      mike      487:   start tag is stripped.<p>Some examples of cases where the <code><a href="#the-pre-element">pre</a></code> element could
                    488:   be used:<ul><li>Including an e-mail, with paragraphs indicated by blank lines,
1.12      mike      489:    lists indicated by lines prefixed with a bullet, and so on.</li>
                    490: 
                    491:    <li>Including fragments of computer code, with structure indicated
                    492:    according to the conventions of that language.</li>
                    493: 
                    494:    <li>Displaying ASCII art.</li>
                    495: 
                    496:   </ul><p class="note">Authors are encouraged to consider how preformatted
                    497:   text will be experienced when the formatting is lost, as will be the
                    498:   case for users of speech synthesizers, braille displays, and the
                    499:   like. For cases like ASCII art, it is likely that an alternative
                    500:   presentation, such as a textual description, would be more
1.51      mike      501:   universally accessible to the readers of the document.<p>To represent a block of computer code, the <code><a href="#the-pre-element">pre</a></code>
1.12      mike      502:   element can be used with a <code><a href="text-level-semantics.html#the-code-element">code</a></code> element; to represent a
                    503:   block of computer output the <code><a href="#the-pre-element">pre</a></code> element can be used
                    504:   with a <code><a href="text-level-semantics.html#the-samp-element">samp</a></code> element. Similarly, the <code><a href="text-level-semantics.html#the-kbd-element">kbd</a></code>
                    505:   element can be used within a <code><a href="#the-pre-element">pre</a></code> element to indicate
1.51      mike      506:   text that the user is to enter.<div class="example">
1.12      mike      507: 
                    508:    <p>In the following snippet, a sample of computer code is
                    509:    presented.</p>
                    510: 
                    511:    <pre>&lt;p&gt;This is the &lt;code&gt;Panel&lt;/code&gt; constructor:&lt;/p&gt;
                    512: &lt;pre&gt;&lt;code&gt;function Panel(element, canClose, closeHandler) {
                    513:   this.element = element;
                    514:   this.canClose = canClose;
                    515:   this.closeHandler = function () { if (closeHandler) closeHandler() };
                    516: }&lt;/code&gt;&lt;/pre&gt;</pre>
                    517: 
                    518:   </div><div class="example">
                    519: 
                    520:    <p>In the following snippet, <code><a href="text-level-semantics.html#the-samp-element">samp</a></code> and <code><a href="text-level-semantics.html#the-kbd-element">kbd</a></code>
                    521:    elements are mixed in the contents of a <code><a href="#the-pre-element">pre</a></code> element to
                    522:    show a session of Zork I.</p>
                    523: 
                    524:    <pre>&lt;pre&gt;&lt;samp&gt;You are in an open field west of a big white house with a boarded
                    525: front door.
                    526: There is a small mailbox here.
                    527: 
                    528: &gt;&lt;/samp&gt; &lt;kbd&gt;open mailbox&lt;/kbd&gt;
                    529: 
                    530: &lt;samp&gt;Opening the mailbox reveals:
                    531: A leaflet.
                    532: 
                    533: &gt;&lt;/samp&gt;&lt;/pre&gt;</pre>
                    534: 
                    535:   </div><div class="example">
                    536: 
                    537:    <p>The following shows a contemporary poem that uses the
                    538:    <code><a href="#the-pre-element">pre</a></code> element to preserve its unusual formatting, which
                    539:    forms an intrinsic part of the poem itself.</p>
                    540: 
                    541:    <pre>&lt;pre&gt;                maxling
                    542: 
                    543: it is with a          heart
                    544:                heavy
                    545: 
                    546: that i admit loss of a feline
                    547:         so           loved
                    548: 
                    549: a friend lost to the
                    550:         unknown
                    551:                                 (night)
                    552: 
                    553: ~cdr 11dec07&lt;/pre&gt;</pre>
                    554: 
1.51      mike      555:   </div><h4 id="the-blockquote-element"><span class="secno">4.5.4 </span>The <dfn><code>blockquote</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><dl class="element"><dt>Categories</dt>
1.12      mike      556:    <dd><a href="content-models.html#flow-content">Flow content</a>.</dd>
                    557:    <dd><a href="sections.html#sectioning-root">Sectioning root</a>.</dd>
                    558:    <dd><a href="dnd.html#formatblock-candidate"><code title="">formatBlock</code> candidate</a>.</dd>
                    559:    <dt>Contexts in which this element may be used:</dt>
                    560:    <dd>Where <a href="content-models.html#flow-content">flow content</a> is expected.</dd>
                    561:    <dt>Content model:</dt>
                    562:    <dd><a href="content-models.html#flow-content">Flow content</a>.</dd>
                    563:    <dt>Content attributes:</dt>
                    564:    <dd><a href="elements.html#global-attributes">Global attributes</a></dd>
                    565:    <dd><code title="attr-blockquote-cite"><a href="#attr-blockquote-cite">cite</a></code></dd>
                    566:    <dt>DOM interface:</dt>
                    567:    <dd>
                    568: <pre class="idl">interface <dfn id="htmlquoteelement">HTMLQuoteElement</dfn> : <a href="elements.html#htmlelement">HTMLElement</a> {
1.51      mike      569:            attribute DOMString <a class="full-spec-link" href="http://dev.w3.org/html5/spec/grouping-content.html#dom-quote-cite" title='Read about this "cite" reference in the full HTML5 spec.'>cite</a>;
1.12      mike      570: };</pre>
                    571:     <p class="note">The <code><a href="#htmlquoteelement">HTMLQuoteElement</a></code> interface is
                    572:     also used by the <code><a href="text-level-semantics.html#the-q-element">q</a></code> element.</p>
                    573:    </dd>
1.51      mike      574:   </dl><p>The <code><a href="#the-blockquote-element">blockquote</a></code> element <a class="full-spec-link" href="http://dev.w3.org/html5/spec/rendering.html#represents" title='Read about this "represents" reference in the full HTML5 spec.'>represents</a> a
                    575:   section that is quoted from another source.<p>Content inside a <code><a href="#the-blockquote-element">blockquote</a></code> must be quoted from
1.35      mike      576:   another source, whose address, if it has one, may be cited in the
1.12      mike      577:   <dfn id="attr-blockquote-cite" title="attr-blockquote-cite"><code>cite</code></dfn>
1.51      mike      578:   attribute.<p>If the <code title="attr-blockquote-cite"><a href="#attr-blockquote-cite">cite</a></code> attribute
1.32      mike      579:   is present, it must be a <a href="urls.html#valid-url-potentially-surrounded-by-spaces">valid URL potentially surrounded by
1.51      mike      580:   spaces</a>. <div class="example">
1.12      mike      581: 
                    582:    <p>This next example shows the use of <code><a href="text-level-semantics.html#the-cite-element">cite</a></code> alongside
                    583:    <code><a href="#the-blockquote-element">blockquote</a></code>:</p>
                    584: 
                    585:    <pre>&lt;p&gt;His next piece was the aptly named &lt;cite&gt;Sonnet 130&lt;/cite&gt;:&lt;/p&gt;
                    586: &lt;blockquote cite="http://quotes.example.org/s/sonnet130.html"&gt;
                    587:   &lt;p&gt;My mistress' eyes are nothing like the sun,&lt;br&gt;
                    588:   Coral is far more red, than her lips red,&lt;br&gt;
                    589:   ...</pre>
                    590: 
                    591:   </div><div class="example">
                    592: 
                    593:    <p>This example shows how a forum post could use
                    594:    <code><a href="#the-blockquote-element">blockquote</a></code> to show what post a user is replying
                    595:    to. The <code><a href="sections.html#the-article-element">article</a></code> element is used for each post, to mark
                    596:    up the threading.</p>
                    597: 
                    598:    <pre>&lt;article&gt;
                    599:  &lt;h1&gt;&lt;a href="http://bacon.example.com/?blog=109431"&gt;Bacon on a crowbar&lt;/a&gt;&lt;/h1&gt;
                    600:  &lt;article&gt;
                    601:   &lt;header&gt;&lt;strong&gt;t3yw&lt;/strong&gt; 12 points 1 hour ago&lt;/header&gt;
                    602:   &lt;p&gt;I bet a narwhal would love that.&lt;/p&gt;
                    603:   &lt;footer&gt;&lt;a href="?pid=29578"&gt;permalink&lt;/a&gt;&lt;/footer&gt;
                    604:   &lt;article&gt;
                    605:    &lt;header&gt;&lt;strong&gt;greg&lt;/strong&gt; 8 points 1 hour ago&lt;/header&gt;
                    606:    &lt;blockquote&gt;&lt;p&gt;I bet a narwhal would love that.&lt;/p&gt;&lt;/blockquote&gt;
                    607:    &lt;p&gt;Dude narwhals don't eat bacon.&lt;/p&gt;
                    608:    &lt;footer&gt;&lt;a href="?pid=29579"&gt;permalink&lt;/a&gt;&lt;/footer&gt;
                    609:    &lt;article&gt;
                    610:     &lt;header&gt;&lt;strong&gt;t3yw&lt;/strong&gt; 15 points 1 hour ago&lt;/header&gt;
                    611:     &lt;blockquote&gt;
                    612:      &lt;blockquote&gt;&lt;p&gt;I bet a narwhal would love that.&lt;/p&gt;&lt;/blockquote&gt;
                    613:      &lt;p&gt;Dude narwhals don't eat bacon.&lt;/p&gt;
                    614:     &lt;/blockquote&gt;
                    615:     &lt;p&gt;Next thing you'll be saying they don't get capes and wizard
                    616:     hats either!&lt;/p&gt;
                    617:     &lt;footer&gt;&lt;a href="?pid=29580"&gt;permalink&lt;/a&gt;&lt;/footer&gt;
                    618:     &lt;article&gt;
                    619:      &lt;article&gt;
                    620:       &lt;header&gt;&lt;strong&gt;boing&lt;/strong&gt; -5 points 1 hour ago&lt;/header&gt;
                    621:       &lt;p&gt;narwhals are worse than ceiling cat&lt;/p&gt;
                    622:       &lt;footer&gt;&lt;a href="?pid=29581"&gt;permalink&lt;/a&gt;&lt;/footer&gt;
                    623:      &lt;/article&gt;
                    624:     &lt;/article&gt;
                    625:    &lt;/article&gt;
                    626:   &lt;/article&gt;
                    627:   &lt;article&gt;
                    628:    &lt;header&gt;&lt;strong&gt;fred&lt;/strong&gt; 1 points 23 minutes ago&lt;/header&gt;
                    629:    &lt;blockquote&gt;&lt;p&gt;I bet a narwhal would love that.&lt;/p&gt;&lt;/blockquote&gt;
                    630:    &lt;p&gt;I bet they'd love to peel a banana too.&lt;/p&gt;
                    631:    &lt;footer&gt;&lt;a href="?pid=29582"&gt;permalink&lt;/a&gt;&lt;/footer&gt;
                    632:   &lt;/article&gt;
                    633:  &lt;/article&gt;
                    634: &lt;/article&gt;</pre>
                    635: 
1.16      mike      636:   </div><p class="note"><a href="links.html#conversations">Examples of how to
1.12      mike      637:   represent a conversation</a> are shown in a later section; it is not
                    638:   appropriate to use the <code><a href="text-level-semantics.html#the-cite-element">cite</a></code> and <code><a href="#the-blockquote-element">blockquote</a></code>
1.51      mike      639:   elements for this purpose.<h4 id="the-ol-element"><span class="secno">4.5.5 </span>The <dfn><code>ol</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><dl class="element"><dt>Categories</dt>
1.12      mike      640:    <dd><a href="content-models.html#flow-content">Flow content</a>.</dd>
                    641:    <dt>Contexts in which this element may be used:</dt>
                    642:    <dd>Where <a href="content-models.html#flow-content">flow content</a> is expected.</dd>
                    643:    <dt>Content model:</dt>
                    644:    <dd>Zero or more <code><a href="#the-li-element">li</a></code> elements.</dd>
                    645:    <dt>Content attributes:</dt>
                    646:    <dd><a href="elements.html#global-attributes">Global attributes</a></dd>
                    647:    <dd><code title="attr-ol-reversed"><a href="#attr-ol-reversed">reversed</a></code></dd>
                    648:    <dd><code title="attr-ol-start"><a href="#attr-ol-start">start</a></code></dd>
                    649:    <dt>DOM interface:</dt>
                    650:    <dd>
                    651: <pre class="idl">interface <dfn id="htmlolistelement">HTMLOListElement</dfn> : <a href="elements.html#htmlelement">HTMLElement</a> {
1.51      mike      652:            attribute boolean <a class="full-spec-link" href="http://dev.w3.org/html5/spec/grouping-content.html#dom-ol-reversed" title='Read about this "reversed" reference in the full HTML5 spec.'>reversed</a>;
                    653:            attribute long <a class="full-spec-link" href="http://dev.w3.org/html5/spec/grouping-content.html#dom-ol-start" title='Read about this "start" reference in the full HTML5 spec.'>start</a>;
1.12      mike      654: };</pre>
                    655:    </dd>
1.51      mike      656:   </dl><p>The <code><a href="#the-ol-element">ol</a></code> element <a class="full-spec-link" href="http://dev.w3.org/html5/spec/rendering.html#represents" title='Read about this "represents" reference in the full HTML5 spec.'>represents</a> a list of
1.12      mike      657:   items, where the items have been intentionally ordered, such that
1.51      mike      658:   changing the order would change the meaning of the document.<p>The items of the list are the <code><a href="#the-li-element">li</a></code> element child nodes
                    659:   of the <code><a href="#the-ol-element">ol</a></code> element, in <a href="infrastructure.html#tree-order">tree order</a>.<p>The <dfn id="attr-ol-reversed" title="attr-ol-reversed"><code>reversed</code></dfn>
1.12      mike      660:   attribute is a <a href="common-microsyntaxes.html#boolean-attribute">boolean attribute</a>. If present, it
                    661:   indicates that the list is a descending list (..., 3, 2, 1). If the
                    662:   attribute is omitted, the list is an ascending list (1, 2, 3,
1.51      mike      663:   ...).<p>The <dfn id="attr-ol-start" title="attr-ol-start"><code>start</code></dfn>
1.12      mike      664:   attribute, if present, must be a <a href="common-microsyntaxes.html#valid-integer">valid integer</a> giving
                    665:   the ordinal value of the first list item.</p><!-- v2: resuming numbering of lists from previous lists? --><div class="example">
                    666: 
                    667:    <p>The following markup shows a list where the order matters, and
                    668:    where the <code><a href="#the-ol-element">ol</a></code> element is therefore appropriate. Compare
                    669:    this list to the equivalent list in the <code><a href="#the-ul-element">ul</a></code> section to
                    670:    see an example of the same items using the <code><a href="#the-ul-element">ul</a></code>
                    671:    element.</p>
                    672: 
                    673:    <pre>&lt;p&gt;I have lived in the following countries (given in the order of when
                    674: I first lived there):&lt;/p&gt;
                    675: &lt;ol&gt;
                    676:  &lt;li&gt;Switzerland
                    677:  &lt;li&gt;United Kingdom
                    678:  &lt;li&gt;United States
                    679:  &lt;li&gt;Norway
                    680: &lt;/ol&gt;</pre>
                    681: 
                    682:    <p>Note how changing the order of the list changes the meaning of
                    683:    the document. In the following example, changing the relative order
                    684:    of the first two items has changed the birthplace of the
                    685:    author:</p>
                    686: 
                    687:    <pre>&lt;p&gt;I have lived in the following countries (given in the order of when
                    688: I first lived there):&lt;/p&gt;
                    689: &lt;ol&gt;
                    690:  &lt;li&gt;United Kingdom
                    691:  &lt;li&gt;Switzerland
                    692:  &lt;li&gt;United States
                    693:  &lt;li&gt;Norway
                    694: &lt;/ol&gt;</pre>
                    695: 
1.51      mike      696:   </div><h4 id="the-ul-element"><span class="secno">4.5.6 </span>The <dfn><code>ul</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><dl class="element"><dt>Categories</dt>
1.12      mike      697:    <dd><a href="content-models.html#flow-content">Flow content</a>.</dd>
                    698:    <dt>Contexts in which this element may be used:</dt>
                    699:    <dd>Where <a href="content-models.html#flow-content">flow content</a> is expected.</dd>
                    700:    <dt>Content model:</dt>
                    701:    <dd>Zero or more <code><a href="#the-li-element">li</a></code> elements.</dd>
                    702:    <dt>Content attributes:</dt>
                    703:    <dd><a href="elements.html#global-attributes">Global attributes</a></dd>
                    704:    <dt>DOM interface:</dt>
                    705:    <dd>
                    706:     <pre class="idl">interface <dfn id="htmlulistelement">HTMLUListElement</dfn> : <a href="elements.html#htmlelement">HTMLElement</a> {};</pre>
                    707:    </dd>
1.51      mike      708:   </dl><p>The <code><a href="#the-ul-element">ul</a></code> element <a class="full-spec-link" href="http://dev.w3.org/html5/spec/rendering.html#represents" title='Read about this "represents" reference in the full HTML5 spec.'>represents</a> a list of
                    709:   items, where the order of the items is not important &mdash; that
1.12      mike      710:   is, where changing the order would not materially change the meaning
1.51      mike      711:   of the document.<p>The items of the list are the <code><a href="#the-li-element">li</a></code> element child nodes
                    712:   of the <code><a href="#the-ul-element">ul</a></code> element.<div class="example">
1.12      mike      713: 
                    714:    <p>The following markup shows a list where the order does not
                    715:    matter, and where the <code><a href="#the-ul-element">ul</a></code> element is therefore
                    716:    appropriate. Compare this list to the equivalent list in the
                    717:    <code><a href="#the-ol-element">ol</a></code> section to see an example of the same items using
                    718:    the <code><a href="#the-ol-element">ol</a></code> element.</p>
                    719: 
                    720:    <pre>&lt;p&gt;I have lived in the following countries:&lt;/p&gt;
                    721: &lt;ul&gt;
                    722:  &lt;li&gt;Norway
                    723:  &lt;li&gt;Switzerland
                    724:  &lt;li&gt;United Kingdom
                    725:  &lt;li&gt;United States
                    726: &lt;/ul&gt;</pre>
                    727: 
                    728:    <p>Note that changing the order of the list does not change the
                    729:    meaning of the document. The items in the snippet above are given
                    730:    in alphabetical order, but in the snippet below they are given in
                    731:    order of the size of their current account balance in 2007, without
                    732:    changing the meaning of the document whatsoever:</p>
                    733: 
                    734:    <pre>&lt;p&gt;I have lived in the following countries:&lt;/p&gt;
                    735: &lt;ul&gt;
                    736:  &lt;li&gt;Switzerland
                    737:  &lt;li&gt;Norway
                    738:  &lt;li&gt;United Kingdom
                    739:  &lt;li&gt;United States
                    740: &lt;/ul&gt;</pre>
                    741: 
1.51      mike      742:   </div><h4 id="the-li-element"><span class="secno">4.5.7 </span>The <dfn><code>li</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><dl class="element"><dt>Categories</dt>
1.12      mike      743:    <dd>None.</dd>
                    744:    <dt>Contexts in which this element may be used:</dt>
                    745:    <dd>Inside <code><a href="#the-ol-element">ol</a></code> elements.</dd>
                    746:    <dd>Inside <code><a href="#the-ul-element">ul</a></code> elements.</dd>
                    747:    <dd>Inside <code><a href="interactive-elements.html#menus">menu</a></code> elements.</dd>
                    748:    <dt>Content model:</dt>
                    749:    <dd><a href="content-models.html#flow-content">Flow content</a>.</dd>
                    750:    <dt>Content attributes:</dt>
                    751:    <dd><a href="elements.html#global-attributes">Global attributes</a></dd>
                    752:    <dd>If the element is a child of an <code><a href="#the-ol-element">ol</a></code> element: <code title="attr-li-value"><a href="#attr-li-value">value</a></code></dd>
                    753:    <dt>DOM interface:</dt>
                    754:    <dd>
                    755: <pre class="idl">interface <dfn id="htmllielement">HTMLLIElement</dfn> : <a href="elements.html#htmlelement">HTMLElement</a> {
1.51      mike      756:            attribute long <a class="full-spec-link" href="http://dev.w3.org/html5/spec/grouping-content.html#dom-li-value" title='Read about this "value" reference in the full HTML5 spec.'>value</a>;
1.12      mike      757: };</pre>
                    758:    </dd>
1.51      mike      759:   </dl><p>The <code><a href="#the-li-element">li</a></code> element <a class="full-spec-link" href="http://dev.w3.org/html5/spec/rendering.html#represents" title='Read about this "represents" reference in the full HTML5 spec.'>represents</a> a list
1.12      mike      760:   item. If its parent element is an <code><a href="#the-ol-element">ol</a></code>, <code><a href="#the-ul-element">ul</a></code>,
                    761:   or <code><a href="interactive-elements.html#menus">menu</a></code> element, then the element is an item of the
                    762:   parent element's list, as defined for those elements. Otherwise, the
                    763:   list item has no defined list-related relationship to any other
1.51      mike      764:   <code><a href="#the-li-element">li</a></code> element.<p>The <dfn id="attr-li-value" title="attr-li-value"><code>value</code></dfn>
1.12      mike      765:   attribute, if present, must be a <a href="common-microsyntaxes.html#valid-integer">valid integer</a> giving
1.51      mike      766:   the ordinal value of the list item.<div class="example">
1.12      mike      767:    <p>The following example, the top ten movies are listed (in reverse
                    768:    order). Note the way the list is given a title by using a
1.17      mike      769:    <code><a href="#the-figure-element">figure</a></code> element and its <code><a href="#the-figcaption-element">figcaption</a></code>
1.14      mike      770:    element.</p>
1.12      mike      771:    <pre>&lt;figure&gt;
1.14      mike      772:  &lt;figcaption&gt;The top 10 movies of all time&lt;/figcaption&gt;
                    773:  &lt;ol&gt;
                    774:   &lt;li value="10"&gt;&lt;cite&gt;Josie and the Pussycats&lt;/cite&gt;, 2001&lt;/li&gt;
1.58      mike      775:   &lt;li value="9"&gt;&lt;cite lang="sh"&gt;&#1062;&#1088;&#1085;&#1072; &#1084;&#1072;&#1095;&#1082;&#1072;, &#1073;&#1077;&#1083;&#1080; &#1084;&#1072;&#1095;&#1086;&#1088;&lt;/cite&gt;, 1998&lt;/li&gt;
1.14      mike      776:   &lt;li value="8"&gt;&lt;cite&gt;A Bug's Life&lt;/cite&gt;, 1998&lt;/li&gt;
                    777:   &lt;li value="7"&gt;&lt;cite&gt;Toy Story&lt;/cite&gt;, 1995&lt;/li&gt;
                    778:   &lt;li value="6"&gt;&lt;cite&gt;Monsters, Inc&lt;/cite&gt;, 2001&lt;/li&gt;
                    779:   &lt;li value="5"&gt;&lt;cite&gt;Cars&lt;/cite&gt;, 2006&lt;/li&gt;
                    780:   &lt;li value="4"&gt;&lt;cite&gt;Toy Story 2&lt;/cite&gt;, 1999&lt;/li&gt;
                    781:   &lt;li value="3"&gt;&lt;cite&gt;Finding Nemo&lt;/cite&gt;, 2003&lt;/li&gt;
                    782:   &lt;li value="2"&gt;&lt;cite&gt;The Incredibles&lt;/cite&gt;, 2004&lt;/li&gt;
                    783:   &lt;li value="1"&gt;&lt;cite&gt;Ratatouille&lt;/cite&gt;, 2007&lt;/li&gt;
                    784:  &lt;/ol&gt;
1.12      mike      785: &lt;/figure&gt;</pre>
                    786: 
                    787:    <p>The markup could also be written as follows, using the <code title="attr-ol-reversed"><a href="#attr-ol-reversed">reversed</a></code> attribute on the
                    788:    <code><a href="#the-ol-element">ol</a></code> element:</p>
                    789: 
                    790:    <pre>&lt;figure&gt;
1.14      mike      791:  &lt;figcaption&gt;The top 10 movies of all time&lt;/figcaption&gt;
                    792:  &lt;ol reversed&gt;
                    793:   &lt;li&gt;&lt;cite&gt;Josie and the Pussycats&lt;/cite&gt;, 2001&lt;/li&gt;
1.58      mike      794:   &lt;li&gt;&lt;cite lang="sh"&gt;&#1062;&#1088;&#1085;&#1072; &#1084;&#1072;&#1095;&#1082;&#1072;, &#1073;&#1077;&#1083;&#1080; &#1084;&#1072;&#1095;&#1086;&#1088;&lt;/cite&gt;, 1998&lt;/li&gt;
1.14      mike      795:   &lt;li&gt;&lt;cite&gt;A Bug's Life&lt;/cite&gt;, 1998&lt;/li&gt;
                    796:   &lt;li&gt;&lt;cite&gt;Toy Story&lt;/cite&gt;, 1995&lt;/li&gt;
                    797:   &lt;li&gt;&lt;cite&gt;Monsters, Inc&lt;/cite&gt;, 2001&lt;/li&gt;
                    798:   &lt;li&gt;&lt;cite&gt;Cars&lt;/cite&gt;, 2006&lt;/li&gt;
                    799:   &lt;li&gt;&lt;cite&gt;Toy Story 2&lt;/cite&gt;, 1999&lt;/li&gt;
                    800:   &lt;li&gt;&lt;cite&gt;Finding Nemo&lt;/cite&gt;, 2003&lt;/li&gt;
                    801:   &lt;li&gt;&lt;cite&gt;The Incredibles&lt;/cite&gt;, 2004&lt;/li&gt;
                    802:   &lt;li&gt;&lt;cite&gt;Ratatouille&lt;/cite&gt;, 2007&lt;/li&gt;
                    803:  &lt;/ol&gt;
1.12      mike      804: &lt;/figure&gt;</pre>
                    805:   </div><p class="note">If the <code><a href="#the-li-element">li</a></code> element is the child of a
                    806:   <code><a href="interactive-elements.html#menus">menu</a></code> element and itself has a child that defines a
                    807:   <a href="commands.html#concept-command" title="concept-command">command</a>, then the
1.51      mike      808:   <code><a href="#the-li-element">li</a></code> element will match the <code title="selector-enabled"><a class="full-spec-link" href="http://dev.w3.org/html5/spec/links.html#selector-enabled" title='Read about this ":enabled" reference in the full HTML5 spec.'>:enabled</a></code> and <code title="selector-disabled"><a class="full-spec-link" href="http://dev.w3.org/html5/spec/links.html#selector-disabled" title='Read about this ":disabled" reference in the full HTML5 spec.'>:disabled</a></code> pseudo-classes in the
                    809:   same way as the first such child element does.<h4 id="the-dl-element"><span class="secno">4.5.8 </span>The <dfn><code>dl</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><dl class="element"><dt>Categories</dt>
1.12      mike      810:    <dd><a href="content-models.html#flow-content">Flow content</a>.</dd>
                    811:    <dt>Contexts in which this element may be used:</dt>
                    812:    <dd>Where <a href="content-models.html#flow-content">flow content</a> is expected.</dd>
                    813:    <dt>Content model:</dt>
                    814:    <dd>Zero or more groups each consisting of one or more
                    815:    <code><a href="#the-dt-element">dt</a></code> elements followed by one or more <code><a href="#the-dd-element">dd</a></code>
                    816:    elements.</dd>
                    817:    <dt>Content attributes:</dt>
                    818:    <dd><a href="elements.html#global-attributes">Global attributes</a></dd>
                    819:    <dt>DOM interface:</dt>
                    820:    <dd>
                    821:     <pre class="idl">interface <dfn id="htmldlistelement">HTMLDListElement</dfn> : <a href="elements.html#htmlelement">HTMLElement</a> {};</pre>
                    822:    </dd>
1.51      mike      823:   </dl><p>The <code><a href="#the-dl-element">dl</a></code> element <a class="full-spec-link" href="http://dev.w3.org/html5/spec/rendering.html#represents" title='Read about this "represents" reference in the full HTML5 spec.'>represents</a> an
1.12      mike      824:   association list consisting of zero or more name-value groups (a
                    825:   description list). Each group must consist of one or more names
                    826:   (<code><a href="#the-dt-element">dt</a></code> elements) followed by one or more values
                    827:   (<code><a href="#the-dd-element">dd</a></code> elements). Within a single <code><a href="#the-dl-element">dl</a></code> element,
                    828:   there should not be more than one <code><a href="#the-dt-element">dt</a></code> element for each
1.51      mike      829:   name.<p>Name-value groups may be terms and definitions, metadata topics
                    830:   and values, or any other groups of name-value data.<p>The values within a group are alternatives; multiple paragraphs
1.12      mike      831:   forming part of the same value must all be given within the same
1.51      mike      832:   <code><a href="#the-dd-element">dd</a></code> element.<p>The order of the list of groups, and of the names and values
                    833:   within each group, may be significant.<div class="example">
1.12      mike      834:    <p>In the following example, one entry ("Authors") is linked to two
                    835:    values ("John" and "Luke").</p>
                    836:    <pre>&lt;dl&gt;
                    837:  &lt;dt&gt; Authors
                    838:  &lt;dd&gt; John
                    839:  &lt;dd&gt; Luke
                    840:  &lt;dt&gt; Editor
                    841:  &lt;dd&gt; Frank
                    842: &lt;/dl&gt;</pre>
                    843:   </div><div class="example">
                    844:    <p>In the following example, one definition is linked to two
                    845:    terms.</p>
                    846:    <pre>&lt;dl&gt;
                    847:  &lt;dt lang="en-US"&gt; &lt;dfn&gt;color&lt;/dfn&gt; &lt;/dt&gt;
                    848:  &lt;dt lang="en-GB"&gt; &lt;dfn&gt;colour&lt;/dfn&gt; &lt;/dt&gt;
                    849:  &lt;dd&gt; A sensation which (in humans) derives from the ability of
                    850:  the fine structure of the eye to distinguish three differently
                    851:  filtered analyses of a view. &lt;/dd&gt;
                    852: &lt;/dl&gt;</pre>
                    853:   </div><div class="example">
                    854:    <p>The following example illustrates the use of the <code><a href="#the-dl-element">dl</a></code>
                    855:    element to mark up metadata of sorts. At the end of the example,
                    856:    one group has two metadata labels ("Authors" and "Editors") and two
                    857:    values ("Robert Rothman" and "Daniel Jackson").</p>
                    858:    <pre>&lt;dl&gt;
                    859:  &lt;dt&gt; Last modified time &lt;/dt&gt;
                    860:  &lt;dd&gt; 2004-12-23T23:33Z &lt;/dd&gt;
                    861:  &lt;dt&gt; Recommended update interval &lt;/dt&gt;
                    862:  &lt;dd&gt; 60s &lt;/dd&gt;
                    863:  &lt;dt&gt; Authors &lt;/dt&gt;
                    864:  &lt;dt&gt; Editors &lt;/dt&gt;
                    865:  &lt;dd&gt; Robert Rothman &lt;/dd&gt;
                    866:  &lt;dd&gt; Daniel Jackson &lt;/dd&gt;
                    867: &lt;/dl&gt;</pre>
                    868:   </div><div class="example">
                    869: 
                    870:    <p>The following example shows the <code><a href="#the-dl-element">dl</a></code> element used to
                    871:    give a set of instructions. The order of the instructions here is
                    872:    important (in the other examples, the order of the blocks was not
                    873:    important).</p>
                    874: 
                    875:    <pre>&lt;p&gt;Determine the victory points as follows (use the
                    876: first matching case):&lt;/p&gt;
                    877: &lt;dl&gt;
                    878:  &lt;dt&gt; If you have exactly five gold coins &lt;/dt&gt;
                    879:  &lt;dd&gt; You get five victory points &lt;/dd&gt;
                    880:  &lt;dt&gt; If you have one or more gold coins, and you have one or more silver coins &lt;/dt&gt;
                    881:  &lt;dd&gt; You get two victory points &lt;/dd&gt;
                    882:  &lt;dt&gt; If you have one or more silver coins &lt;/dt&gt;
                    883:  &lt;dd&gt; You get one victory point &lt;/dd&gt;
                    884:  &lt;dt&gt; Otherwise &lt;/dt&gt;
                    885:  &lt;dd&gt; You get no victory points &lt;/dd&gt;
                    886: &lt;/dl&gt;</pre>
                    887:   </div><div class="example">
                    888:    <p>The following snippet shows a <code><a href="#the-dl-element">dl</a></code> element being used
                    889:    as a glossary. Note the use of <code><a href="text-level-semantics.html#the-dfn-element">dfn</a></code> to indicate the
                    890:    word being defined.</p>
                    891:    <pre>&lt;dl&gt;
                    892:  &lt;dt&gt;&lt;dfn&gt;Apartment&lt;/dfn&gt;, n.&lt;/dt&gt;
                    893:  &lt;dd&gt;An execution context grouping one or more threads with one or
                    894:  more COM objects.&lt;/dd&gt;
                    895:  &lt;dt&gt;&lt;dfn&gt;Flat&lt;/dfn&gt;, n.&lt;/dt&gt;
                    896:  &lt;dd&gt;A deflated tire.&lt;/dd&gt;
                    897:  &lt;dt&gt;&lt;dfn&gt;Home&lt;/dfn&gt;, n.&lt;/dt&gt;
                    898:  &lt;dd&gt;The user's login directory.&lt;/dd&gt;
                    899: &lt;/dl&gt;</pre>
                    900:   </div><p class="note">The <code><a href="#the-dl-element">dl</a></code> element is inappropriate for
1.16      mike      901:   marking up dialogue. <a href="links.html#conversations">Examples of how to
1.51      mike      902:   mark up dialogue</a> are shown below.<h4 id="the-dt-element"><span class="secno">4.5.9 </span>The <dfn><code>dt</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><dl class="element"><dt>Categories</dt>
1.12      mike      903:    <dd>None.</dd>
                    904:    <dt>Contexts in which this element may be used:</dt>
                    905:    <dd>Before <code><a href="#the-dd-element">dd</a></code> or <code><a href="#the-dt-element">dt</a></code> elements inside <code><a href="#the-dl-element">dl</a></code> elements.</dd>
                    906:    <dt>Content model:</dt>
1.31      mike      907:    <dd><a href="content-models.html#phrasing-content">Phrasing content</a>.</dd>
1.12      mike      908:    <dt>Content attributes:</dt>
                    909:    <dd><a href="elements.html#global-attributes">Global attributes</a></dd>
                    910:    <dt>DOM interface:</dt>
                    911:    <dd>Uses <code><a href="elements.html#htmlelement">HTMLElement</a></code>.</dd>
1.51      mike      912:   </dl><p>The <code><a href="#the-dt-element">dt</a></code> element <a class="full-spec-link" href="http://dev.w3.org/html5/spec/rendering.html#represents" title='Read about this "represents" reference in the full HTML5 spec.'>represents</a> the term, or
1.14      mike      913:   name, part of a term-description group in a description list
1.51      mike      914:   (<code><a href="#the-dl-element">dl</a></code> element).<p class="note">The <code><a href="#the-dt-element">dt</a></code> element itself, when used in a
1.12      mike      915:   <code><a href="#the-dl-element">dl</a></code> element, does not indicate that its contents are a
                    916:   term being defined, but this can be indicated using the
1.51      mike      917:   <code><a href="text-level-semantics.html#the-dfn-element">dfn</a></code> element.<div class="example">
1.23      mike      918: 
                    919:    <p>This example shows a list of frequently asked questions (a FAQ)
                    920:    marked up using the <code><a href="#the-dt-element">dt</a></code> element for questions and the
                    921:    <code><a href="#the-dd-element">dd</a></code> element for answers.</p>
                    922: 
                    923:    <pre>&lt;article&gt;
                    924:  &lt;h1&gt;FAQ&lt;/h1&gt;
                    925:  &lt;dl&gt;
                    926:   &lt;dt&gt;What do we want?&lt;/dt&gt;
                    927:   &lt;dd&gt;Our data.&lt;/dd&gt;
                    928:   &lt;dt&gt;When do we want it?&lt;/dt&gt;
                    929:   &lt;dd&gt;Now.&lt;/dd&gt;
                    930:   &lt;dt&gt;Where is it?&lt;/dt&gt;
                    931:   &lt;dd&gt;We are not sure.&lt;/dd&gt;
                    932:  &lt;/dl&gt;
                    933: &lt;/article&gt;</pre>
                    934: 
1.51      mike      935:   </div><h4 id="the-dd-element"><span class="secno">4.5.10 </span>The <dfn><code>dd</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><dl class="element"><dt>Categories</dt>
1.12      mike      936:    <dd>None.</dd>
                    937:    <dt>Contexts in which this element may be used:</dt>
                    938:    <dd>After <code><a href="#the-dt-element">dt</a></code> or <code><a href="#the-dd-element">dd</a></code> elements inside <code><a href="#the-dl-element">dl</a></code> elements.</dd>
                    939:    <dt>Content model:</dt>
                    940:    <dd><a href="content-models.html#flow-content">Flow content</a>.</dd>
                    941:    <dt>Content attributes:</dt>
                    942:    <dd><a href="elements.html#global-attributes">Global attributes</a></dd>
                    943:    <dt>DOM interface:</dt>
                    944:    <dd>Uses <code><a href="elements.html#htmlelement">HTMLElement</a></code>.</dd>
1.51      mike      945:   </dl><p>The <code><a href="#the-dd-element">dd</a></code> element <a class="full-spec-link" href="http://dev.w3.org/html5/spec/rendering.html#represents" title='Read about this "represents" reference in the full HTML5 spec.'>represents</a> the
1.12      mike      946:   description, definition, or value, part of a term-description group
1.51      mike      947:   in a description list (<code><a href="#the-dl-element">dl</a></code> element).<div class="example">
1.12      mike      948: 
                    949:    <p>A <code><a href="#the-dl-element">dl</a></code> can be used to define a vocabulary list, like
                    950:    in a dictionary. In the following example, each entry, given by a
                    951:    <code><a href="#the-dt-element">dt</a></code> with a <code><a href="text-level-semantics.html#the-dfn-element">dfn</a></code>, has several
                    952:    <code><a href="#the-dd-element">dd</a></code>s, showing the various parts of the definition.</p>
                    953: 
                    954:    <!-- the actual pronunciations below are nonsense. -->
                    955:    <pre>&lt;dl&gt;
                    956:  &lt;dt&gt;&lt;dfn&gt;happiness&lt;/dfn&gt;&lt;/dt&gt;
1.51      mike      957:  &lt;dd class="pronunciation"&gt;/'h&aelig; p. nes/&lt;/dd&gt;
1.12      mike      958:  &lt;dd class="part-of-speech"&gt;&lt;i&gt;&lt;abbr&gt;n.&lt;/abbr&gt;&lt;/i&gt;&lt;/dd&gt;
                    959:  &lt;dd&gt;The state of being happy.&lt;/dd&gt;
                    960:  &lt;dd&gt;Good fortune; success. &lt;q&gt;Oh &lt;b&gt;happiness&lt;/b&gt;! It worked!&lt;/q&gt;&lt;/dd&gt;
                    961:  &lt;dt&gt;&lt;dfn&gt;rejoice&lt;/dfn&gt;&lt;/dt&gt;
                    962:  &lt;dd class="pronunciation"&gt;/ri jois'/&lt;/dd&gt;
                    963:  &lt;dd&gt;&lt;i class="part-of-speech"&gt;&lt;abbr&gt;v.intr.&lt;/abbr&gt;&lt;/i&gt; To be delighted oneself.&lt;/dd&gt;
                    964:  &lt;dd&gt;&lt;i class="part-of-speech"&gt;&lt;abbr&gt;v.tr.&lt;/abbr&gt;&lt;/i&gt; To cause one to be delighted.&lt;/dd&gt;
                    965: &lt;/dl&gt;</pre>
1.51      mike      966:   </div><h4 id="the-figure-element"><span class="secno">4.5.11 </span>The <dfn><code>figure</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><dl class="element"><dt>Categories</dt>
1.17      mike      967:    <dd><a href="content-models.html#flow-content">Flow content</a>.</dd>
                    968:    <dd><a href="sections.html#sectioning-root">Sectioning root</a>.</dd>
                    969:    <dt>Contexts in which this element may be used:</dt>
                    970:    <dd>Where <a href="content-models.html#flow-content">flow content</a> is expected.</dd>
                    971:    <dt>Content model:</dt>
1.19      mike      972:    <dd>Either: One <code><a href="#the-figcaption-element">figcaption</a></code> element followed by <a href="content-models.html#flow-content">flow content</a>.</dd>
                    973:    <dd>Or: <a href="content-models.html#flow-content">Flow content</a> followed by one <code><a href="#the-figcaption-element">figcaption</a></code> element.</dd>
                    974:    <dd>Or: <a href="content-models.html#flow-content">Flow content</a>.</dd>
1.17      mike      975:    <dt>Content attributes:</dt>
                    976:    <dd><a href="elements.html#global-attributes">Global attributes</a></dd>
                    977:    <dt>DOM interface:</dt>
                    978:    <dd>Uses <code><a href="elements.html#htmlelement">HTMLElement</a></code>.</dd>
1.51      mike      979:   </dl><!-- v2: Add a <credit> element for photo credits --><p>The <code><a href="#the-figure-element">figure</a></code> element <a class="full-spec-link" href="http://dev.w3.org/html5/spec/rendering.html#represents" title='Read about this "represents" reference in the full HTML5 spec.'>represents</a> some
1.17      mike      980:   <a href="content-models.html#flow-content">flow content</a>, optionally with a caption, that is
                    981:   self-contained and is typically referenced as a single unit from the
1.51      mike      982:   main flow of the document.<p>The element can thus be used to annotate illustrations, diagrams,
1.17      mike      983:   photos, code listings, etc, that are referred to from the main
                    984:   content of the document, but that could, without affecting the flow
                    985:   of the document, be moved away from that primary content, e.g. to
1.51      mike      986:   the side of the page, to dedicated pages, or to an appendix.<p>The  <code><a href="#the-figcaption-element">figcaption</a></code>
1.17      mike      987:   element child of the element, if any, represents the caption of the
                    988:   <code><a href="#the-figure-element">figure</a></code> element's contents. If there is no child
1.51      mike      989:   <code><a href="#the-figcaption-element">figcaption</a></code> element, then there is no caption.<div class="example">
1.17      mike      990: 
                    991:    <p>This example shows the <code><a href="#the-figure-element">figure</a></code> element to mark up a
                    992:    code listing.</p>
                    993: 
                    994:    <pre>&lt;p&gt;In &lt;a href="#l4"&gt;listing 4&lt;/a&gt; we see the primary core interface
                    995: API declaration.&lt;/p&gt;
                    996: &lt;figure id="l4"&gt;
                    997:  &lt;figcaption&gt;Listing 4. The primary core interface API declaration.&lt;/figcaption&gt;
                    998:  &lt;pre&gt;&lt;code&gt;interface PrimaryCore {
                    999:  boolean verifyDataLine();
                   1000:  void sendData(in sequence&amp;lt;byte&gt; data);
                   1001:  void initSelfDestruct();
                   1002: }&lt;/code&gt;&lt;/pre&gt;
                   1003: &lt;/figure&gt;
                   1004: &lt;p&gt;The API is designed to use UTF-8.&lt;/p&gt;</pre>
                   1005: 
                   1006:   </div><div class="example">
                   1007: 
                   1008:    <p>Here we see a <code><a href="#the-figure-element">figure</a></code> element to mark up a
                   1009:    photo.</p>
                   1010: 
                   1011:    <pre>&lt;figure&gt;
                   1012:  &lt;img src="bubbles-work.jpeg"
                   1013:       alt="Bubbles, sitting in his office chair, works on his
                   1014:            latest project intently."&gt;
                   1015:  &lt;figcaption&gt;Bubbles at work&lt;/figcaption&gt;
                   1016: &lt;/figure&gt;</pre>
                   1017: 
                   1018:   </div><div class="example">
                   1019: 
                   1020:    <p>In this example, we see an image that is <em>not</em>
                   1021:    a figure, as well as an image and a video that are.</p>
                   1022: 
                   1023:    <pre>&lt;h2&gt;Malinko's comics&lt;/h2&gt;
                   1024: 
                   1025: &lt;p&gt;This case centered on some sort of "intellectual property"
                   1026: infringement related to a comic (see Exhibit A). The suit started
                   1027: after a trailer ending with these words:
                   1028: 
                   1029: &lt;blockquote&gt;
                   1030:  &lt;img src="promblem-packed-action.png" alt="ROUGH COPY! Promblem-Packed Action!"&gt;
                   1031: &lt;/blockquote&gt;
                   1032: 
                   1033: &lt;p&gt;...was aired. A lawyer, armed with a Bigger Notebook, launched a
                   1034: preemptive strike using snowballs. A complete copy of the trailer is
                   1035: included with Exhibit B.
                   1036: 
                   1037: &lt;figure&gt;
                   1038:  &lt;img src="ex-a.png" alt="Two squiggles on a dirty piece of paper."&gt;
                   1039:  &lt;figcaption&gt;Exhibit A. The alleged &lt;cite&gt;rough copy&lt;/cite&gt; comic.&lt;/figcaption&gt;
                   1040: &lt;/figure&gt;
                   1041: 
                   1042: &lt;figure&gt;
                   1043:  &lt;video src="ex-b.mov"&gt;&lt;/video&gt;
                   1044:  &lt;figcaption&gt;Exhibit B. The &lt;cite&gt;Rough Copy&lt;/cite&gt; trailer.&lt;/figcaption&gt;
                   1045: &lt;/figure&gt;
                   1046: 
                   1047: &lt;p&gt;The case was resolved out of court.</pre>
                   1048: 
                   1049:   </div><div class="example">
                   1050: 
                   1051:    <p>Here, a part of a poem is marked up using
                   1052:    <code><a href="#the-figure-element">figure</a></code>.</p>
                   1053: 
                   1054:    <pre>&lt;figure&gt;
                   1055:  &lt;p&gt;'Twas brillig, and the slithy toves&lt;br&gt;
                   1056:  Did gyre and gimble in the wabe;&lt;br&gt;
                   1057:  All mimsy were the borogoves,&lt;br&gt;
                   1058:  And the mome raths outgrabe.&lt;/p&gt;
                   1059:  &lt;figcaption&gt;&lt;cite&gt;Jabberwocky&lt;/cite&gt; (first verse). Lewis Carroll, 1832-98&lt;/figcaption&gt;
                   1060: &lt;/figure&gt;</pre>
                   1061: 
                   1062:   </div><div class="example">
                   1063: 
                   1064:    <p>In this example, which could be part of a much larger work
                   1065:    discussing a castle, the figure has three images in it.</p>
                   1066: 
                   1067:    <pre>&lt;figure&gt;
                   1068:  &lt;img src="castle1423.jpeg" title="Etching. Anonymous, ca. 1423."
                   1069:       alt="The castle has one tower, and a tall wall around it."&gt;
                   1070:  &lt;img src="castle1858.jpeg" title="Oil-based paint on canvas. Maria Towle, 1858."
                   1071:       alt="The castle now has two towers and two walls."&gt;
                   1072:  &lt;img src="castle1999.jpeg" title="Film photograph. Peter Jankle, 1999."
                   1073:       alt="The castle lies in ruins, the original tower all that remains in one piece."&gt;
                   1074:  &lt;figcaption&gt;The castle through the ages: 1423, 1858, and 1999 respectively.&lt;/figcaption&gt;
                   1075: &lt;/figure&gt;</pre>
                   1076: 
1.27      mike     1077:   </div><h4 id="the-figcaption-element"><span class="secno">4.5.12 </span>The <dfn><code>figcaption</code></dfn> element</h4><dl class="element"><dt>Categories</dt>
1.17      mike     1078:    <dd>None.</dd>
                   1079:    <dt>Contexts in which this element may be used:</dt>
                   1080:    <dd>As the first or last child of a <code><a href="#the-figure-element">figure</a></code> element.</dd>
                   1081:    <dt>Content model:</dt>
1.36      mike     1082:    <dd><a href="content-models.html#flow-content">Flow content</a>.</dd>
1.17      mike     1083:    <dt>Content attributes:</dt>
                   1084:    <dd><a href="elements.html#global-attributes">Global attributes</a></dd>
                   1085:    <dt>DOM interface:</dt>
                   1086:    <dd>Uses <code><a href="elements.html#htmlelement">HTMLElement</a></code>.</dd>
1.51      mike     1087:   </dl><p>The <code><a href="#the-figcaption-element">figcaption</a></code> element <a class="full-spec-link" href="http://dev.w3.org/html5/spec/rendering.html#represents" title='Read about this "represents" reference in the full HTML5 spec.'>represents</a> a
1.17      mike     1088:   caption or legend for the rest of the contents of the
                   1089:   <code><a href="#the-figcaption-element">figcaption</a></code> element's parent <code><a href="#the-figure-element">figure</a></code>
1.51      mike     1090:   element.<h4 id="the-div-element"><span class="secno">4.5.13 </span>The <dfn><code>div</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><dl class="element"><dt>Categories</dt>
1.12      mike     1091:    <dd><a href="content-models.html#flow-content">Flow content</a>.</dd>
                   1092:    <dd><a href="dnd.html#formatblock-candidate"><code title="">formatBlock</code> candidate</a>.</dd>
                   1093:    <dt>Contexts in which this element may be used:</dt>
                   1094:    <dd>Where <a href="content-models.html#flow-content">flow content</a> is expected.</dd>
                   1095:    <dt>Content model:</dt>
                   1096:    <dd><a href="content-models.html#flow-content">Flow content</a>.</dd>
                   1097:    <dt>Content attributes:</dt>
                   1098:    <dd><a href="elements.html#global-attributes">Global attributes</a></dd>
                   1099:    <dt>DOM interface:</dt>
                   1100:    <dd>
                   1101:     <pre class="idl">interface <dfn id="htmldivelement">HTMLDivElement</dfn> : <a href="elements.html#htmlelement">HTMLElement</a> {};</pre>
                   1102:    </dd>
                   1103:   </dl><p>The <code><a href="#the-div-element">div</a></code> element has no special meaning at all. It
1.51      mike     1104:   <a class="full-spec-link" href="http://dev.w3.org/html5/spec/rendering.html#represents" title='Read about this "represents" reference in the full HTML5 spec.'>represents</a> its children. It can be used with the <code title="attr-class"><a href="elements.html#classes">class</a></code>, <code title="attr-lang"><a href="elements.html#attr-lang">lang</a></code>, and <code title="attr-title"><a href="elements.html#the-title-attribute">title</a></code> attributes to mark up semantics
                   1105:   common to a group of consecutive elements.<p class="note">Authors are strongly encouraged to view the
1.12      mike     1106:   <code><a href="#the-div-element">div</a></code> element as an element of last resort, for when no
                   1107:   other element is suitable. Use of the <code><a href="#the-div-element">div</a></code> element
                   1108:   instead of more appropriate elements leads to poor accessibility for
1.51      mike     1109:   readers and poor maintainability for authors.<div class="example">
1.12      mike     1110: 
                   1111:    <p>For example, a blog post would be marked up using
                   1112:    <code><a href="sections.html#the-article-element">article</a></code>, a chapter using <code><a href="sections.html#the-section-element">section</a></code>, a
                   1113:    page's navigation aids using <code><a href="sections.html#the-nav-element">nav</a></code>, and a group of form
                   1114:    controls using <code><a href="forms.html#the-fieldset-element">fieldset</a></code>.</p>
                   1115: 
                   1116:    <p>On the other hand, <code><a href="#the-div-element">div</a></code> elements can be useful for
                   1117:    stylistic purposes or to wrap multiple paragraphs within a section
                   1118:    that are all to be annotated in a similar way. In the following
                   1119:    example, we see <code><a href="#the-div-element">div</a></code> elements used as a way to set the
                   1120:    language of two paragraphs at once, instead of setting the language
                   1121:    on the two paragraph elements separately:</p>
                   1122: 
                   1123:    <pre>&lt;article lang="en-US"&gt;
                   1124:  &lt;h1&gt;My use of language and my cats&lt;/h1&gt;
                   1125:  &lt;p&gt;My cat's behavior hasn't changed much since her absence, except
                   1126:  that she plays her new physique to the neighbors regularly, in an
                   1127:  attempt to get pets.&lt;/p&gt;
                   1128:  &lt;div lang="en-GB"&gt;
                   1129:   &lt;p&gt;My other cat, coloured black and white, is a sweetie. He followed
                   1130:   us to the pool today, walking down the pavement with us. Yesterday
                   1131:   he apparently visited our neighbours. I wonder if he recognises that
                   1132:   their flat is a mirror image of ours.&lt;/p&gt;
                   1133:   &lt;p&gt;Hm, I just noticed that in the last paragraph I used British
                   1134:   English. But I'm supposed to write in American English. So I
                   1135:   shouldn't say "pavement" or "flat" or "colour"...&lt;/p&gt;
                   1136:  &lt;/div&gt;
                   1137:  &lt;p&gt;I should say "sidewalk" and "apartment" and "color"!&lt;/p&gt;
                   1138: &lt;/article&gt;</pre>
                   1139: 
1.51      mike     1140:   </div>

Webmaster