Annotation of html5/spec-author-view/constraints.html, revision 1.27
1.1 mike 1: <!doctype html>
1.23 mike 2: <html lang="en-US-x-Hixie" xml:lang="en-US-x-Hixie" xmlns="http://www.w3.org/1999/xhtml"><meta content="text-html; charset=utf-8" http-equiv="Content-Type"><meta content="HTML Tidy for HTML5 (experimental) for Linux/x86 http://github.com/w3c/tidy-html5/tree/c63cc39" name="generator"><meta charset="utf-8"><title>4.10.21 Constraints — HTML5</title><link href="style.css" rel="stylesheet"><style type="text-css">
3: /**/
4: /**/
5:
6: .applies thead th > * { display: block; }
7: .applies thead code { display: block; }
8: .applies tbody th { white-space: nowrap; }
9: .applies td { text-align: center; }
10: .applies .yes { background: yellow; }
11:
12: .matrix, .matrix td { border: hidden; text-align: right; }
13: .matrix { margin-left: 2em; }
14:
15: .dice-example { border-collapse: collapse; border-style: hidden solid solid hidden; border-width: thin; margin-left: 3em; }
16: .dice-example caption { width: 30em; font-size: smaller; font-style: italic; padding: 0.75em 0; text-align: left; }
17: .dice-example td, .dice-example th { border: solid thin; width: 1.35em; height: 1.05em; text-align: center; padding: 0; }
18:
19: td.eg { border-width: thin; text-align: center; }
20:
21: #table-example-1 { border: solid thin; border-collapse: collapse; margin-left: 3em; }
22: #table-example-1 * { font-family: "Essays1743", serif; line-height: 1.01em; }
23: #table-example-1 caption { padding-bottom: 0.5em; }
24: #table-example-1 thead, #table-example-1 tbody { border: none; }
25: #table-example-1 th, #table-example-1 td { border: solid thin; }
26: #table-example-1 th { font-weight: normal; }
27: #table-example-1 td { border-style: none solid; vertical-align: top; }
28: #table-example-1 th { padding: 0.5em; vertical-align: middle; text-align: center; }
29: #table-example-1 tbody tr:first-child td { padding-top: 0.5em; }
30: #table-example-1 tbody tr:last-child td { padding-bottom: 1.5em; }
31: #table-example-1 tbody td:first-child { padding-left: 2.5em; padding-right: 0; width: 9em; }
32: #table-example-1 tbody td:first-child::after { content: leader(". "); }
33: #table-example-1 tbody td { padding-left: 2em; padding-right: 2em; }
34: #table-example-1 tbody td:first-child + td { width: 10em; }
35: #table-example-1 tbody td:first-child + td ~ td { width: 2.5em; }
36: #table-example-1 tbody td:first-child + td + td + td ~ td { width: 1.25em; }
37:
38: .apple-table-examples { border: none; border-collapse: separate; border-spacing: 1.5em 0em; width: 40em; margin-left: 3em; }
39: .apple-table-examples * { font-family: "Times", serif; }
40: .apple-table-examples td, .apple-table-examples th { border: none; white-space: nowrap; padding-top: 0; padding-bottom: 0; }
41: .apple-table-examples tbody th:first-child { border-left: none; width: 100%; }
42: .apple-table-examples thead th:first-child ~ th { font-size: smaller; font-weight: bolder; border-bottom: solid 2px; text-align: center; }
43: .apple-table-examples tbody th::after, .apple-table-examples tfoot th::after { content: leader(". ") }
44: .apple-table-examples tbody th, .apple-table-examples tfoot th { font: inherit; text-align: left; }
45: .apple-table-examples td { text-align: right; vertical-align: top; }
46: .apple-table-examples.e1 tbody tr:last-child td { border-bottom: solid 1px; }
47: .apple-table-examples.e1 tbody + tbody tr:last-child td { border-bottom: double 3px; }
48: .apple-table-examples.e2 th[scope=row] { padding-left: 1em; }
49: .apple-table-examples sup { line-height: 0; }
50:
51: .details-example img { vertical-align: top; }
52:
53: #base64-table {
54: white-space: nowrap;
55: font-size: 0.6em;
56: column-width: 6em;
57: column-count: 5;
58: column-gap: 1em;
59: -moz-column-width: 6em;
60: -moz-column-count: 5;
61: -moz-column-gap: 1em;
62: -webkit-column-width: 6em;
63: -webkit-column-count: 5;
64: -webkit-column-gap: 1em;
65: }
66: #base64-table thead { display: none; }
67: #base64-table * { border: none; }
68: #base64-table tbody td:first-child:after { content: ':'; }
69: #base64-table tbody td:last-child { text-align: right; }
70:
71: #named-character-references-table {
72: white-space: nowrap;
73: font-size: 0.6em;
74: column-width: 30em;
75: column-gap: 1em;
76: -moz-column-width: 30em;
77: -moz-column-gap: 1em;
78: -webkit-column-width: 30em;
79: -webkit-column-gap: 1em;
80: }
81: #named-character-references-table > table > tbody > tr > td:first-child + td,
82: #named-character-references-table > table > tbody > tr > td:last-child { text-align: center; }
83: #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; }
84: #named-character-references-table > table > tbody > tr#entity-CounterClockwiseContourIntegral > td:first-child { font-size: 0.5em; }
85:
86: .glyph.control { color: red; }
87:
88: @font-face {
89: font-family: 'Essays1743';
90: src: url('fonts/Essays1743.ttf');
91: }
92: @font-face {
93: font-family: 'Essays1743';
94: font-weight: bold;
95: src: url('fonts/Essays1743-Bold.ttf');
96: }
97: @font-face {
98: font-family: 'Essays1743';
99: font-style: italic;
100: src: url('fonts/Essays1743-Italic.ttf');
101: }
102: @font-face {
103: font-family: 'Essays1743';
104: font-style: italic;
105: font-weight: bold;
106: src: url('fonts/Essays1743-BoldItalic.ttf');
107: }
108:
109: /**/
110: /**/
111: </style><link href="data:text/css," id="complete" rel="stylesheet" title="Complete specification"><link href="data:text/css,.impl%20{%20display:%20none;%20}%0Ahtml%20{%20border:%20solid%20yellow;%20}%20.domintro:before%20{%20display:%20none;%20}" id="author" rel="alternate stylesheet" title="Author documentation only"><link href="data:text/css,.impl%20{%20background:%20%23FFEEEE;%20}%20.domintro:before%20{%20background:%20%23FFEEEE;%20}" id="highlight" rel="alternate stylesheet" title="Highlight implementation requirements"><style type="text-css">
1.19 mike 112: /**/
113: /**/
1.14 mike 114: pre { margin-left: 2em; white-space: pre-wrap; }
115: h2 { margin: 3em 0 1em 0; }
116: h3 { margin: 2.5em 0 1em 0; }
117: h4 { margin: 2.5em 0 0.75em 0; }
118: h5, h6 { margin: 2.5em 0 1em; }
119: h1 + h2, h1 + h2 + h2 { margin: 0.75em 0 0.75em; }
120: h2 + h3, h3 + h4, h4 + h5, h5 + h6 { margin-top: 0.5em; }
121: p { margin: 1em 0; }
122: hr:not(.top) { display: block; background: none; border: none; padding: 0; margin: 2em 0; height: auto; }
123: dl, dd { margin-top: 0; margin-bottom: 0; }
124: dt { margin-top: 0.75em; margin-bottom: 0.25em; clear: left; }
125: dt + dt { margin-top: 0; }
126: dd dt { margin-top: 0.25em; margin-bottom: 0; }
127: dd p { margin-top: 0; }
128: dd dl + p { margin-top: 1em; }
129: dd table + p { margin-top: 1em; }
130: p + * > li, dd li { margin: 1em 0; }
131: dt, dfn { font-weight: bold; font-style: normal; }
132: i, em { font-style: italic; }
133: dt dfn { font-style: italic; }
134: pre, code { font-size: inherit; font-family: monospace; font-variant: normal; }
135: pre strong { color: black; font: inherit; font-weight: bold; background: yellow; }
136: pre em { font-weight: bolder; font-style: normal; }
137: @media screen { code { color: orangered; } code :link, code :visited { color: inherit; } }
138: var sub { vertical-align: bottom; font-size: smaller; position: relative; top: 0.1em; }
139: table { border-collapse: collapse; border-style: hidden hidden none hidden; }
140: table thead, table tbody { border-bottom: solid; }
141: table tbody th:first-child { border-left: solid; }
142: table tbody th { text-align: left; }
143: table td, table th { border-left: solid; border-right: solid; border-bottom: solid thin; vertical-align: top; padding: 0.2em; }
144: blockquote { margin: 0 0 0 2em; border: 0; padding: 0; font-style: italic; }
145:
146: .bad, .bad *:not(.XXX) { color: gray; border-color: gray; background: transparent; }
147: .matrix, .matrix td { border: none; text-align: right; }
148: .matrix { margin-left: 2em; }
149: .dice-example { border-collapse: collapse; border-style: hidden solid solid hidden; border-width: thin; margin-left: 3em; }
150: .dice-example caption { width: 30em; font-size: smaller; font-style: italic; padding: 0.75em 0; text-align: left; }
151: .dice-example td, .dice-example th { border: solid thin; width: 1.35em; height: 1.05em; text-align: center; padding: 0; }
152:
153: .toc dfn, h1 dfn, h2 dfn, h3 dfn, h4 dfn, h5 dfn, h6 dfn { font: inherit; }
154: img.extra, p.overview { float: right; }
155: pre.idl { border: solid thin; background: #EEEEEE; color: black; padding: 0.5em 1em; position: relative; }
156: pre.idl :link, pre.idl :visited { color: inherit; background: transparent; }
157: pre.idl::before { content: "IDL"; font: bold small sans-serif; padding: 0.5em; background: white; position: absolute; top: 0; margin: -1px 0 0 -4em; width: 1.5em; border: thin solid; border-radius: 0 0 0 0.5em }
158: pre.css { border: solid thin; background: #FFFFEE; color: black; padding: 0.5em 1em; }
159: pre.css:first-line { color: #AAAA50; }
160: dl.domintro { color: green; margin: 2em 0 2em 2em; padding: 0.5em 1em; border: none; background: #DDFFDD; }
161: hr + dl.domintro, div.impl + dl.domintro { margin-top: 2.5em; margin-bottom: 1.5em; }
162: dl.domintro dt, dl.domintro dt * { color: black; text-decoration: none; }
163: dl.domintro dd { margin: 0.5em 0 1em 2em; padding: 0; }
164: dl.domintro dd p { margin: 0.5em 0; }
165: dl.domintro:before { display: table; margin: -1em -0.5em -0.5em auto; width: auto; content: 'This box is non-normative. Implementation requirements are given below this box.'; color: black; font-style: italic; border: solid 2px; background: white; padding: 0 0.25em; }
166: dl.switch { padding-left: 2em; }
167: dl.switch > dt { text-indent: -1.5em; }
168: dl.switch > dt:before { content: '\21AA'; padding: 0 0.5em 0 0; display: inline-block; width: 1em; text-align: right; line-height: 0.5em; }
169: dl.triple { padding: 0 0 0 1em; }
170: dl.triple dt, dl.triple dd { margin: 0; display: inline }
171: dl.triple dt:after { content: ':'; }
172: dl.triple dd:after { content: '\A'; white-space: pre; }
173: .diff-old { text-decoration: line-through; color: silver; background: transparent; }
174: .diff-chg, .diff-new { text-decoration: underline; color: green; background: transparent; }
175: a .diff-new { border-bottom: 1px blue solid; }
176:
1.19 mike 177: figure.diagrams { border: double black; background: white; padding: 1em; }
178: figure.diagrams img { display: block; margin: 1em auto; }
179:
1.14 mike 180: h2 { page-break-before: always; }
181: h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
182: h1 + h2, hr + h2.no-toc { page-break-before: auto; }
183:
184: p > span:not([title=""]):not([class="XXX"]):not([class="impl"]):not([class="note"]),
1.23 mike 185: li > span:not([title=""]):not([class="XXX"]):not([class="impl"]):not([class="note"]) { border-bottom: solid #9999CC; }
1.14 mike 186:
187: div.head { margin: 0 0 1em; padding: 1em 0 0 0; }
188: div.head p { margin: 0; }
189: div.head h1 { margin: 0; }
190: div.head .logo { float: right; margin: 0 1em; }
191: div.head .logo img { border: none } /* remove border from top image */
192: div.head dl { margin: 1em 0; }
193: div.head p.copyright, div.head p.alt { font-size: x-small; font-style: oblique; margin: 0; }
194:
195: body > .toc > li { margin-top: 1em; margin-bottom: 1em; }
196: body > .toc.brief > li { margin-top: 0.35em; margin-bottom: 0.35em; }
197: body > .toc > li > * { margin-bottom: 0.5em; }
198: body > .toc > li > * > li > * { margin-bottom: 0.25em; }
199: .toc, .toc li { list-style: none; }
200:
201: .brief { margin-top: 1em; margin-bottom: 1em; line-height: 1.1; }
202: .brief li { margin: 0; padding: 0; }
203: .brief li p { margin: 0; padding: 0; }
204:
205: .category-list { margin-top: -0.75em; margin-bottom: 1em; line-height: 1.5; }
206: .category-list::before { content: '\21D2\A0'; font-size: 1.2em; font-weight: 900; }
207: .category-list li { display: inline; }
208: .category-list li:not(:last-child)::after { content: ', '; }
209: .category-list li > span, .category-list li > a { text-transform: lowercase; }
1.19 mike 210: .category-list li * { text-transform: none; } /* don't */
1.14 mike 211:
212: .XXX { color: #E50000; background: white; border: solid red; padding: 0.5em; margin: 1em 0; }
213: .XXX > :first-child { margin-top: 0; }
214: p .XXX { line-height: 3em; }
215: .annotation { border: solid thin black; background: #0C479D; color: white; position: relative; margin: 8px 0 20px 0; }
216: .annotation:before { position: absolute; left: 0; top: 0; width: 100%; height: 100%; margin: 6px -6px -6px 6px; background: #333333; z-index: -1; content: ''; }
217: .annotation :link, .annotation :visited { color: inherit; }
218: .annotation :link:hover, .annotation :visited:hover { background: transparent; }
219: .annotation span { border: none ! important; }
220: .note { color: green; background: transparent; font-family: sans-serif; }
221: .warning { color: red; background: transparent; }
222: .note, .warning { font-weight: bolder; font-style: italic; }
223: .note em, .warning em, .note i, .warning i { font-style: normal; }
224: p.note, div.note { padding: 0.5em 2em; }
225: span.note { padding: 0 2em; }
226: .note p:first-child, .warning p:first-child { margin-top: 0; }
227: .note p:last-child, .warning p:last-child { margin-bottom: 0; }
228: .warning:before { font-style: normal; }
229: p.note:before { content: 'Note: '; }
230: p.warning:before { content: '\26A0 Warning! '; }
231:
232: .bookkeeping:before { display: block; content: 'Bookkeeping details'; font-weight: bolder; font-style: italic; }
233: .bookkeeping { font-size: 0.8em; margin: 2em 0; }
234: .bookkeeping p { margin: 0.5em 2em; display: list-item; list-style: square; }
235: .bookkeeping dt { margin: 0.5em 2em 0; }
236: .bookkeeping dd { margin: 0 3em 0.5em; }
237:
238: h4 { position: relative; z-index: 3; }
239: h4 + .element, h4 + div + .element { margin-top: -2.5em; padding-top: 2em; }
240: .element {
241: background: #EEEEFF;
242: color: black;
243: margin: 0 0 1em 0.15em;
244: padding: 0 1em 0.25em 0.75em;
245: border-left: solid #9999FF 0.25em;
246: position: relative;
247: z-index: 1;
248: }
249: .element:before {
250: position: absolute;
251: z-index: 2;
252: top: 0;
253: left: -1.15em;
254: height: 2em;
255: width: 0.9em;
256: background: #EEEEFF;
257: content: ' ';
258: border-style: none none solid solid;
259: border-color: #9999FF;
260: border-width: 0.25em;
261: }
262:
263: .example { display: block; color: #222222; background: #FCFCFC; border-left: double; margin-left: 2em; padding-left: 1em; }
264: td > .example:only-child { margin: 0 0 0 0.1em; }
265:
266: ul.domTree, ul.domTree ul { padding: 0 0 0 1em; margin: 0; }
267: ul.domTree li { padding: 0; margin: 0; list-style: none; position: relative; }
268: ul.domTree li li { list-style: none; }
269: 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; }
270: 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; }
271: ul.domTree span { font-style: italic; font-family: serif; }
272: ul.domTree .t1 code { color: purple; font-weight: bold; }
273: ul.domTree .t2 { font-style: normal; font-family: monospace; }
274: ul.domTree .t2 .name { color: black; font-weight: bold; }
275: ul.domTree .t2 .value { color: blue; font-weight: normal; }
276: ul.domTree .t3 code, .domTree .t4 code, .domTree .t5 code { color: gray; }
277: ul.domTree .t7 code, .domTree .t8 code { color: green; }
278: ul.domTree .t10 code { color: teal; }
279:
280: body.dfnEnabled dfn { cursor: pointer; }
281: .dfnPanel {
282: display: inline;
283: position: absolute;
284: z-index: 10;
285: height: auto;
286: width: auto;
287: padding: 0.5em 0.75em;
288: font: small sans-serif, Droid Sans Fallback;
289: background: #DDDDDD;
290: color: black;
291: border: outset 0.2em;
292: }
293: .dfnPanel * { margin: 0; padding: 0; font: inherit; text-indent: 0; }
294: .dfnPanel :link, .dfnPanel :visited { color: black; }
295: .dfnPanel p { font-weight: bolder; }
296: .dfnPanel * + p { margin-top: 0.25em; }
297: .dfnPanel li { list-style-position: inside; }
298:
299: #configUI { position: absolute; z-index: 20; top: 10em; right: 1em; width: 11em; font-size: small; }
300: #configUI p { margin: 0.5em 0; padding: 0.3em; background: #EEEEEE; color: black; border: inset thin; }
301: #configUI p label { display: block; }
302: #configUI #updateUI, #configUI .loginUI { text-align: center; }
303: #configUI input[type=button] { display: block; margin: auto; }
304:
305: fieldset { margin: 1em; padding: 0.5em 1em; }
306: fieldset > legend + * { margin-top: 0; }
307: fieldset > :last-child { margin-bottom: 0; }
308: fieldset p { margin: 0.5em 0; }
309:
1.19 mike 310: .stability {
311: position: fixed;
312: bottom: 0;
313: left: 0; right: 0;
314: margin: 0 auto 0 auto;
315: width: 50%;
316: background: maroon; color: yellow;
317: -webkit-border-radius: 1em 1em 0 0;
318: -moz-border-radius: 1em 1em 0 0;
319: border-radius: 1em 1em 0 0;
320: -moz-box-shadow: 0 0 1em #500;
321: -webkit-box-shadow: 0 0 1em #500;
322: box-shadow: 0 0 1em red;
323: padding: 0.5em 1em;
324: text-align: center;
325: }
326: .stability strong {
327: display: block;
328: }
329: .stability input {
1.23 mike 330: -moz-appearance: none; -webkit-appearance: none; margin: 0;
331: border: 0; padding: 0.25em 0.5em; background: transparent; color: black;
1.19 mike 332: position: absolute; top: -0.5em; right: 0; font: 1.25em sans-serif; text-align: center;
333: }
334: .stability input:hover {
335: color: white;
336: text-shadow: 0 0 2px black;
337: }
338: .stability input:active {
339: padding: 0.3em 0.45em 0.2em 0.55em;
340: }
341: .stability :link, .stability :visited,
342: .stability :link:hover, .stability :visited:hover {
343: background: transparent;
344: color: white;
345: }
346:
347: /**/
348: /**/
1.23 mike 349: </style><link href="http://www.w3.org/StyleSheets/TR/W3C-WD" rel="stylesheet" type="text-css"><meta content="noindex" name="robots"><script>
1.19 mike 350:
351:
352: function getCookie(name) {
353: var params = location.search.substr(1).split("&");
354: for (var index = 0; index < params.length; index++) {
355: if (params[index] == name)
356: return "1";
357: var data = params[index].split("=");
358: if (data[0] == name)
359: return unescape(data[1]);
360: }
361: var cookies = document.cookie.split("; ");
362: for (var index = 0; index < cookies.length; index++) {
363: var data = cookies[index].split("=");
364: if (data[0] == name)
365: return unescape(data[1]);
366: }
367: return null;
1.1 mike 368: }
1.19 mike 369:
370:
371: </script><link href="textFieldSelection.html" rel="prev" title="4.10.20 APIs for the text field selections">
1.1 mike 372: <link href="Overview.html#contents" rel="contents" title="Table of contents">
1.19 mike 373: <link href="interactive-elements.html" rel="next" title="4.11 Interactive elements">
374: <body class="split chapter" onload="fixBrokenLink();"><div class="head" id="head" xmlns="">
1.1 mike 375: <div aria-haspopup="true" id="jumpIndexA-button" role="button" tabindex="0">jump
1.19 mike 376: <div id="jumpIndexA">
1.27 ! mike 377: <ul><li><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-a-element">a</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-abbr-element">abbr</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-address-element">address</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-area-element">area</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-article-element">article</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-aside-element">aside</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-audio-element">audio</a></li>
! 378: </ul><ul><li><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-b-element">b</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-base-element">base</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-bdi-element">bdi</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-bdo-element">bdo</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-blockquote-element">blockquote</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-body-element">body</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-br-element">br</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-button-element">button</a></li>
! 379: </ul><ul><li><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-canvas-element">canvas</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-caption-element">caption</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-cite-element">cite</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-code-element">code</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-col-element">col</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-colgroup-element">colgroup</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-command-element">command</a></li>
! 380: </ul><ul><li><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-datalist-element">datalist</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-dd-element">dd</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-del-element">del</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-details-element">details</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-dfn-element">dfn</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-div-element">div</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-dl-element">dl</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-dt-element">dt</a></li>
! 381: </ul><ul><li><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-em-element">em</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-embed-element">embed</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-fieldset-element">fieldset</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-figcaption-element">figcaption</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-figure-element">figure</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-footer-element">footer</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-form-element">form</a></li>
! 382: </ul><ul><li><a class="full-spec-link" href="http://dev.w3.org/html5/spec/.html#the-h1-h2-h3-h4-h5-and-h6-elements" title='Read about this "h1" reference in the full HTML5 spec.'>h1</a><a class="full-spec-link" href="http://dev.w3.org/html5/spec/.html#the-h1-h2-h3-h4-h5-and-h6-elements" title='Read about this "h2" reference in the full HTML5 spec.'>h2</a><a class="full-spec-link" href="http://dev.w3.org/html5/spec/.html#the-h1-h2-h3-h4-h5-and-h6-elements" title='Read about this "h3" reference in the full HTML5 spec.'>h3</a><a class="full-spec-link" href="http://dev.w3.org/html5/spec/.html#the-h1-h2-h3-h4-h5-and-h6-elements" title='Read about this "h4" reference in the full HTML5 spec.'>h4</a><a class="full-spec-link" href="http://dev.w3.org/html5/spec/.html#the-h1-h2-h3-h4-h5-and-h6-elements" title='Read about this "h5" reference in the full HTML5 spec.'>h5</a><a class="full-spec-link" href="http://dev.w3.org/html5/spec/.html#the-h1-h2-h3-h4-h5-and-h6-elements" title='Read about this "h6" reference in the full HTML5 spec.'>h6</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-head-element">head</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-header-element">header</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-hgroup-element">hgroup</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-hr-element">hr</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-html-element">html</a></li>
! 383: </ul><ul><li><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-i-element">i</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-iframe-element">iframe</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-img-element">img</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-input-element">input</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-ins-element">ins</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-kbd-element">kbd</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-keygen-element">keygen</a></li>
! 384: </ul><ul><li><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-label-element">label</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-legend-element">legend</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-li-element">li</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-link-element">link</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-map-element">map</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-mark-element">mark</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-menu-element">menu</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-meta-element">meta</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-meter-element">meter</a></li>
! 385: </ul><ul><li><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-nav-element">nav</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-noscript-element">noscript</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-object-element">object</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-ol-element">ol</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-optgroup-element">optgroup</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-option-element">option</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-output-element">output</a></li>
! 386: </ul><ul><li><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-p-element">p</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-param-element">param</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-pre-element">pre</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-progress-element">progress</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-q-element">q</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-rp-element">rp</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-rt-element">rt</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-ruby-element">ruby</a></li>
! 387: </ul><ul><li><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-s-element">s</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-samp-element">samp</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-script-element">script</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-section-element">section</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-select-element">select</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-small-element">small</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-source-element">source</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-span-element">span</a></li>
! 388: </ul><ul><li><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-strong-element">strong</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-style-element">style</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-sub-and-sup-elements">sub</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-summary-element">summary</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-sub-and-sup-elements">sup</a></li>
! 389: </ul><ul><li><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-table-element">table</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-tbody-element">tbody</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-td-element">td</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-textarea-element">textarea</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-tfoot-element">tfoot</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-th-element">th</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-thead-element">thead</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-time-element">time</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-title-element">title</a></li>
! 390: </ul><ul><li><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-tr-element">tr</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-track-element">track</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-u-element">u</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-ul-element">ul</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-var-element">var</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-video-element">video</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#the-wbr-element">wbr</a></li>
! 391: </ul><ul class="jumpIndexA-other"><li><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#global-attributes">global
! 392: attributes</a><a class="noindex" href="http://dev.w3.org/html5/spec/single-page.html#index-of-terms">terms</a></li>
1.19 mike 393: </ul></div>
394: </div>
395: <script src="jump-indexes.js">
396: </script><p xmlns="http://www.w3.org/1999/xhtml"><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
397: <h1 xmlns="http://www.w3.org/1999/xhtml">HTML5</h1>
398: </div>
399: <div class="prev_next">
1.18 mike 400: <a href="textFieldSelection.html">← 4.10.20 APIs for the text field selections</a> –
1.1 mike 401: <a href="Overview.html#contents">Table of contents</a> –
1.19 mike 402: <a href="interactive-elements.html">4.11 Interactive elements →</a>
1.27 ! mike 403: </div>
1.19 mike 404:
405: <h4 id="constraints"><span class="secno">4.10.21</span>
406: Constraints</h4>
407: <h5 id="definitions"><span class="secno">4.10.21.1</span>
408: Definitions</h5>
409: <!--TOPIC:DOM APIs-->
410: <h5 id="the-constraint-validation-api"><span class="secno">4.10.21.2</span> The <dfn>constraint validation
411: API</dfn></h5>
1.27 ! mike 412: <dl class="domintro"><dt><var title="">element</var> . <code title="dom-cva-willValidate"><a href="http://dev.w3.org/html5/spec/single-page.html#dom-cva-willvalidate">willValidate</a></code></dt>
1.19 mike 413: <dd>
414: <p>Returns true if the element will be validated when the form is
415: submitted; false otherwise.</p>
416: </dd>
1.27 ! mike 417: <dt><var title="">element</var> . <code title="dom-cva-setCustomValidity"><a href="http://dev.w3.org/html5/spec/single-page.html#dom-cva-setcustomvalidity">setCustomValidity</a></code>(<var title="">message</var>)</dt>
1.19 mike 418: <dd>
419: <p>Sets a custom error, so that the element would fail to validate.
420: The given message is the message to be shown to the user when
421: reporting the problem to the user.</p>
422: <p>If the argument is the empty string, clears the custom
423: error.</p>
424: </dd>
1.27 ! mike 425: <dt><var title="">element</var> . <code title="dom-cva-validity"><a href="http://dev.w3.org/html5/spec/single-page.html#dom-cva-validity">validity</a></code>
! 426: . <code title="dom-validitystate-valueMissing"><a href="http://dev.w3.org/html5/spec/single-page.html#dom-validitystate-valuemissing">valueMissing</a></code></dt>
1.19 mike 427: <dd>
428: <p>Returns true if the element has no value but is a required
429: field; false otherwise.</p>
430: </dd>
1.27 ! mike 431: <dt><var title="">element</var> . <code title="dom-cva-validity"><a href="http://dev.w3.org/html5/spec/single-page.html#dom-cva-validity">validity</a></code>
! 432: . <code title="dom-validitystate-typeMismatch"><a href="http://dev.w3.org/html5/spec/single-page.html#dom-validitystate-typemismatch">typeMismatch</a></code></dt>
1.19 mike 433: <dd>
434: <p>Returns true if the element's value is not in the correct
435: syntax; false otherwise.</p>
436: </dd>
1.27 ! mike 437: <dt><var title="">element</var> . <code title="dom-cva-validity"><a href="http://dev.w3.org/html5/spec/single-page.html#dom-cva-validity">validity</a></code>
! 438: . <code title="dom-validitystate-patternMismatch"><a href="http://dev.w3.org/html5/spec/single-page.html#dom-validitystate-patternmismatch">patternMismatch</a></code></dt>
1.19 mike 439: <dd>
440: <p>Returns true if the element's value doesn't match the provided
441: pattern; false otherwise.</p>
442: </dd>
1.27 ! mike 443: <dt><var title="">element</var> . <code title="dom-cva-validity"><a href="http://dev.w3.org/html5/spec/single-page.html#dom-cva-validity">validity</a></code>
! 444: . <code title="dom-validitystate-tooLong"><a href="http://dev.w3.org/html5/spec/single-page.html#dom-validitystate-toolong">tooLong</a></code></dt>
1.19 mike 445: <dd>
446: <p>Returns true if the element's value is longer than the provided
447: maximum length; false otherwise.</p>
448: </dd>
1.27 ! mike 449: <dt><var title="">element</var> . <code title="dom-cva-validity"><a href="http://dev.w3.org/html5/spec/single-page.html#dom-cva-validity">validity</a></code>
! 450: . <code title="dom-validitystate-rangeUnderflow"><a href="http://dev.w3.org/html5/spec/single-page.html#dom-validitystate-rangeunderflow">rangeUnderflow</a></code></dt>
1.19 mike 451: <dd>
452: <p>Returns true if the element's value is lower than the provided
453: minimum; false otherwise.</p>
454: </dd>
1.27 ! mike 455: <dt><var title="">element</var> . <code title="dom-cva-validity"><a href="http://dev.w3.org/html5/spec/single-page.html#dom-cva-validity">validity</a></code>
! 456: . <code title="dom-validitystate-rangeOverflow"><a href="http://dev.w3.org/html5/spec/single-page.html#dom-validitystate-rangeoverflow">rangeOverflow</a></code></dt>
1.19 mike 457: <dd>
458: <p>Returns true if the element's value is higher than the provided
459: maximum; false otherwise.</p>
460: </dd>
1.27 ! mike 461: <dt><var title="">element</var> . <code title="dom-cva-validity"><a href="http://dev.w3.org/html5/spec/single-page.html#dom-cva-validity">validity</a></code>
! 462: . <code title="dom-validitystate-stepMismatch"><a href="http://dev.w3.org/html5/spec/single-page.html#dom-validitystate-stepmismatch">stepMismatch</a></code></dt>
1.19 mike 463: <dd>
464: <p>Returns true if the element's value doesn't fit the rules given
1.27 ! mike 465: by the <code title="attr-input-step"><a href="http://dev.w3.org/html5/spec/single-page.html#attr-input-step" id="step_36">step</a></code> attribute; false otherwise.</p>
1.19 mike 466: </dd>
1.27 ! mike 467: <dt><var title="">element</var> . <code title="dom-cva-validity"><a href="http://dev.w3.org/html5/spec/single-page.html#dom-cva-validity">validity</a></code>
! 468: . <code title="dom-validitystate-customError"><a href="http://dev.w3.org/html5/spec/single-page.html#dom-validitystate-customerror">customError</a></code></dt>
1.19 mike 469: <dd>
470: <p>Returns true if the element has a custom error; false
471: otherwise.</p>
472: </dd>
1.27 ! mike 473: <dt><var title="">element</var> . <code title="dom-cva-validity"><a href="http://dev.w3.org/html5/spec/single-page.html#dom-cva-validity">validity</a></code>
! 474: . <code title="dom-validitystate-valid"><a href="http://dev.w3.org/html5/spec/single-page.html#dom-validitystate-valid">valid</a></code></dt>
1.19 mike 475: <dd>
476: <p>Returns true if the element's value has no validity problems;
477: false otherwise.</p>
478: </dd>
479: <dt><var title="">valid</var> = <var title="">element</var> .
1.27 ! mike 480: <code title="dom-cva-checkValidity"><a href="http://dev.w3.org/html5/spec/single-page.html#dom-cva-checkvalidity">checkValidity</a></code>()</dt>
1.19 mike 481: <dd>
482: <p>Returns true if the element's value has no validity problems;
483: false otherwise. Fires an <code title="event-invalid">invalid</code> event at the element in the latter
484: case.</p>
485: </dd>
1.27 ! mike 486: <dt><var title="">element</var> . <code title="dom-cva-validationMessage"><a href="http://dev.w3.org/html5/spec/single-page.html#dom-cva-validationmessage">validationMessage</a></code></dt>
1.19 mike 487: <dd>
488: <p>Returns the error message that would be shown to the user if the
489: element was to be checked for validity.</p>
490: </dd>
491: </dl><div class="example">
492: <p>In the following example, a script checks the value of a form
493: control each time it is edited, and whenever it is not a valid
1.27 ! mike 494: value, uses the <code title="dom-cva-setCustomValidity"><a href="http://dev.w3.org/html5/spec/single-page.html#dom-cva-setcustomvalidity">setCustomValidity()</a></code> method
1.19 mike 495: to set an appropriate message.</p>
496: <pre>
497: <label>Feeling: <input name=f type="text" oninput="check(this)"></label>
1.1 mike 498: <script>
499: function check(input) {
500: if (input.value == "good" ||
501: input.value == "fine" ||
502: input.value == "tired") {
503: input.setCustomValidity('"' + input.value + '" is not a feeling.');
1.19 mike 504: <!-- } else if (input.value == "...") {
505: input.setCustomValidity('...');
506: --> } else {
1.1 mike 507: // input is fine -- reset the error message
508: input.setCustomValidity('');
509: }
510: }
1.19 mike 511: </script>
512: </pre></div>
513: <!--TOPIC:HTML-->
514: <!--ADD-TOPIC:Security-->
515: <h5 id="security-forms"><span class="secno">4.10.21.3</span>
516: Security</h5>
517: <p id="security-0">Servers should not rely on client-side
518: validation. Client-side validation can be intentionally bypassed by
519: hostile users, and unintentionally bypassed by users of older user
520: agents or automated tools that do not implement these features. The
521: constraint validation features are only intended to improve the
522: user experience, not to provide any kind of security mechanism.</p>
523: <!--REMOVE-TOPIC:Security-->
524: <h4 id="form-submission-0"><span class="secno">4.10.22</span>
525: <dfn>Form submission</dfn></h4>
526: <p><i>This section is non-normative.</i></p>
527: <p>When a form is submitted, the data in the form is converted into
1.27 ! mike 528: the structure specified by the <a href="http://dev.w3.org/html5/spec/single-page.html#concept-fs-enctype" id="concept-fs-enctype_1" title="concept-fs-enctype">enctype</a>, and
! 529: then sent to the destination specified by the <a href="http://dev.w3.org/html5/spec/single-page.html#concept-fs-action" id="concept-fs-action_0" title="concept-fs-action">action</a> using the given <a href="http://dev.w3.org/html5/spec/single-page.html#concept-fs-method" id="concept-fs-method_1" title="concept-fs-method">method</a>.</p>
1.19 mike 530: <p>For example, take the following form:</p>
531: <pre>
532: <form action="/find.cgi" method=get>
533: <input type=text name=t>
534: <input type=search name=q>
535: <input type=submit>
536: </form>
537: </pre>
538: <p>If the user types in "cats" in the first field and "fur" in the
539: second, and then hits the submit button, then the user agent will
540: load <code title="">/find.cgi?t=cats&q=fur</code>.</p>
541: <p>On the other hand, consider this form:</p>
542: <pre>
543: <form action="/find.cgi" method=post enctype="multipart-form-data">
544: <input type=text name=t>
545: <input type=search name=q>
546: <input type=submit>
547: </form>
548: </pre>
549: <p>Given the same user input, the result on submission is quite
550: different: the user agent instead does an HTTP POST to the given
551: URL, with as the entity body something like the following text:</p>
552: <pre>
553: ------kYFrd4jNJEgCervE
554: Content-Disposition: form-data; name="t"
555:
556: cats
557: ------kYFrd4jNJEgCervE
558: Content-Disposition: form-data; name="q"
559:
560: fur
561: ------kYFrd4jNJEgCervE--
562: </pre>
563: <h5 id="url-encoded-form-data"><span class="secno">4.10.22.1</span>
564: URL-encoded form data</h5>
565: <p class="note">This form data set encoding is in many ways an
566: aberrant monstrosity, the result of many years of implementation
567: accidents and compromises leading to a set of requirements
568: necessary for interoperability, but in no way representing good
569: design practices. In particular, readers are cautioned to pay close
570: attention to the twisted details involving repeated (and in some
571: cases nested) conversions between character encodings and byte
572: sequences.</p>
573: <p>To <dfn id="application-x-www-form-urlencoded-decoding-algorithm" title="application-x-www-form-urlencoded decoding algorithm">decode
574: <code>application/x-www-form-urlencoded</code> payloads</dfn>, the
575: following algorithm should be used. This algorithm uses as inputs
576: the payload itself, <var title="">payload</var>, consisting of a
577: Unicode string using only characters in the range U+0000 to U+007F;
578: a default character encoding <var title="">encoding</var>; and
579: optionally an <var title="">isindex</var> flag indicating that the
580: payload is to be processed as if it had been generated for a form
1.27 ! mike 581: containing an <code title="attr-fe-name-isindex"><a href="http://dev.w3.org/html5/spec/single-page.html#attr-fe-name-isindex" id="isindex_0">isindex</a></code> control.
1.19 mike 582: The output of this algorithm is a sorted list of name-value pairs.
583: If the <var title="">isindex</var> flag is set and the first
1.27 ! mike 584: control really was an <code title="attr-fe-name-isindex"><a href="http://dev.w3.org/html5/spec/single-page.html#attr-fe-name-isindex" id="isindex_1">isindex</a></code> control,
1.19 mike 585: then the first name-value pair will have as its name the empty
586: string.</p>
587: <ol><li>
1.27 ! mike 588: <p>Let <var title="">strings</var> be the result of <a href="http://dev.w3.org/html5/spec/single-page.html#strictly-split-a-string" title="strictly split a string">strictly
1.19 mike 589: splitting the string</a> <var title="">payload</var> on U+0026
590: AMPERSAND characters (&).</p>
591: </li>
592: <li>
593: <p>If the <var title="">isindex</var> flag is set and the first
594: string in <var title="">strings</var> does not contain a "="
595: (U+003D) character, insert a U+003D EQUALS SIGN character (=) at
596: the start of the first string in <var title="">strings</var>.</p>
597: </li>
598: <li>
599: <p>Let <var title="">pairs</var> be an empty list of name-value
600: pairs.</p>
601: </li>
602: <li>
603: <p>For each string <var title="">string</var> in <var title="">strings</var>, run these substeps:</p>
604: <ol><li>
605: <p>If <var title="">string</var> contains a "=" (U+003D) character,
606: then let <var title="">name</var> be the substring of <var title="">string</var> from the start of <var title="">string</var> up to
607: but excluding its first "=" (U+003D) character, and let <var title="">value</var> be the substring from the first character, if any,
608: after the first "=" (U+003D) character up to the end of <var title="">string</var>. If the first U+003D EQUALS SIGN character (=) is
609: the first character, then <var title="">name</var> will be the
610: empty string. If it is the last character, then <var title="">value</var> will be the empty string.</p>
611: <p>Otherwise, <var title="">string</var> contains no "=" (U+003D)
612: characters. Let <var title="">name</var> have the value of
613: <var title="">string</var> and let <var title="">value</var> be the
614: empty string.</p>
615: </li>
616: <li>
617: <p>Replace any "+" (U+002B) characters in <var title="">name</var>
618: and <var title="">value</var> with U+0020 SPACE characters.</p>
619: </li>
620: <li>
621: <p>Replace any escape in <var title="">name</var> and <var title="">value</var> with the character represented by the escape. This
622: replacement most not be recursive.</p>
623: <p>An escape is a "%" (U+0025) character followed by two characters
1.27 ! mike 624: in the ranges <a href="http://dev.w3.org/html5/spec/single-page.html#ascii-digits">ASCII digits</a>, U+0041
1.19 mike 625: LATIN CAPITAL LETTER A to U+0046 LATIN CAPITAL LETTER F, and U+0061
626: LATIN SMALL LETTER A to U+0066 LATIN SMALL LETTER F.</p>
627: <p>The character represented by an escape is the Unicode character
628: whose code point is equal to the value of the two characters after
629: the "%" (U+0025) character, interpreted as a hexadecimal number (in
630: the range 0..255).</p>
631: <p class="example">So for instance the string "<code title="">A%2BC</code>" would become "<code title="">A+C</code>".
632: Similarly, the string "<code title="">100%25AA%21</code>" becomes
633: the string "<code title="">100%AA!</code>".</p>
634: </li>
635: <li>
636: <p>Convert the <var title="">name</var> and <var title="">value</var> strings to their byte representation in ISO-8859-1
637: (i.e. convert the Unicode string to a byte string, mapping code
638: points to byte values directly).</p>
639: </li>
640: <li>
641: <p>Add a pair consisting of <var title="">name</var> and
642: <var title="">value</var> to <var title="">pairs</var>.</p>
643: </li>
644: </ol></li>
645: <li>
646: <p>If any of the name-value pairs in <var title="">pairs</var> have
647: a name component consisting of the string "<code title="">_charset_</code>" encoded in US-ASCII, and the value component
648: of the first such pair, when decoded as US-ASCII, is the name of a
649: supported character encoding, then let <var title="">encoding</var>
650: be that character encoding (replacing the default passed to the
651: algorithm).</p>
652: </li>
653: <li>
654: <p>Convert the name and value components of each name-value pair in
655: <var title="">pairs</var> to Unicode by interpreting the bytes
656: according to the encoding <var title="">encoding</var>.</p>
657: </li>
658: <li>
659: <p>Return <var title="">pairs</var>.</p>
660: </li>
1.27 ! mike 661: </ol><p class="note">Parameters on the <code><a href="http://dev.w3.org/html5/spec/single-page.html#application-x-www-form-urlencoded" id="application-x-www-form-urlencoded_5">application/x-www-form-urlencoded</a></code>
1.19 mike 662: MIME type are ignored. In particular, this MIME type does not
663: support the <code title="">charset</code> parameter.</p>
664: <p>For details on how to interpret <code>multipart/form-data</code>
1.27 ! mike 665: payloads, see RFC 2388. <a href="http://dev.w3.org/html5/spec/single-page.html#refsRFC2388">[RFC2388]</a></p>
1.19 mike 666: <h5 id="plain-text-form-data"><span class="secno">4.10.22.2</span>
667: Plain text form data</h5>
668: <p>Payloads using the <code>text/plain</code> format are intended
669: to be human readable. They are not reliably interpretable by
670: computer, as the format is ambiguous (for example, there is no way
671: to distinguish a literal newline in a value from the newline at the
672: end of the value).</p>
Webmaster