Annotation of html5/spec-author-view/the-noscript-element.html, revision 1.130
1.98 mike 1: <!doctype html>
1.130 ! 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"><title>4.3.2 The noscript element — HTML5</title><style href="style.css">
! 3:
! 4: <style type="text-css">
1.129 mike 5: /**/
6: /**/
1.123 mike 7: pre { margin-left: 2em; white-space: pre-wrap; }
8: h2 { margin: 3em 0 1em 0; }
9: h3 { margin: 2.5em 0 1em 0; }
10: h4 { margin: 2.5em 0 0.75em 0; }
11: h5, h6 { margin: 2.5em 0 1em; }
12: h1 + h2, h1 + h2 + h2 { margin: 0.75em 0 0.75em; }
13: h2 + h3, h3 + h4, h4 + h5, h5 + h6 { margin-top: 0.5em; }
14: p { margin: 1em 0; }
15: hr:not(.top) { display: block; background: none; border: none; padding: 0; margin: 2em 0; height: auto; }
16: dl, dd { margin-top: 0; margin-bottom: 0; }
17: dt { margin-top: 0.75em; margin-bottom: 0.25em; clear: left; }
18: dt + dt { margin-top: 0; }
19: dd dt { margin-top: 0.25em; margin-bottom: 0; }
20: dd p { margin-top: 0; }
21: dd dl + p { margin-top: 1em; }
22: dd table + p { margin-top: 1em; }
23: p + * > li, dd li { margin: 1em 0; }
24: dt, dfn { font-weight: bold; font-style: normal; }
25: i, em { font-style: italic; }
26: dt dfn { font-style: italic; }
27: pre, code { font-size: inherit; font-family: monospace; font-variant: normal; }
28: pre strong { color: black; font: inherit; font-weight: bold; background: yellow; }
29: pre em { font-weight: bolder; font-style: normal; }
30: @media screen { code { color: orangered; } code :link, code :visited { color: inherit; } }
31: var sub { vertical-align: bottom; font-size: smaller; position: relative; top: 0.1em; }
32: table { border-collapse: collapse; border-style: hidden hidden none hidden; }
33: table thead, table tbody { border-bottom: solid; }
34: table tbody th:first-child { border-left: solid; }
35: table tbody th { text-align: left; }
36: table td, table th { border-left: solid; border-right: solid; border-bottom: solid thin; vertical-align: top; padding: 0.2em; }
37: blockquote { margin: 0 0 0 2em; border: 0; padding: 0; font-style: italic; }
38:
39: .bad, .bad *:not(.XXX) { color: gray; border-color: gray; background: transparent; }
40: .matrix, .matrix td { border: none; text-align: right; }
41: .matrix { margin-left: 2em; }
42: .dice-example { border-collapse: collapse; border-style: hidden solid solid hidden; border-width: thin; margin-left: 3em; }
43: .dice-example caption { width: 30em; font-size: smaller; font-style: italic; padding: 0.75em 0; text-align: left; }
44: .dice-example td, .dice-example th { border: solid thin; width: 1.35em; height: 1.05em; text-align: center; padding: 0; }
45:
46: .toc dfn, h1 dfn, h2 dfn, h3 dfn, h4 dfn, h5 dfn, h6 dfn { font: inherit; }
47: img.extra, p.overview { float: right; }
48: pre.idl { border: solid thin; background: #EEEEEE; color: black; padding: 0.5em 1em; position: relative; }
49: pre.idl :link, pre.idl :visited { color: inherit; background: transparent; }
50: 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 }
51: pre.css { border: solid thin; background: #FFFFEE; color: black; padding: 0.5em 1em; }
52: pre.css:first-line { color: #AAAA50; }
53: dl.domintro { color: green; margin: 2em 0 2em 2em; padding: 0.5em 1em; border: none; background: #DDFFDD; }
54: hr + dl.domintro, div.impl + dl.domintro { margin-top: 2.5em; margin-bottom: 1.5em; }
55: dl.domintro dt, dl.domintro dt * { color: black; text-decoration: none; }
56: dl.domintro dd { margin: 0.5em 0 1em 2em; padding: 0; }
57: dl.domintro dd p { margin: 0.5em 0; }
58: 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; }
59: dl.switch { padding-left: 2em; }
60: dl.switch > dt { text-indent: -1.5em; }
61: dl.switch > dt:before { content: '\21AA'; padding: 0 0.5em 0 0; display: inline-block; width: 1em; text-align: right; line-height: 0.5em; }
62: dl.triple { padding: 0 0 0 1em; }
63: dl.triple dt, dl.triple dd { margin: 0; display: inline }
64: dl.triple dt:after { content: ':'; }
65: dl.triple dd:after { content: '\A'; white-space: pre; }
66: .diff-old { text-decoration: line-through; color: silver; background: transparent; }
67: .diff-chg, .diff-new { text-decoration: underline; color: green; background: transparent; }
68: a .diff-new { border-bottom: 1px blue solid; }
69:
1.129 mike 70: figure.diagrams { border: double black; background: white; padding: 1em; }
71: figure.diagrams img { display: block; margin: 1em auto; }
72:
1.123 mike 73: h2 { page-break-before: always; }
74: h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
75: h1 + h2, hr + h2.no-toc { page-break-before: auto; }
76:
77: p > span:not([title=""]):not([class="XXX"]):not([class="impl"]):not([class="note"]),
78: li > span:not([title=""]):not([class="XXX"]):not([class="impl"]):not([class="note"]), { border-bottom: solid #9999CC; }
79:
80: div.head { margin: 0 0 1em; padding: 1em 0 0 0; }
81: div.head p { margin: 0; }
82: div.head h1 { margin: 0; }
83: div.head .logo { float: right; margin: 0 1em; }
84: div.head .logo img { border: none } /* remove border from top image */
85: div.head dl { margin: 1em 0; }
86: div.head p.copyright, div.head p.alt { font-size: x-small; font-style: oblique; margin: 0; }
87:
88: body > .toc > li { margin-top: 1em; margin-bottom: 1em; }
89: body > .toc.brief > li { margin-top: 0.35em; margin-bottom: 0.35em; }
90: body > .toc > li > * { margin-bottom: 0.5em; }
91: body > .toc > li > * > li > * { margin-bottom: 0.25em; }
92: .toc, .toc li { list-style: none; }
93:
94: .brief { margin-top: 1em; margin-bottom: 1em; line-height: 1.1; }
95: .brief li { margin: 0; padding: 0; }
96: .brief li p { margin: 0; padding: 0; }
97:
98: .category-list { margin-top: -0.75em; margin-bottom: 1em; line-height: 1.5; }
99: .category-list::before { content: '\21D2\A0'; font-size: 1.2em; font-weight: 900; }
100: .category-list li { display: inline; }
101: .category-list li:not(:last-child)::after { content: ', '; }
102: .category-list li > span, .category-list li > a { text-transform: lowercase; }
1.129 mike 103: .category-list li * { text-transform: none; } /* don't */
1.123 mike 104:
105: .XXX { color: #E50000; background: white; border: solid red; padding: 0.5em; margin: 1em 0; }
106: .XXX > :first-child { margin-top: 0; }
107: p .XXX { line-height: 3em; }
108: .annotation { border: solid thin black; background: #0C479D; color: white; position: relative; margin: 8px 0 20px 0; }
109: .annotation:before { position: absolute; left: 0; top: 0; width: 100%; height: 100%; margin: 6px -6px -6px 6px; background: #333333; z-index: -1; content: ''; }
110: .annotation :link, .annotation :visited { color: inherit; }
111: .annotation :link:hover, .annotation :visited:hover { background: transparent; }
112: .annotation span { border: none ! important; }
113: .note { color: green; background: transparent; font-family: sans-serif; }
114: .warning { color: red; background: transparent; }
115: .note, .warning { font-weight: bolder; font-style: italic; }
116: .note em, .warning em, .note i, .warning i { font-style: normal; }
117: p.note, div.note { padding: 0.5em 2em; }
118: span.note { padding: 0 2em; }
119: .note p:first-child, .warning p:first-child { margin-top: 0; }
120: .note p:last-child, .warning p:last-child { margin-bottom: 0; }
121: .warning:before { font-style: normal; }
122: p.note:before { content: 'Note: '; }
123: p.warning:before { content: '\26A0 Warning! '; }
124:
125: .bookkeeping:before { display: block; content: 'Bookkeeping details'; font-weight: bolder; font-style: italic; }
126: .bookkeeping { font-size: 0.8em; margin: 2em 0; }
127: .bookkeeping p { margin: 0.5em 2em; display: list-item; list-style: square; }
128: .bookkeeping dt { margin: 0.5em 2em 0; }
129: .bookkeeping dd { margin: 0 3em 0.5em; }
130:
131: h4 { position: relative; z-index: 3; }
132: h4 + .element, h4 + div + .element { margin-top: -2.5em; padding-top: 2em; }
133: .element {
134: background: #EEEEFF;
135: color: black;
136: margin: 0 0 1em 0.15em;
137: padding: 0 1em 0.25em 0.75em;
138: border-left: solid #9999FF 0.25em;
139: position: relative;
140: z-index: 1;
141: }
142: .element:before {
143: position: absolute;
144: z-index: 2;
145: top: 0;
146: left: -1.15em;
147: height: 2em;
148: width: 0.9em;
149: background: #EEEEFF;
150: content: ' ';
151: border-style: none none solid solid;
152: border-color: #9999FF;
153: border-width: 0.25em;
154: }
155:
156: .example { display: block; color: #222222; background: #FCFCFC; border-left: double; margin-left: 2em; padding-left: 1em; }
157: td > .example:only-child { margin: 0 0 0 0.1em; }
158:
159: ul.domTree, ul.domTree ul { padding: 0 0 0 1em; margin: 0; }
160: ul.domTree li { padding: 0; margin: 0; list-style: none; position: relative; }
161: ul.domTree li li { list-style: none; }
162: 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; }
163: 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; }
164: ul.domTree span { font-style: italic; font-family: serif; }
165: ul.domTree .t1 code { color: purple; font-weight: bold; }
166: ul.domTree .t2 { font-style: normal; font-family: monospace; }
167: ul.domTree .t2 .name { color: black; font-weight: bold; }
168: ul.domTree .t2 .value { color: blue; font-weight: normal; }
169: ul.domTree .t3 code, .domTree .t4 code, .domTree .t5 code { color: gray; }
170: ul.domTree .t7 code, .domTree .t8 code { color: green; }
171: ul.domTree .t10 code { color: teal; }
172:
173: body.dfnEnabled dfn { cursor: pointer; }
174: .dfnPanel {
175: display: inline;
176: position: absolute;
177: z-index: 10;
178: height: auto;
179: width: auto;
180: padding: 0.5em 0.75em;
181: font: small sans-serif, Droid Sans Fallback;
182: background: #DDDDDD;
183: color: black;
184: border: outset 0.2em;
185: }
186: .dfnPanel * { margin: 0; padding: 0; font: inherit; text-indent: 0; }
187: .dfnPanel :link, .dfnPanel :visited { color: black; }
188: .dfnPanel p { font-weight: bolder; }
189: .dfnPanel * + p { margin-top: 0.25em; }
190: .dfnPanel li { list-style-position: inside; }
191:
192: #configUI { position: absolute; z-index: 20; top: 10em; right: 1em; width: 11em; font-size: small; }
193: #configUI p { margin: 0.5em 0; padding: 0.3em; background: #EEEEEE; color: black; border: inset thin; }
194: #configUI p label { display: block; }
195: #configUI #updateUI, #configUI .loginUI { text-align: center; }
196: #configUI input[type=button] { display: block; margin: auto; }
197:
198: fieldset { margin: 1em; padding: 0.5em 1em; }
199: fieldset > legend + * { margin-top: 0; }
200: fieldset > :last-child { margin-bottom: 0; }
201: fieldset p { margin: 0.5em 0; }
202:
1.129 mike 203: .stability {
204: position: fixed;
205: bottom: 0;
206: left: 0; right: 0;
207: margin: 0 auto 0 auto;
208: width: 50%;
209: background: maroon; color: yellow;
210: -webkit-border-radius: 1em 1em 0 0;
211: -moz-border-radius: 1em 1em 0 0;
212: border-radius: 1em 1em 0 0;
213: -moz-box-shadow: 0 0 1em #500;
214: -webkit-box-shadow: 0 0 1em #500;
215: box-shadow: 0 0 1em red;
216: padding: 0.5em 1em;
217: text-align: center;
218: }
219: .stability strong {
220: display: block;
221: }
222: .stability input {
223: appearance: none; margin: 0; border: 0; padding: 0.25em 0.5em; background: transparent; color: black;
224: position: absolute; top: -0.5em; right: 0; font: 1.25em sans-serif; text-align: center;
225: }
226: .stability input:hover {
227: color: white;
228: text-shadow: 0 0 2px black;
229: }
230: .stability input:active {
231: padding: 0.3em 0.45em 0.2em 0.55em;
232: }
233: .stability :link, .stability :visited,
234: .stability :link:hover, .stability :visited:hover {
235: background: transparent;
236: color: white;
237: }
238:
239: /**/
240: /**/
241: </style><link href="http://www.w3.org/StyleSheets/TR/W3C-WD" rel="stylesheet" type="text-css"><meta content="noindex" name="robots"><style type="text-css">
242: /**/
243: /**/
1.1 mike 244:
245: .applies thead th > * { display: block; }
246: .applies thead code { display: block; }
247: .applies tbody th { whitespace: nowrap; }
248: .applies td { text-align: center; }
249: .applies .yes { background: yellow; }
250:
251: .matrix, .matrix td { border: hidden; text-align: right; }
252: .matrix { margin-left: 2em; }
253:
254: .dice-example { border-collapse: collapse; border-style: hidden solid solid hidden; border-width: thin; margin-left: 3em; }
255: .dice-example caption { width: 30em; font-size: smaller; font-style: italic; padding: 0.75em 0; text-align: left; }
256: .dice-example td, .dice-example th { border: solid thin; width: 1.35em; height: 1.05em; text-align: center; padding: 0; }
257:
258: td.eg { border-width: thin; text-align: center; }
259:
260: #table-example-1 { border: solid thin; border-collapse: collapse; margin-left: 3em; }
261: #table-example-1 * { font-family: "Essays1743", serif; line-height: 1.01em; }
262: #table-example-1 caption { padding-bottom: 0.5em; }
263: #table-example-1 thead, #table-example-1 tbody { border: none; }
264: #table-example-1 th, #table-example-1 td { border: solid thin; }
265: #table-example-1 th { font-weight: normal; }
266: #table-example-1 td { border-style: none solid; vertical-align: top; }
267: #table-example-1 th { padding: 0.5em; vertical-align: middle; text-align: center; }
268: #table-example-1 tbody tr:first-child td { padding-top: 0.5em; }
269: #table-example-1 tbody tr:last-child td { padding-bottom: 1.5em; }
270: #table-example-1 tbody td:first-child { padding-left: 2.5em; padding-right: 0; width: 9em; }
271: #table-example-1 tbody td:first-child::after { content: leader(". "); }
272: #table-example-1 tbody td { padding-left: 2em; padding-right: 2em; }
273: #table-example-1 tbody td:first-child + td { width: 10em; }
274: #table-example-1 tbody td:first-child + td ~ td { width: 2.5em; }
275: #table-example-1 tbody td:first-child + td + td + td ~ td { width: 1.25em; }
276:
277: .apple-table-examples { border: none; border-collapse: separate; border-spacing: 1.5em 0em; width: 40em; margin-left: 3em; }
278: .apple-table-examples * { font-family: "Times", serif; }
279: .apple-table-examples td, .apple-table-examples th { border: none; white-space: nowrap; padding-top: 0; padding-bottom: 0; }
280: .apple-table-examples tbody th:first-child { border-left: none; width: 100%; }
281: .apple-table-examples thead th:first-child ~ th { font-size: smaller; font-weight: bolder; border-bottom: solid 2px; text-align: center; }
282: .apple-table-examples tbody th::after, .apple-table-examples tfoot th::after { content: leader(". ") }
283: .apple-table-examples tbody th, .apple-table-examples tfoot th { font: inherit; text-align: left; }
284: .apple-table-examples td { text-align: right; vertical-align: top; }
285: .apple-table-examples.e1 tbody tr:last-child td { border-bottom: solid 1px; }
286: .apple-table-examples.e1 tbody + tbody tr:last-child td { border-bottom: double 3px; }
287: .apple-table-examples.e2 th[scope=row] { padding-left: 1em; }
288: .apple-table-examples sup { line-height: 0; }
289:
290: .details-example img { vertical-align: top; }
291:
292: #base64-table {
293: white-space: nowrap;
294: font-size: 0.6em;
295: column-width: 6em;
296: column-count: 5;
297: column-gap: 1em;
298: -moz-column-width: 6em;
299: -moz-column-count: 5;
300: -moz-column-gap: 1em;
301: -webkit-column-width: 6em;
302: -webkit-column-count: 5;
303: -webkit-column-gap: 1em;
304: }
305: #base64-table thead { display: none; }
306: #base64-table * { border: none; }
307: #base64-table tbody td:first-child:after { content: ':'; }
308: #base64-table tbody td:last-child { text-align: right; }
309:
310: #named-character-references-table {
311: white-space: nowrap;
312: font-size: 0.6em;
313: column-width: 30em;
314: column-gap: 1em;
315: -moz-column-width: 30em;
316: -moz-column-gap: 1em;
317: -webkit-column-width: 30em;
318: -webkit-column-gap: 1em;
319: }
320: #named-character-references-table > table > tbody > tr > td:first-child + td,
321: #named-character-references-table > table > tbody > tr > td:last-child { text-align: center; }
322: #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; }
323: #named-character-references-table > table > tbody > tr#entity-CounterClockwiseContourIntegral > td:first-child { font-size: 0.5em; }
324:
325: .glyph.control { color: red; }
326:
327: @font-face {
328: font-family: 'Essays1743';
1.129 mike 329: src: url('fonts/Essays1743.ttf');
1.1 mike 330: }
331: @font-face {
332: font-family: 'Essays1743';
333: font-weight: bold;
1.129 mike 334: src: url('fonts/Essays1743-Bold.ttf');
1.1 mike 335: }
336: @font-face {
337: font-family: 'Essays1743';
338: font-style: italic;
1.129 mike 339: src: url('fonts/Essays1743-Italic.ttf');
1.1 mike 340: }
341: @font-face {
342: font-family: 'Essays1743';
343: font-style: italic;
344: font-weight: bold;
1.129 mike 345: src: url('fonts/Essays1743-BoldItalic.ttf');
346: }
347:
348: /**/
349: /**/
350: </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"><script>
351:
352:
353: function getCookie(name) {
354: var params = location.search.substr(1).split("&");
355: for (var index = 0; index < params.length; index++) {
356: if (params[index] == name)
357: return "1";
358: var data = params[index].split("=");
359: if (data[0] == name)
360: return unescape(data[1]);
361: }
362: var cookies = document.cookie.split("; ");
363: for (var index = 0; index < cookies.length; index++) {
364: var data = cookies[index].split("=");
365: if (data[0] == name)
366: return unescape(data[1]);
367: }
368: return null;
1.1 mike 369: }
370:
1.129 mike 371:
372: </script><link href="the-script-element.html" rel="prev" title="4.3.1 The script element">
1.99 mike 373: <link href="Overview.html#contents" rel="contents" title="Table of contents">
1.91 mike 374: <link href="sections.html" rel="next" title="4.4 Sections">
1.129 mike 375: <body class="split chapter" onload="fixBrokenLink();"><div class="head" id="head" xmlns="">
1.9 mike 376: <div aria-haspopup="true" id="jumpIndexA-button" role="button" tabindex="0">jump
1.129 mike 377: <div id="jumpIndexA">
378: <ul><li><a class="noindex" href="the-a-element.html#the-a-element">a</a><a class="noindex" href="the-abbr-element.html#the-abbr-element">abbr</a><a class="noindex" href="the-address-element.html#the-address-element">address</a><a class="noindex" href="the-area-element.html#the-area-element">area</a><a class="noindex" href="the-article-element.html#the-article-element">article</a><a class="noindex" href="the-aside-element.html#the-aside-element">aside</a><a class="noindex" href="the-audio-element.html#the-audio-element">audio</a></li>
379: </ul><ul><li><a class="noindex" href="the-b-element.html#the-b-element">b</a><a class="noindex" href="the-base-element.html#the-base-element">base</a><a class="noindex" href="the-bdi-element.html#the-bdi-element">bdi</a><a class="noindex" href="the-bdo-element.html#the-bdo-element">bdo</a><a class="noindex" href="the-blockquote-element.html#the-blockquote-element">blockquote</a><a class="noindex" href="the-body-element.html#the-body-element">body</a><a class="noindex" href="the-br-element.html#the-br-element">br</a><a class="noindex" href="the-button-element.html#the-button-element">button</a></li>
380: </ul><ul><li><a class="noindex" href="the-canvas-element.html#the-canvas-element">canvas</a><a class="noindex" href="the-caption-element.html#the-caption-element">caption</a><a class="noindex" href="the-cite-element.html#the-cite-element">cite</a><a class="noindex" href="the-code-element.html#the-code-element">code</a><a class="noindex" href="the-col-element.html#the-col-element">col</a><a class="noindex" href="the-colgroup-element.html#the-colgroup-element">colgroup</a><a class="noindex" href="the-command-element.html#the-command-element">command</a></li>
381: </ul><ul><li><a class="noindex" href="the-datalist-element.html#the-datalist-element">datalist</a><a class="noindex" href="the-dd-element.html#the-dd-element">dd</a><a class="noindex" href="the-del-element.html#the-del-element">del</a><a class="noindex" href="the-details-element.html#the-details-element">details</a><a class="noindex" href="the-dfn-element.html#the-dfn-element">dfn</a><a class="noindex" href="the-div-element.html#the-div-element">div</a><a class="noindex" href="the-dl-element.html#the-dl-element">dl</a><a class="noindex" href="the-dt-element.html#the-dt-element">dt</a></li>
382: </ul><ul><li><a class="noindex" href="the-em-element.html#the-em-element">em</a><a class="noindex" href="the-embed-element.html#the-embed-element">embed</a><a class="noindex" href="the-fieldset-element.html#the-fieldset-element">fieldset</a><a class="noindex" href="the-figcaption-element.html#the-figcaption-element">figcaption</a><a class="noindex" href="the-figure-element.html#the-figure-element">figure</a><a class="noindex" href="the-footer-element.html#the-footer-element">footer</a><a class="noindex" href="the-form-element.html#the-form-element">form</a></li>
383: </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="the-head-element.html#the-head-element">head</a><a class="noindex" href="the-header-element.html#the-header-element">header</a><a class="noindex" href="the-hgroup-element.html#the-hgroup-element">hgroup</a><a class="noindex" href="the-hr-element.html#the-hr-element">hr</a><a class="noindex" href="the-html-element.html#the-html-element">html</a></li>
384: </ul><ul><li><a class="noindex" href="the-i-element.html#the-i-element">i</a><a class="noindex" href="the-iframe-element.html#the-iframe-element">iframe</a><a class="noindex" href="the-img-element.html#the-img-element">img</a><a class="noindex" href="the-input-element.html#the-input-element">input</a><a class="noindex" href="the-ins-element.html#the-ins-element">ins</a><a class="noindex" href="the-kbd-element.html#the-kbd-element">kbd</a><a class="noindex" href="the-keygen-element.html#the-keygen-element">keygen</a></li>
385: </ul><ul><li><a class="noindex" href="the-label-element.html#the-label-element">label</a><a class="noindex" href="the-legend-element.html#the-legend-element">legend</a><a class="noindex" href="the-li-element.html#the-li-element">li</a><a class="noindex" href="the-link-element.html#the-link-element">link</a><a class="noindex" href="the-map-element.html#the-map-element">map</a><a class="noindex" href="the-mark-element.html#the-mark-element">mark</a><a class="noindex" href="the-menu-element.html#the-menu-element">menu</a><a class="noindex" href="the-meta-element.html#the-meta-element">meta</a><a class="noindex" href="the-meter-element.html#the-meter-element">meter</a></li>
386: </ul><ul><li><a class="noindex" href="the-nav-element.html#the-nav-element">nav</a><a class="noindex" href="#the-noscript-element">noscript</a><a class="noindex" href="the-object-element.html#the-object-element">object</a><a class="noindex" href="the-ol-element.html#the-ol-element">ol</a><a class="noindex" href="the-optgroup-element.html#the-optgroup-element">optgroup</a><a class="noindex" href="the-option-element.html#the-option-element">option</a><a class="noindex" href="the-output-element.html#the-output-element">output</a></li>
387: </ul><ul><li><a class="noindex" href="the-p-element.html#the-p-element">p</a><a class="noindex" href="the-param-element.html#the-param-element">param</a><a class="noindex" href="the-pre-element.html#the-pre-element">pre</a><a class="noindex" href="the-progress-element.html#the-progress-element">progress</a><a class="noindex" href="the-q-element.html#the-q-element">q</a><a class="noindex" href="the-rp-element.html#the-rp-element">rp</a><a class="noindex" href="the-rt-element.html#the-rt-element">rt</a><a class="noindex" href="the-ruby-element.html#the-ruby-element">ruby</a></li>
388: </ul><ul><li><a class="noindex" href="the-s-element.html#the-s-element">s</a><a class="noindex" href="the-samp-element.html#the-samp-element">samp</a><a class="noindex" href="the-script-element.html#the-script-element">script</a><a class="noindex" href="the-section-element.html#the-section-element">section</a><a class="noindex" href="the-select-element.html#the-select-element">select</a><a class="noindex" href="the-small-element.html#the-small-element">small</a><a class="noindex" href="the-source-element.html#the-source-element">source</a><a class="noindex" href="the-span-element.html#the-span-element">span</a></li>
389: </ul><ul><li><a class="noindex" href="the-strong-element.html#the-strong-element">strong</a><a class="noindex" href="the-style-element.html#the-style-element">style</a><a class="noindex" href="the-sub-and-sup-elements.html#the-sub-and-sup-elements">sub</a><a class="noindex" href="the-summary-element.html#the-summary-element">summary</a><a class="noindex" href="the-sub-and-sup-elements.html#the-sub-and-sup-elements">sup</a></li>
390: </ul><ul><li><a class="noindex" href="the-table-element.html#the-table-element">table</a><a class="noindex" href="the-tbody-element.html#the-tbody-element">tbody</a><a class="noindex" href="the-td-element.html#the-td-element">td</a><a class="noindex" href="the-textarea-element.html#the-textarea-element">textarea</a><a class="noindex" href="the-tfoot-element.html#the-tfoot-element">tfoot</a><a class="noindex" href="the-th-element.html#the-th-element">th</a><a class="noindex" href="the-thead-element.html#the-thead-element">thead</a><a class="noindex" href="the-time-element.html#the-time-element">time</a><a class="noindex" href="the-title-element.html#the-title-element">title</a></li>
391: </ul><ul><li><a class="noindex" href="the-tr-element.html#the-tr-element">tr</a><a class="noindex" href="the-track-element.html#the-track-element">track</a><a class="noindex" href="the-u-element.html#the-u-element">u</a><a class="noindex" href="the-ul-element.html#the-ul-element">ul</a><a class="noindex" href="the-var-element.html#the-var-element">var</a><a class="noindex" href="the-video-element.html#the-video-element">video</a><a class="noindex" href="the-wbr-element.html#the-wbr-element">wbr</a></li>
392: </ul><ul class="jumpIndexA-other"><li><a class="noindex" href="global-attributes.html#global-attributes">global
393: attributes</a><a class="noindex" href="index-of-terms.html#index-of-terms">terms</a></li>
394: </ul></div>
395: </div>
396: <script src="jump-indexes.js">
397: </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>
398: <h1 xmlns="http://www.w3.org/1999/xhtml">HTML5</h1>
399: </div>
400: <div class="prev_next">
1.128 mike 401: <a href="the-script-element.html">← 4.3.1 The script element</a> –
1.1 mike 402: <a href="Overview.html#contents">Table of contents</a> –
1.128 mike 403: <a href="sections.html">4.4 Sections →</a>
1.1 mike 404: </div>
405:
1.129 mike 406: <h4 id="the-noscript-element"><span class="secno">4.3.2</span> The
407: <dfn><code>noscript</code></dfn> element</h4>
408: <dl class="element"><dt><a href="element-definitions.html#element-dfn-categories" id="element-dfn-categories_8" title="element-dfn-categories">Categories</a>:</dt>
409: <dd><a href="content-models.html#metadata-content-0" id="metadata-content_14">Metadata
410: content</a>.</dd>
411: <dd><a href="content-models.html#flow-content-1" id="flow-content_15">Flow
412: content</a>.</dd>
413: <dd><a href="content-models.html#phrasing-content-1" id="phrasing-content_18">Phrasing
414: content</a>.</dd>
415: <dt><a href="element-definitions.html#element-dfn-contexts" id="element-dfn-contexts_8" title="element-dfn-contexts">Contexts in which this element can be
416: used</a>:</dt>
417: <dd>In a <code><a href="the-head-element.html#the-head-element" id="head_19">head</a></code> element of an <a href="#html-documents" title="HTML documents">HTML document</a>, if there are no ancestor
418: <code><a href="#the-noscript-element" id="noscript_7">noscript</a></code> elements.</dd>
419: <dd>Where <a href="content-models.html#phrasing-content-1" id="phrasing-content_19">phrasing content</a> is expected in <a href="#html-documents">HTML documents</a>, if there are no ancestor
420: <code><a href="#the-noscript-element" id="noscript_8">noscript</a></code> elements.</dd>
421: <dt><a href="element-definitions.html#element-dfn-content-model" id="element-dfn-content-model_8" title="element-dfn-content-model">Content model</a>:</dt>
422: <dd>When <a href="#concept-n-noscript" title="concept-n-noscript">scripting is disabled</a>, in a <code><a href="the-head-element.html#the-head-element" id="head_20">head</a></code> element: in any
423: order, zero or more <code><a href="the-link-element.html#the-link-element" id="link_24">link</a></code> elements, zero or more <code><a href="the-style-element.html#the-style-element" id="style_29">style</a></code> elements, and
424: zero or more <code><a href="the-meta-element.html#the-meta-element">meta</a></code>
425: elements.</dd>
426: <dd>When <a href="#concept-n-noscript" title="concept-n-noscript">scripting is disabled</a>, not in a
427: <code><a href="the-head-element.html#the-head-element" id="head_21">head</a></code>
428: element: <a href="content-models.html#transparent" id="transparent_3">transparent</a>,
429: but there must be no <code><a href="#the-noscript-element" id="noscript_9">noscript</a></code> element descendants.</dd>
430: <dd>Otherwise: text that conforms to the requirements given in the
431: prose.</dd>
432: <dt><a href="element-definitions.html#element-dfn-attributes" id="element-dfn-attributes_8" title="element-dfn-attributes">Content attributes</a>:</dt>
433: <dd><a href="global-attributes.html#global-attributes" id="global-attributes_8">Global
434: attributes</a></dd>
435: <dt><a href="element-definitions.html#element-dfn-dom" id="element-dfn-dom_8" title="element-dfn-dom">DOM interface</a>:</dt>
436: <!--TOPIC:DOM APIs-->
437: <dd>Uses <code><a href="elements.html#htmlelement" id="htmlelement_13">HTMLElement</a></code>.</dd>
438: </dl><!--TOPIC:HTML--><p>The <code><a href="#the-noscript-element" id="noscript_10">noscript</a></code> element <a href="#represents">represents</a> nothing if <a href="#concept-n-script" title="concept-n-script">scripting is enabled</a>, and <a href="#represents">represents</a> its children if <a href="#concept-n-noscript" title="concept-n-noscript">scripting is
439: disabled</a>. It is used to present different markup to user agents
440: that support scripting and those that don't support scripting, by
441: affecting how the document is parsed.</p>
442: <p>When used in <a href="#html-documents">HTML documents</a>, the
443: allowed content model is as follows:</p>
444: <dl><dt>In a <code><a href="the-head-element.html#the-head-element" id="head_22">head</a></code> element, if <a href="#concept-n-noscript" title="concept-n-noscript">scripting is disabled</a> for the
445: <code><a href="#the-noscript-element" id="noscript_11">noscript</a></code> element</dt>
446: <dd>
447: <p>The <code><a href="#the-noscript-element" id="noscript_12">noscript</a></code> element must contain only
448: <code><a href="the-link-element.html#the-link-element" id="link_25">link</a></code>,
449: <code><a href="the-style-element.html#the-style-element" id="style_30">style</a></code>,
450: and <code><a href="the-meta-element.html#the-meta-element">meta</a></code> elements.</p>
451: </dd>
452: <dt>In a <code><a href="the-head-element.html#the-head-element" id="head_23">head</a></code> element, if <a href="#concept-n-script" title="concept-n-script">scripting is enabled</a> for the
453: <code><a href="#the-noscript-element" id="noscript_13">noscript</a></code> element</dt>
454: <dd>
455: <p>The <code><a href="#the-noscript-element" id="noscript_14">noscript</a></code> element must contain only text,
456: except that invoking the <a href="#html-fragment-parsing-algorithm">HTML fragment parsing
457: algorithm</a> <!-- (which disables <script> execution) --> with the
458: <code><a href="#the-noscript-element" id="noscript_15">noscript</a></code> element as the <var title="concept-frag-parse-context"><a href="#concept-frag-parse-context">context</a></var> element and the
459: text contents as the <var title="">input</var> must result in a
460: list of nodes that consists only of <code><a href="the-link-element.html#the-link-element" id="link_26">link</a></code>, <code><a href="the-style-element.html#the-style-element" id="style_31">style</a></code>, and
461: <code><a href="the-meta-element.html#the-meta-element">meta</a></code> elements that
462: would be conforming if they were children of the <code><a href="#the-noscript-element" id="noscript_16">noscript</a></code>
463: element, and no <a href="#parse-error" title="parse error">parse
464: errors</a>.</p>
465: </dd>
466: <dt>Outside of <code><a href="the-head-element.html#the-head-element" id="head_24">head</a></code> elements, if <a href="#concept-n-noscript" title="concept-n-noscript">scripting is
467: disabled</a> for the <code><a href="#the-noscript-element" id="noscript_17">noscript</a></code> element</dt>
468: <dd>
469: <p>The <code><a href="#the-noscript-element" id="noscript_18">noscript</a></code> element's content model is
470: <a href="content-models.html#transparent" id="transparent_4">transparent</a>, with the
471: additional restriction that a <code><a href="#the-noscript-element" id="noscript_19">noscript</a></code> element must not have a
472: <code><a href="#the-noscript-element" id="noscript_20">noscript</a></code> element as an ancestor (that is,
473: <code><a href="#the-noscript-element" id="noscript_21">noscript</a></code> can't be nested).</p>
474: </dd>
475: <dt>Outside of <code><a href="the-head-element.html#the-head-element" id="head_25">head</a></code> elements, if <a href="#concept-n-script" title="concept-n-script">scripting is enabled</a> for the
476: <code><a href="#the-noscript-element" id="noscript_22">noscript</a></code> element</dt>
477: <dd>
478: <p>The <code><a href="#the-noscript-element" id="noscript_23">noscript</a></code> element must contain only text,
479: except that the text must be such that running the following
480: algorithm results in a conforming document with no <code><a href="#the-noscript-element" id="noscript_24">noscript</a></code>
481: elements and no <code><a href="the-script-element.html#the-script-element">script</a></code> elements, and such that no
482: step in the algorithm causes an <a href="#html-parser">HTML
483: parser</a> to flag a <a href="#parse-error">parse error</a>:</p>
484: <ol><li>Remove every <code><a href="the-script-element.html#the-script-element">script</a></code> element from the
485: document.</li>
486: <li>Make a list of every <code><a href="#the-noscript-element" id="noscript_25">noscript</a></code> element in the document. For
487: every <code><a href="#the-noscript-element" id="noscript_26">noscript</a></code> element in that list, perform the
488: following steps:
489: <ol><li>Let the <var title="">parent element</var> be the parent
490: element of the <code><a href="#the-noscript-element" id="noscript_27">noscript</a></code> element.</li>
491: <li>Take all the children of the <var title="">parent element</var>
492: that come before the <code><a href="#the-noscript-element" id="noscript_28">noscript</a></code> element, and call these elements
493: <var title="">the before children</var>.</li>
494: <li>Take all the children of the <var title="">parent element</var>
495: that come <em>after</em> the <code><a href="#the-noscript-element" id="noscript_29">noscript</a></code> element, and call these
496: elements <var title="">the after children</var>.</li>
497: <li>Let <var title="">s</var> be the concatenation of all the
498: <code><a href="#text-0">Text</a></code> node children of the
499: <code><a href="#the-noscript-element" id="noscript_30">noscript</a></code> element.</li>
500: <li>Set the <code title="dom-innerHTML"><a href="#dom-innerhtml">innerHTML</a></code> attribute of the <var title="">parent element</var> to the value of <var title="">s</var>.
501: (This, as a side-effect, causes the <code><a href="#the-noscript-element" id="noscript_31">noscript</a></code>
502: element to be removed from the document.)</li>
503: <li>Insert <var title="">the before children</var> at the start of
504: the <var title="">parent element</var>, preserving their original
505: relative order.</li>
506: <li>Insert <var title="">the after children</var> at the end of the
507: <var title="">parent element</var>, preserving their original
508: relative order.</li>
509: </ol></li>
510: </ol></dd>
511: </dl><p class="note">All these contortions are required because, for
512: historical reasons, the <code><a href="#the-noscript-element" id="noscript_32">noscript</a></code> element is handled differently by
513: the <a href="#html-parser">HTML parser</a> based on whether
514: <a href="#scripting-flag" title="scripting flag">scripting was
515: enabled or not</a> when the parser was invoked.</p>
516: <p>The <code><a href="#the-noscript-element" id="noscript_33">noscript</a></code> element must not be used in
517: <a href="#xml-documents">XML documents</a>.</p>
518: <p class="note">The <code><a href="#the-noscript-element" id="noscript_34">noscript</a></code> element is only effective in
519: <a href="syntax.html#syntax" id="the-html-syntax_3">the HTML syntax</a>, it
520: has no effect in <a href="the-xhtml-syntax.html#the-xhtml-syntax">the XHTML syntax</a>.
521: This is because the way it works is by essentially "turning off"
522: the parser when scripts are enabled, so that the contents of the
523: element are treated as pure text and not as real elements. XML does
524: not define a mechanism by which to do this.</p>
525: <div class="example">
526: <p>In the following example, a <code><a href="#the-noscript-element" id="noscript_35">noscript</a></code>
527: element is used to provide fallback for a script.</p>
528: <pre>
529: <form action="calcSquare.php">
1.1 mike 530: <p>
531: <label for=x>Number</label>:
532: <input id="x" name="x" type="number">
533: </p>
534: <script>
535: var x = document.getElementById('x');
536: var output = document.createElement('p');
537: output.textContent = 'Type a number; it will be squared right then!';
538: x.form.appendChild(output);
539: x.form.onsubmit = function () { return false; }
540: x.oninput = function () {
541: var v = x.valueAsNumber;
542: output.textContent = v + ' squared is ' + v * v;
543: };
544: </script>
545: <noscript>
546: <input type=submit value="Calculate Square">
547: </noscript>
1.129 mike 548: </form>
549: </pre>
550: <p>When script is disabled, a button appears to do the calculation
551: on the server side. When script is enabled, the value is computed
552: on-the-fly instead.</p>
553: <p>The <code><a href="#the-noscript-element" id="noscript_36">noscript</a></code> element is a blunt instrument.
554: Sometimes, scripts might be enabled, but for some reason the page's
555: script might fail. For this reason, it's generally better to avoid
556: using <code><a href="#the-noscript-element" id="noscript_37">noscript</a></code>, and to instead design the script
557: to change the page from being a scriptless page to a scripted page
558: on the fly, as in the next example:</p>
559: <pre>
560: <form action="calcSquare.php">
1.1 mike 561: <p>
562: <label for=x>Number</label>:
563: <input id="x" name="x" type="number">
564: </p>
565: <strong><input id="submit" type=submit value="Calculate Square"></strong>
566: <script>
567: var x = document.getElementById('x');
568: var output = document.createElement('p');
569: output.textContent = 'Type a number; it will be squared right then!';
570: x.form.appendChild(output);
571: x.form.onsubmit = function () { return false; }
572: x.oninput = function () {
573: var v = x.valueAsNumber;
574: output.textContent = v + ' squared is ' + v * v;
575: };
576: <strong> var submit = document.getElementById('submit');
577: submit.parentNode.removeChild(submit);</strong>
578: </script>
1.129 mike 579: </form>
580: </pre>
581: <p>The above technique is also useful in XHTML, since
582: <code><a href="#the-noscript-element" id="noscript_38">noscript</a></code> is not supported in <a href="the-xhtml-syntax.html#the-xhtml-syntax">the XHTML syntax</a>.</p>
583: </div>
Webmaster