1 2 <!DOCTYPE html><html class=split data-revision="$Revision: 8844 $" lang=en-GB-x-hixie><title>HTML Standard</title><script> 3 var loadTimer = new Date(); 4 var current_revision = "r" + document.documentElement.getAttribute('data-revision').substr(11); 5 current_revision = current_revision.substr(0, current_revision.length - 2); 6 var last_known_revision = current_revision; 7 function F( /* varargs... */) { 8 var fragment = document.createDocumentFragment(); 9 for (var index = 0; index < arguments.length; index += 1) { 10 if (arguments[index] instanceof Array) { 11 fragment.appendChild(F.apply(this, arguments[index])); 12 } else if (typeof arguments[index] == 'string') { 13 fragment.appendChild(document.createTextNode(arguments[index])); 14 } else { 15 fragment.appendChild(arguments[index]); 16 } 17 } 18 return fragment; 19 } 20 function E(name, /* optional */ attributes /*, varargs... */) { 21 var element = document.createElement(name); 22 var index = 1; 23 if ((arguments.length > 1) && (typeof attributes != 'string') && 24 (!(attributes instanceof Node)) && (!(attributes instanceof Array))) { 25 for (var attName in attributes) { 26 if (typeof attributes[attName] == 'boolean') { 27 if (attributes[attName]) 28 element.setAttribute(attName, ''); 29 } else if (typeof attributes[attName] == 'function') { 30 element[attName] = attributes[attName]; 31 } else { 32 element.setAttribute(attName, attributes[attName]); 33 } 34 } 35 index = 2; 36 } 37 for (; index < arguments.length; index += 1) { 38 if (arguments[index] instanceof Array) { 39 element.appendChild(F.apply(this, arguments[index])); 40 } else if (typeof arguments[index] == 'string') { 41 element.appendChild(document.createTextNode(arguments[index])); 42 } else { 43 element.appendChild(arguments[index]); 44 } 45 } 46 return element; 47 } 48 function getCookie(name) { 49 var params = location.search.substr(1).split("&"); 50 for (var index = 0; index < params.length; index++) { 51 if (params[index] == name) 52 return "1"; 53 var data = params[index].split("="); 54 if (data[0] == name) 55 return unescape(data[1]); 56 } 57 var cookies = document.cookie.split("; "); 58 for (var index = 0; index < cookies.length; index++) { 59 var data = cookies[index].split("="); 60 if (data[0] == name) 61 return unescape(data[1]); 62 } 63 return null; 64 } 65 var currentAlert; 66 var currentAlertTimeout; 67 function showAlert(s, href) { 68 if (!currentAlert) { 69 currentAlert = document.createElement('div'); 70 currentAlert.id = 'alert'; 71 var x = document.createElement('button'); 72 x.textContent = '\u2573'; 73 x.onclick = closeAlert2; 74 currentAlert.appendChild(x); 75 currentAlert.appendChild(document.createElement('span')); 76 currentAlert.onmousemove = function () { 77 clearTimeout(currentAlertTimeout); 78 currentAlert.className = ''; 79 currentAlertTimeout = setTimeout(closeAlert, 10000); 80 } 81 document.body.appendChild(currentAlert); 82 } else { 83 clearTimeout(currentAlertTimeout); 84 currentAlert.className = ''; 85 } 86 currentAlert.lastChild.textContent = ''; 87 currentAlert.lastChild.appendChild(F(s)); 88 if (href) { 89 var link = document.createElement('a'); 90 link.href = href; 91 link.textContent = href; 92 currentAlert.lastChild.appendChild(F(' ', link)); 93 } 94 currentAlertTimeout = setTimeout(closeAlert, 10000); 95 } 96 function closeAlert() { 97 clearTimeout(currentAlertTimeout); 98 if (currentAlert) { 99 currentAlert.className = 'closed'; 100 currentAlertTimeout = setTimeout(closeAlert2, 3000); 101 } 102 } 103 function closeAlert2() { 104 clearTimeout(currentAlertTimeout); 105 if (currentAlert) { 106 currentAlert.parentNode.removeChild(currentAlert); 107 currentAlert = null; 108 } 109 } 110 window.addEventListener('keydown', function (event) { 111 if (event.keyCode == 27) { 112 if (currentAlert) 113 closeAlert2(); 114 } else { 115 closeAlert(); 116 } 117 }, false); 118 window.addEventListener('scroll', function (event) { 119 closeAlert(); 120 }, false); 121 function load(script) { 122 var e = document.createElement('script'); 123 e.setAttribute('src', '/' + script); 124 document.body.appendChild(e); 125 } 126 127 var startedInit = 0; 128 function init() { 129 startedInit = 1; 130 if (location.search == '?slow-browser') 131 return; 132 load('reviewer.js'); 133 if (document.documentElement.className == "big" || document.documentElement.className == "big split index") 134 load('toc.js'); 135 load('updater.js'); 136 load('dfn.js'); 137 load('status.js'); 138 if (getCookie('profile') == '1') 139 document.getElementsByTagName('h2')[0].textContent += '; load: ' + (new Date() - loadTimer) + 'ms'; 140 } 141 if (document.documentElement.className == "") 142 setTimeout(function () { 143 if (!startedInit) 144 showAlert("Too slow? Try reading the multipage copy of the spec instead:", "https://whatwg.org/html"); 145 }, 6000); 146 147 window.addEventListener('keypress', function (event) { 148 if ((event.which == 114) && (event.metaKey)) { 149 if (!confirm('Are you sure you want to reload this page?')) 150 event.preventDefault(); 151 } 152 }, false); 153 </script><script> 154 function toggleStatus(div) { 155 div.parentNode.classList.toggle('wrapped'); 156 } 157 </script><link rel=stylesheet href=https://whatwg.org/style/specification><link rel=icon href=https://whatwg.org/images/icon><style> 158 [hidden] { display: none; } 159 160 .proposal { border: blue solid; padding: 1em; } 161 .bad, .bad *:not(.X\58X) { color: gray; border-color: gray; background: transparent; } 162 #updatesStatus { display: none; z-index: 10; } 163 #updatesStatus.relevant { display: block; position: fixed; right: 1em; top: 1em; padding: 0.5em; font: bold small sans-serif; min-width: 25em; width: 30%; max-width: 40em; height: auto; border: ridge 4px gray; background: #EEEEEE; color: black; } 164 div.head .logo { width: 11em; margin-bottom: 20em; } 165 166 #configUI { position: absolute; z-index: 20; top: auto; right: 0; width: 11em; padding: 0 0.5em 0 0.5em; font-size: small; background: gray; background: rgba(32,32,32,0.9); color: white; border-radius: 0.5em 0 0 0.5em; } 167 #configUI p { margin: 0.75em 0; padding: 0.3em; } 168 #configUI p label { display: block; } 169 #configUI #updateUI, #configUI .loginUI { text-align: center; } 170 #configUI input[type=button] { display: block; margin: auto; } 171 #configUI :link, #configUI :visited { color: white; } 172 #configUI :link:hover, #configUI :visited:hover { background: transparent; } 173 174 #alert { position: fixed; top: 20%; left: 20%; right: 20%; font-size: 2em; padding: 0.5em; z-index: 40; background: gray; background: rgba(32,32,32,0.9); color: white; border-radius: 0.5em; transition: opacity 1s linear; } 175 #alert.closed { opacity: 0; } 176 #alert button { position: absolute; top: -1em; right: 2em; border-radius: 0.5em 0.5em 0 0; border: none; line-height: 0.9; color: white; background: rgb(64,64,64); font-size: 0.6em; font-weight: 900; cursor: pointer; padding: 0.25em; } 177 #alert :link, #alert :visited { color: white; text-decoration: underline; } 178 #alert :link:hover, #alert :visited:hover { background: transparent; } 179 180 @media print { #configUI, #alert { display: none; } } 181 182 .fingerprint { position: absolute; right: 0; z-index: 5; } 183 184 .status { font: 1em sans-serif; width: 9em; padding: 0.3em; position: absolute; z-index: 8; top: auto; right: 0.3em; background: #EEE; color: black; box-shadow: 0 0 3px #999; overflow: hidden; margin: -2em 0 0 0; border-collapse: initial; border-spacing: initial; } 185 .status.wrapped { width: 1em; height: 1em; } 186 .status.wrapped > :not(input) { display: none; } 187 .status > input { position: absolute; right: 0; top: 0; width: 1em; height: 1em; border: none; background: transparent; padding: 0; margin: 0; } 188 .status > p { font-size: 0.6em; margin: 0; padding: 0; } 189 .status > p + p { padding-top: 0.5em; } 190 .status > .support { display: block; } 191 .status > .support > span { padding: 0.2em 0; display: block; display: table; } 192 .status > .support > span.partial { color: #666666; filter: grayscale(50%); } 193 .status > .support > span.no { color: #CCCCCC; filter: grayscale(100%); } 194 .status > .support > span:first-of-type { padding-top: 0.5em; } 195 .status > .support > span > span { padding: 0 0.5em; display: table-cell; vertical-align: top; } 196 .status > .support > span > span:first-child { width: 100%; } 197 .status > .support > span > span:last-child { width: 100%; white-space: pre; padding: 0; } 198 .status > .support > span::before { content: ' '; display: table-cell; min-width: 1.5em; height: 1.5em; background: no-repeat center center; background-size: contain; text-align: right; font-size: 0.75em; font-weight: bold; } 199 .status > .support > .and_chr::before { background-image: url(https://resources.whatwg.org/browser-logos/chrome-android.png); } 200 .status > .support > .and_ff::before { background-image: url(https://resources.whatwg.org/browser-logos/firefox.png); } 201 .status > .support > .and_uc::before { background-image: url(https://resources.whatwg.org/browser-logos/uc.png); } /* UC Browser for Android */ 202 .status > .support > .android::before { background-image: url(https://resources.whatwg.org/browser-logos/android.svg); } 203 .status > .support > .bb::before { background-image: url(https://resources.whatwg.org/browser-logos/bb.jpg); } /* Blackberry Browser */ 204 .status > .support > .chrome::before { background-image: url(https://resources.whatwg.org/browser-logos/chrome.png); } 205 .status > .support > .firefox::before { background-image: url(https://resources.whatwg.org/browser-logos/firefox.png); } 206 .status > .support > .ie::before { background-image: url(https://resources.whatwg.org/browser-logos/ie.png); } 207 .status > .support > .ie_mob::before { background-image: url(https://resources.whatwg.org/browser-logos/ie-mobile.svg); } 208 .status > .support > .ios_saf::before { background-image: url(https://resources.whatwg.org/browser-logos/safari-ios.svg); } 209 .status > .support > .op_mini::before { background-image: url(https://resources.whatwg.org/browser-logos/opera-mobile.png); } 210 .status > .support > .op_mob::before { background-image: url(https://resources.whatwg.org/browser-logos/opera-mobile.png); } 211 .status > .support > .opera::before { background-image: url(https://resources.whatwg.org/browser-logos/opera.png); } 212 .status > .support > .safari::before { background-image: url(https://resources.whatwg.org/browser-logos/safari.png); } 213 .status > .caniuse { text-align: right; font-style: italic; } 214 215 .panel { position: fixed; z-index: 30; top: 10%; left: 0; margin: auto; right: 0; width: 35em; border: double thick; background: #EEEEEE; color: black; padding: 1em; font: 1em sans-serif; max-height: 70%; overflow: auto; } 216 .panel h2 { margin: 0; text-align: center; } 217 .panel ul { min-height: 6em; } 218 .panel p { text-align: right; margin: 0; } 219 .panel form { background: transparent; color: black; margin: 0.5em -0.5em 1em; padding: 0.5em; } 220 .panel form.changed { background: yellow; color: black; } 221 .panel form p { text-align: left; margin: 1em 0 0; } 222 .panel form p:first-child { margin-top: 0; } 223 .panel form p:last-child { margin-bottom: 0; } 224 .panel form p textarea { width: 100% /* need the keyword that makes it fit to the parent here XXX */; min-height: 4em; display: block; } 225 .panel form dl { line-height: 1.5em; } 226 .panel form dt { display: inline-block; width: 20em; white-space: nowrap; text-align: right; font-weight: normal; margin: 0; padding: 0; } 227 .panel form dd { display: inline; margin: 0 0 0 1em; padding: 0; } 228 .panel form dd:after { display: block; } 229 ul.checkboxes { list-style-type: none; } 230 .progress { text-decoration: blink; } 231 232 .applies .yes { background: yellow; } 233 </style><style> 234 .applies thead th > * { display: block; } 235 .applies thead code { display: block; } 236 .applies td { text-align: center; } 237 238 .matrix, .matrix td { border: hidden; text-align: right; } 239 .matrix { margin-left: 2em; } 240 241 .vertical-summary-table tr > th[rowspan="2"]:first-child + th, 242 .vertical-summary-table tr > td[rowspan="2"]:first-child + td { border-bottom: hidden; } 243 244 .dice-example { border-collapse: collapse; border-style: hidden solid solid hidden; border-width: thin; margin-left: 3em; } 245 .dice-example caption { width: 30em; font-size: smaller; font-style: italic; padding: 0.75em 0; text-align: left; } 246 .dice-example td, .dice-example th { border: solid thin; width: 1.35em; height: 1.05em; text-align: center; padding: 0; } 247 248 td.eg { border-width: thin; text-align: center; } 249 250 #table-example-1 { border: solid thin; border-collapse: collapse; margin-left: 3em; } 251 #table-example-1 caption { padding-bottom: 0.5em; } 252 #table-example-1 thead, #table-example-1 tbody { border: none; } 253 #table-example-1 th, #table-example-1 td { border: solid thin; } 254 #table-example-1 th { font-weight: normal; } 255 #table-example-1 td { border-style: none solid; vertical-align: top; } 256 #table-example-1 th { padding: 0.5em; vertical-align: middle; text-align: center; } 257 #table-example-1 tbody tr:first-child td { padding-top: 0.5em; } 258 #table-example-1 tbody tr:last-child td { padding-bottom: 1.5em; } 259 #table-example-1 tbody td:first-child { padding-left: 2.5em; padding-right: 0; width: 9em; } 260 #table-example-1 tbody td:first-child::after { content: leader(". "); } 261 #table-example-1 tbody td { padding-left: 2em; padding-right: 2em; } 262 #table-example-1 tbody td:first-child + td { width: 10em; } 263 #table-example-1 tbody td:first-child + td ~ td { width: 2.5em; } 264 #table-example-1 tbody td:first-child + td + td + td ~ td { width: 1.25em; } 265 266 .apple-table-examples { border: none; border-collapse: separate; border-spacing: 1.5em 0em; width: 40em; margin-left: 3em; } 267 .apple-table-examples * { font-family: "Times", serif; } 268 .apple-table-examples td, .apple-table-examples th { border: none; white-space: nowrap; padding-top: 0; padding-bottom: 0; } 269 .apple-table-examples tbody th:first-child { border-left: none; width: 100%; } 270 .apple-table-examples thead th:first-child ~ th { font-size: smaller; font-weight: bolder; border-bottom: solid 2px; text-align: center; } 271 .apple-table-examples tbody th::after, .apple-table-examples tfoot th::after { content: leader(". ") } 272 .apple-table-examples tbody th, .apple-table-examples tfoot th { font: inherit; text-align: left; } 273 .apple-table-examples td { text-align: right; vertical-align: top; } 274 .apple-table-examples.e1 tbody tr:last-child td { border-bottom: solid 1px; } 275 .apple-table-examples.e1 tbody + tbody tr:last-child td { border-bottom: double 3px; } 276 .apple-table-examples.e2 th[scope=row] { padding-left: 1em; } 277 .apple-table-examples sup { line-height: 0; } 278 279 .three-column-nowrap tr > td:first-child, 280 .three-column-nowrap tr > td:first-child + td, 281 .three-column-nowrap tr > td:first-child + td + td { white-space: nowrap; } 282 283 .details-example img { vertical-align: top; } 284 285 #base64-table { 286 white-space: nowrap; 287 font-size: 0.6em; 288 column-width: 6em; 289 column-count: 5; 290 column-gap: 1em; 291 -moz-column-width: 6em; 292 -moz-column-count: 5; 293 -moz-column-gap: 1em; 294 -webkit-column-width: 6em; 295 -webkit-column-count: 5; 296 -webkit-column-gap: 1em; 297 } 298 #base64-table thead { display: none; } 299 #base64-table * { border: none; } 300 #base64-table tbody td:first-child:after { content: ':'; } 301 #base64-table tbody td:last-child { text-align: right; } 302 303 #named-character-references-table { 304 white-space: nowrap; 305 font-size: 0.6em; 306 column-width: 30em; 307 column-gap: 1em; 308 -moz-column-width: 30em; 309 -moz-column-gap: 1em; 310 -webkit-column-width: 30em; 311 -webkit-column-gap: 1em; 312 } 313 #named-character-references-table > table > tbody > tr > td:first-child + td, 314 #named-character-references-table > table > tbody > tr > td:last-child { text-align: center; } 315 #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; } 316 #named-character-references-table > table > tbody > tr#entity-CounterClockwiseContourIntegral > td:first-child { font-size: 0.5em; } 317 318 .glyph.control { color: red; } 319 </style><style> 320 #table-example-1 * { font-family: "Essays1743", serif; line-height: 1.01em; } 321 @font-face { 322 font-family: 'Essays1743'; 323 src: url('/fonts/Essays1743.ttf'); 324 } 325 @font-face { 326 font-family: 'Essays1743'; 327 font-weight: bold; 328 src: url('/fonts/Essays1743-Bold.ttf'); 329 } 330 @font-face { 331 font-family: 'Essays1743'; 332 font-style: italic; 333 src: url('/fonts/Essays1743-Italic.ttf'); 334 } 335 @font-face { 336 font-family: 'Essays1743'; 337 font-style: italic; 338 font-weight: bold; 339 src: url('/fonts/Essays1743-BoldItalic.ttf'); 340 } 341 </style><script src=link-fixup.js></script><body onload=init()> 342 <header id=head class="head with-buttons"> 343 <p><a href=https://whatwg.org/ class=logo><img alt=WHATWG src=//whatwg.org/images/logo width=101 height=101></a></p> 344 <hgroup><h1 class=allcaps>HTML</h1><h2 id=living-standard--last-updated-[date:-01-jan-1901] class="no-num no-toc">Living Standard Last Updated <span class=pubdate>1 November 2014</span></h2></hgroup> 345 346 347 </header> 348 349 350 351 352 353 354 355 356 357 358 359 360 361 <nav><a href=webstorage.html> 11 Web storage</a> <a href=index.html>Table of Contents</a> <a href=xhtml.html>13 The XHTML syntax </a></nav><ol class=toc><li id=toc-syntax><a href=syntax.html#syntax>12 The HTML syntax</a><ol><li><a href=syntax.html#writing>12.1 Writing HTML documents</a><ol><li><a href=syntax.html#the-doctype>12.1.1 The DOCTYPE</a><li><a href=syntax.html#elements-2>12.1.2 Elements</a><ol><li><a href=syntax.html#start-tags>12.1.2.1 Start tags</a><li><a href=syntax.html#end-tags>12.1.2.2 End tags</a><li><a href=syntax.html#attributes-2>12.1.2.3 Attributes</a><li><a href=syntax.html#optional-tags>12.1.2.4 Optional tags</a><li><a href=syntax.html#element-restrictions>12.1.2.5 Restrictions on content models</a><li><a href=syntax.html#cdata-rcdata-restrictions>12.1.2.6 Restrictions on the contents of raw text and escapable raw text elements</a></ol><li><a href=syntax.html#text-2>12.1.3 Text</a><ol><li><a href=syntax.html#newlines>12.1.3.1 Newlines</a></ol><li><a href=syntax.html#character-references>12.1.4 Character references</a><li><a href=syntax.html#cdata-sections>12.1.5 CDATA sections</a><li><a href=syntax.html#comments>12.1.6 Comments</a></ol><li><a href=syntax.html#parsing>12.2 Parsing HTML documents</a><ol><li><a href=syntax.html#overview-of-the-parsing-model>12.2.1 Overview of the parsing model</a><li><a href=syntax.html#the-input-byte-stream>12.2.2 The input byte stream</a><ol><li><a href=syntax.html#parsing-with-a-known-character-encoding>12.2.2.1 Parsing with a known character encoding</a><li><a href=syntax.html#determining-the-character-encoding>12.2.2.2 Determining the character encoding</a><li><a href=syntax.html#character-encodings>12.2.2.3 Character encodings</a><li><a href=syntax.html#changing-the-encoding-while-parsing>12.2.2.4 Changing the encoding while parsing</a><li><a href=syntax.html#preprocessing-the-input-stream>12.2.2.5 Preprocessing the input stream</a></ol><li><a href=syntax.html#parse-state>12.2.3 Parse state</a><ol><li><a href=syntax.html#the-insertion-mode>12.2.3.1 The insertion mode</a><li><a href=syntax.html#the-stack-of-open-elements>12.2.3.2 The stack of open elements</a><li><a href=syntax.html#the-list-of-active-formatting-elements>12.2.3.3 The list of active formatting elements</a><li><a href=syntax.html#the-element-pointers>12.2.3.4 The element pointers</a><li><a href=syntax.html#other-parsing-state-flags>12.2.3.5 Other parsing state flags</a></ol><li><a href=syntax.html#tokenization>12.2.4 Tokenization</a><ol><li><a href=syntax.html#data-state>12.2.4.1 Data state</a><li><a href=syntax.html#character-reference-in-data-state>12.2.4.2 Character reference in data state</a><li><a href=syntax.html#rcdata-state>12.2.4.3 RCDATA state</a><li><a href=syntax.html#character-reference-in-rcdata-state>12.2.4.4 Character reference in RCDATA state</a><li><a href=syntax.html#rawtext-state>12.2.4.5 RAWTEXT state</a><li><a href=syntax.html#script-data-state>12.2.4.6 Script data state</a><li><a href=syntax.html#plaintext-state>12.2.4.7 PLAINTEXT state</a><li><a href=syntax.html#tag-open-state>12.2.4.8 Tag open state</a><li><a href=syntax.html#end-tag-open-state>12.2.4.9 End tag open state</a><li><a href=syntax.html#tag-name-state>12.2.4.10 Tag name state</a><li><a href=syntax.html#rcdata-less-than-sign-state>12.2.4.11 RCDATA less-than sign state</a><li><a href=syntax.html#rcdata-end-tag-open-state>12.2.4.12 RCDATA end tag open state</a><li><a href=syntax.html#rcdata-end-tag-name-state>12.2.4.13 RCDATA end tag name state</a><li><a href=syntax.html#rawtext-less-than-sign-state>12.2.4.14 RAWTEXT less-than sign state</a><li><a href=syntax.html#rawtext-end-tag-open-state>12.2.4.15 RAWTEXT end tag open state</a><li><a href=syntax.html#rawtext-end-tag-name-state>12.2.4.16 RAWTEXT end tag name state</a><li><a href=syntax.html#script-data-less-than-sign-state>12.2.4.17 Script data less-than sign state</a><li><a href=syntax.html#script-data-end-tag-open-state>12.2.4.18 Script data end tag open state</a><li><a href=syntax.html#script-data-end-tag-name-state>12.2.4.19 Script data end tag name state</a><li><a href=syntax.html#script-data-escape-start-state>12.2.4.20 Script data escape start state</a><li><a href=syntax.html#script-data-escape-start-dash-state>12.2.4.21 Script data escape start dash state</a><li><a href=syntax.html#script-data-escaped-state>12.2.4.22 Script data escaped state</a><li><a href=syntax.html#script-data-escaped-dash-state>12.2.4.23 Script data escaped dash state</a><li><a href=syntax.html#script-data-escaped-dash-dash-state>12.2.4.24 Script data escaped dash dash state</a><li><a href=syntax.html#script-data-escaped-less-than-sign-state>12.2.4.25 Script data escaped less-than sign state</a><li><a href=syntax.html#script-data-escaped-end-tag-open-state>12.2.4.26 Script data escaped end tag open state</a><li><a href=syntax.html#script-data-escaped-end-tag-name-state>12.2.4.27 Script data escaped end tag name state</a><li><a href=syntax.html#script-data-double-escape-start-state>12.2.4.28 Script data double escape start state</a><li><a href=syntax.html#script-data-double-escaped-state>12.2.4.29 Script data double escaped state</a><li><a href=syntax.html#script-data-double-escaped-dash-state>12.2.4.30 Script data double escaped dash state</a><li><a href=syntax.html#script-data-double-escaped-dash-dash-state>12.2.4.31 Script data double escaped dash dash state</a><li><a href=syntax.html#script-data-double-escaped-less-than-sign-state>12.2.4.32 Script data double escaped less-than sign state</a><li><a href=syntax.html#script-data-double-escape-end-state>12.2.4.33 Script data double escape end state</a><li><a href=syntax.html#before-attribute-name-state>12.2.4.34 Before attribute name state</a><li><a href=syntax.html#attribute-name-state>12.2.4.35 Attribute name state</a><li><a href=syntax.html#after-attribute-name-state>12.2.4.36 After attribute name state</a><li><a href=syntax.html#before-attribute-value-state>12.2.4.37 Before attribute value state</a><li><a href=syntax.html#attribute-value-(double-quoted)-state>12.2.4.38 Attribute value (double-quoted) state</a><li><a href=syntax.html#attribute-value-(single-quoted)-state>12.2.4.39 Attribute value (single-quoted) state</a><li><a href=syntax.html#attribute-value-(unquoted)-state>12.2.4.40 Attribute value (unquoted) state</a><li><a href=syntax.html#character-reference-in-attribute-value-state>12.2.4.41 Character reference in attribute value state</a><li><a href=syntax.html#after-attribute-value-(quoted)-state>12.2.4.42 After attribute value (quoted) state</a><li><a href=syntax.html#self-closing-start-tag-state>12.2.4.43 Self-closing start tag state</a><li><a href=syntax.html#bogus-comment-state>12.2.4.44 Bogus comment state</a><li><a href=syntax.html#markup-declaration-open-state>12.2.4.45 Markup declaration open state</a><li><a href=syntax.html#comment-start-state>12.2.4.46 Comment start state</a><li><a href=syntax.html#comment-start-dash-state>12.2.4.47 Comment start dash state</a><li><a href=syntax.html#comment-state>12.2.4.48 Comment state</a><li><a href=syntax.html#comment-end-dash-state>12.2.4.49 Comment end dash state</a><li><a href=syntax.html#comment-end-state>12.2.4.50 Comment end state</a><li><a href=syntax.html#comment-end-bang-state>12.2.4.51 Comment end bang state</a><li><a href=syntax.html#doctype-state>12.2.4.52 DOCTYPE state</a><li><a href=syntax.html#before-doctype-name-state>12.2.4.53 Before DOCTYPE name state</a><li><a href=syntax.html#doctype-name-state>12.2.4.54 DOCTYPE name state</a><li><a href=syntax.html#after-doctype-name-state>12.2.4.55 After DOCTYPE name state</a><li><a href=syntax.html#after-doctype-public-keyword-state>12.2.4.56 After DOCTYPE public keyword state</a><li><a href=syntax.html#before-doctype-public-identifier-state>12.2.4.57 Before DOCTYPE public identifier state</a><li><a href=syntax.html#doctype-public-identifier-(double-quoted)-state>12.2.4.58 DOCTYPE public identifier (double-quoted) state</a><li><a href=syntax.html#doctype-public-identifier-(single-quoted)-state>12.2.4.59 DOCTYPE public identifier (single-quoted) state</a><li><a href=syntax.html#after-doctype-public-identifier-state>12.2.4.60 After DOCTYPE public identifier state</a><li><a href=syntax.html#between-doctype-public-and-system-identifiers-state>12.2.4.61 Between DOCTYPE public and system identifiers state</a><li><a href=syntax.html#after-doctype-system-keyword-state>12.2.4.62 After DOCTYPE system keyword state</a><li><a href=syntax.html#before-doctype-system-identifier-state>12.2.4.63 Before DOCTYPE system identifier state</a><li><a href=syntax.html#doctype-system-identifier-(double-quoted)-state>12.2.4.64 DOCTYPE system identifier (double-quoted) state</a><li><a href=syntax.html#doctype-system-identifier-(single-quoted)-state>12.2.4.65 DOCTYPE system identifier (single-quoted) state</a><li><a href=syntax.html#after-doctype-system-identifier-state>12.2.4.66 After DOCTYPE system identifier state</a><li><a href=syntax.html#bogus-doctype-state>12.2.4.67 Bogus DOCTYPE state</a><li><a href=syntax.html#cdata-section-state>12.2.4.68 CDATA section state</a><li><a href=syntax.html#tokenizing-character-references>12.2.4.69 Tokenizing character references</a></ol><li><a href=syntax.html#tree-construction>12.2.5 Tree construction</a><ol><li><a href=syntax.html#creating-and-inserting-nodes>12.2.5.1 Creating and inserting nodes</a><li><a href=syntax.html#parsing-elements-that-contain-only-text>12.2.5.2 Parsing elements that contain only text</a><li><a href=syntax.html#closing-elements-that-have-implied-end-tags>12.2.5.3 Closing elements that have implied end tags</a><li><a href=syntax.html#parsing-main-inhtml>12.2.5.4 The rules for parsing tokens in HTML content</a><ol><li><a href=syntax.html#the-initial-insertion-mode>12.2.5.4.1 The "initial" insertion mode</a><li><a href=syntax.html#the-before-html-insertion-mode>12.2.5.4.2 The "before html" insertion mode</a><li><a href=syntax.html#the-before-head-insertion-mode>12.2.5.4.3 The "before head" insertion mode</a><li><a href=syntax.html#parsing-main-inhead>12.2.5.4.4 The "in head" insertion mode</a><li><a href=syntax.html#parsing-main-inheadnoscript>12.2.5.4.5 The "in head noscript" insertion mode</a><li><a href=syntax.html#the-after-head-insertion-mode>12.2.5.4.6 The "after head" insertion mode</a><li><a href=syntax.html#parsing-main-inbody>12.2.5.4.7 The "in body" insertion mode</a><li><a href=syntax.html#parsing-main-incdata>12.2.5.4.8 The "text" insertion mode</a><li><a href=syntax.html#parsing-main-intable>12.2.5.4.9 The "in table" insertion mode</a><li><a href=syntax.html#parsing-main-intabletext>12.2.5.4.10 The "in table text" insertion mode</a><li><a href=syntax.html#parsing-main-incaption>12.2.5.4.11 The "in caption" insertion mode</a><li><a href=syntax.html#parsing-main-incolgroup>12.2.5.4.12 The "in column group" insertion mode</a><li><a href=syntax.html#parsing-main-intbody>12.2.5.4.13 The "in table body" insertion mode</a><li><a href=syntax.html#parsing-main-intr>12.2.5.4.14 The "in row" insertion mode</a><li><a href=syntax.html#parsing-main-intd>12.2.5.4.15 The "in cell" insertion mode</a><li><a href=syntax.html#parsing-main-inselect>12.2.5.4.16 The "in select" insertion mode</a><li><a href=syntax.html#parsing-main-inselectintable>12.2.5.4.17 The "in select in table" insertion mode</a><li><a href=syntax.html#parsing-main-intemplate>12.2.5.4.18 The "in template" insertion mode</a><li><a href=syntax.html#parsing-main-afterbody>12.2.5.4.19 The "after body" insertion mode</a><li><a href=syntax.html#parsing-main-inframeset>12.2.5.4.20 The "in frameset" insertion mode</a><li><a href=syntax.html#parsing-main-afterframeset>12.2.5.4.21 The "after frameset" insertion mode</a><li><a href=syntax.html#the-after-after-body-insertion-mode>12.2.5.4.22 The "after after body" insertion mode</a><li><a href=syntax.html#the-after-after-frameset-insertion-mode>12.2.5.4.23 The "after after frameset" insertion mode</a></ol><li><a href=syntax.html#parsing-main-inforeign>12.2.5.5 The rules for parsing tokens in foreign content</a></ol><li><a href=syntax.html#the-end>12.2.6 The end</a><li><a href=syntax.html#coercing-an-html-dom-into-an-infoset>12.2.7 Coercing an HTML DOM into an infoset</a><li><a href=syntax.html#an-introduction-to-error-handling-and-strange-cases-in-the-parser>12.2.8 An introduction to error handling and strange cases in the parser</a><ol><li><a href=syntax.html#misnested-tags:-b-i-/b-/i>12.2.8.1 Misnested tags: <b><i></b></i></a><li><a href=syntax.html#misnested-tags:-b-p-/b-/p>12.2.8.2 Misnested tags: <b><p></b></p></a><li><a href=syntax.html#unexpected-markup-in-tables>12.2.8.3 Unexpected markup in tables</a><li><a href=syntax.html#scripts-that-modify-the-page-as-it-is-being-parsed>12.2.8.4 Scripts that modify the page as it is being parsed</a><li><a href=syntax.html#the-execution-of-scripts-that-are-moving-across-multiple-documents>12.2.8.5 The execution of scripts that are moving across multiple documents</a><li><a href=syntax.html#unclosed-formatting-elements>12.2.8.6 Unclosed formatting elements</a></ol></ol><li><a href=syntax.html#serialising-html-fragments>12.3 Serialising HTML fragments</a><li><a href=syntax.html#parsing-html-fragments>12.4 Parsing HTML fragments</a><li><a href=syntax.html#named-character-references>12.5 Named character references</a></ol></ol><h2 id=syntax>12 <dfn>The HTML syntax</dfn></h2> 362 363 <p class=note>This section only describes the rules for resources labeled with an <a id=syntax:html-mime-type href=infrastructure.html#html-mime-type>HTML 364 MIME type</a>. Rules for XML resources are discussed in the section below entitled "<a id=syntax:the-xhtml-syntax href=xhtml.html#the-xhtml-syntax>The 365 XHTML syntax</a>".</p> 366 367 368 <h3 id=writing>12.1 Writing HTML documents</h3> 369 370 371 372 <p><i>This section only applies to documents, authoring tools, and markup generators. In 373 particular, it does not apply to conformance checkers; conformance checkers must use the 374 requirements given in the next section ("parsing HTML documents").</i></p> 375 376 377 378 <p>Documents must consist of the following parts, in the given 379 order:</p> 380 381 <ol><li>Optionally, a single U+FEFF BYTE ORDER MARK (BOM) character.<li>Any number of <a href=#syntax-comments id=writing:syntax-comments>comments</a> and <a href=infrastructure.html#space-character id=writing:space-character>space characters</a>.<li>A <a href=#syntax-doctype id=writing:syntax-doctype>DOCTYPE</a>. 382 383 <li>Any number of <a href=#syntax-comments id=writing:syntax-comments-2>comments</a> and <a href=infrastructure.html#space-character id=writing:space-character-2>space characters</a>.<li>The root element, in the form of an <code id=writing:the-html-element><a href=semantics.html#the-html-element>html</a></code> <a href=#syntax-elements id=writing:syntax-elements>element</a>.<li>Any number of <a href=#syntax-comments id=writing:syntax-comments-3>comments</a> and <a href=infrastructure.html#space-character id=writing:space-character-3>space characters</a>.</ol> 384 385 <p>The various types of content mentioned above are described in the next few sections.</p> 386 387 <p>In addition, there are some restrictions on how <a href=semantics.html#character-encoding-declaration id=writing:character-encoding-declaration>character encoding declarations</a> are to be serialised, as discussed in the 388 section on that topic.</p> 389 390 <div class=note> 391 392 <p>Space characters before the root <code id=writing:the-html-element-2><a href=semantics.html#the-html-element>html</a></code> element, and space characters at the start 393 of the <code id=writing:the-html-element-3><a href=semantics.html#the-html-element>html</a></code> element and before the <code id=writing:the-head-element><a href=semantics.html#the-head-element>head</a></code> element, will be dropped when 394 the document is parsed; space characters <em>after</em> the root <code id=writing:the-html-element-4><a href=semantics.html#the-html-element>html</a></code> element will 395 be parsed as if they were at the end of the <code id=writing:the-body-element><a href=semantics.html#the-body-element>body</a></code> element. Thus, space characters 396 around the root element do not round-trip.</p> 397 398 <p>It is suggested that newlines be inserted after the DOCTYPE, after any comments that are 399 before the root element, after the <code id=writing:the-html-element-5><a href=semantics.html#the-html-element>html</a></code> element's start tag (if it is not <a href=#syntax-tag-omission id=writing:syntax-tag-omission>omitted</a>), and after any comments that are inside the 400 <code id=writing:the-html-element-6><a href=semantics.html#the-html-element>html</a></code> element but before the <code id=writing:the-head-element-2><a href=semantics.html#the-head-element>head</a></code> element.</p> 401 402 </div> 403 404 <p>Many strings in the HTML syntax (e.g. the names of elements and their attributes) are 405 case-insensitive, but only for <a id=writing:uppercase-ascii-letters href=infrastructure.html#uppercase-ascii-letters>uppercase ASCII letters</a> and <a id=writing:lowercase-ascii-letters href=infrastructure.html#lowercase-ascii-letters>lowercase ASCII 406 letters</a>. For convenience, in this section this is just referred to as 407 "case-insensitive".</p> 408 409 410 <h4 id=the-doctype>12.1.1 The DOCTYPE</h4><div class=status><input onclick=toggleStatus(this) value= type=button><p class=bugs><strong>Spec bugs:</strong> <a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=25232" title="De-emphasis DOCTYPE: shift focus from required preamble to required rendering mode">25232</a></div> 411 412 <p>A <dfn id=syntax-doctype>DOCTYPE</dfn> is a 413 required preamble.</p> 414 415 <p class=note>DOCTYPEs are required for legacy reasons. When omitted, browsers tend to use a 416 different rendering mode that is incompatible with some specifications. Including the DOCTYPE in a 417 document ensures that the browser makes a best-effort attempt at following the relevant 418 specifications.</p> 419 420 <p>A DOCTYPE must consist of the following components, in this order:</p> 421 422 <ol class=brief><li>A string that is an <a id=the-doctype:ascii-case-insensitive href=infrastructure.html#ascii-case-insensitive>ASCII case-insensitive</a> match for the string "<code><!DOCTYPE</code>".<li>One or more <a href=infrastructure.html#space-character id=the-doctype:space-character>space characters</a>.<li>A string that is an <a id=the-doctype:ascii-case-insensitive-2 href=infrastructure.html#ascii-case-insensitive>ASCII case-insensitive</a> match for the string "<code>html</code>".<li>Optionally, a <a href=#doctype-legacy-string id=the-doctype:doctype-legacy-string>DOCTYPE legacy string</a> or an <a href=#obsolete-permitted-doctype-string id=the-doctype:obsolete-permitted-doctype-string>obsolete permitted DOCTYPE string</a> (defined below).<li>Zero or more <a href=infrastructure.html#space-character id=the-doctype:space-character-2>space characters</a>.<li>A U+003E GREATER-THAN SIGN character (>).</ol> 423 424 <p class=note>In other words, <code><!DOCTYPE html></code>, case-insensitively.</p> 425 426 <hr> 427 428 <p>For the purposes of HTML generators that cannot output HTML markup with the short DOCTYPE 429 "<code><!DOCTYPE html></code>", a <dfn id=doctype-legacy-string>DOCTYPE legacy string</dfn> may be inserted 430 into the DOCTYPE (in the position defined above). This string must consist of:</p> 431 432 <ol class=brief><li>One or more <a href=infrastructure.html#space-character id=the-doctype:space-character-3>space characters</a>.<li>A string that is an <a id=the-doctype:ascii-case-insensitive-3 href=infrastructure.html#ascii-case-insensitive>ASCII case-insensitive</a> match for the string "<code>SYSTEM</code>".<li>One or more <a href=infrastructure.html#space-character id=the-doctype:space-character-4>space characters</a>.<li>A U+0022 QUOTATION MARK or U+0027 APOSTROPHE character (the <i>quote mark</i>).<li>The literal string "<code id=the-doctype:about:legacy-compat><a href=infrastructure.html#about:legacy-compat>about:legacy-compat</a></code>".<li>A matching U+0022 QUOTATION MARK or U+0027 APOSTROPHE character (i.e. the same character as in the earlier step labeled <i>quote mark</i>).</ol> 433 434 <p class=note>In other words, <code><!DOCTYPE html SYSTEM "about:legacy-compat"></code> or 435 <code><!DOCTYPE html SYSTEM 'about:legacy-compat'></code>, case-insensitively except for the 436 part in single or double quotes.</p> 437 438 <p>The <a href=#doctype-legacy-string id=the-doctype:doctype-legacy-string-2>DOCTYPE legacy string</a> should not be used unless the document is generated from 439 a system that cannot output the shorter string.</p> 440 441 <hr> 442 443 444 445 <p>To help authors transition from HTML4 and XHTML1, an <dfn id=obsolete-permitted-doctype-string>obsolete permitted DOCTYPE 446 string</dfn> can be inserted into the DOCTYPE (in the position defined above). This string must 447 consist of:<div class=status><input onclick=toggleStatus(this) value= type=button><p class=bugs><strong>Spec bugs:</strong> <a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=23753" title="A more informative message for obsolete permitted DOCTYPE">23753</a></div> 448 449 <ol class=brief><li>One or more <a href=infrastructure.html#space-character id=the-doctype:space-character-5>space characters</a>.<li>A string that is an <a id=the-doctype:ascii-case-insensitive-4 href=infrastructure.html#ascii-case-insensitive>ASCII case-insensitive</a> match for the string "<code>PUBLIC</code>".<li>One or more <a href=infrastructure.html#space-character id=the-doctype:space-character-6>space characters</a>.<li>A U+0022 QUOTATION MARK or U+0027 APOSTROPHE character (the <i>first quote mark</i>).<li>The string from one of the cells in the first column of the table below. The row to which this cell belongs is the <i>selected row</i>.<li>A matching U+0022 QUOTATION MARK or U+0027 APOSTROPHE character (i.e. the same character as in the earlier step labeled <i>first quote mark</i>).<li>If the cell in the second column of the <i>selected row</i> is not blank, one or more <a href=infrastructure.html#space-character id=the-doctype:space-character-7>space characters</a>.<li>If the cell in the second column of the <i>selected row</i> is not blank, a U+0022 QUOTATION MARK or U+0027 APOSTROPHE character (the <i>third quote mark</i>).<li>If the cell in the second column of the <i>selected row</i> is not blank, the string from the cell in the second column of the <i>selected row</i>.<li>If the cell in the second column of the <i>selected row</i> is not blank, a matching U+0022 QUOTATION MARK or U+0027 APOSTROPHE character (i.e. the same character as in the earlier step labeled <i>third quote mark</i>).</ol> 450 451 <table><caption> 452 Allowed values for public and system identifiers in an <a href=#obsolete-permitted-doctype-string id=the-doctype:obsolete-permitted-doctype-string-2>obsolete permitted DOCTYPE string</a>. 453 </caption><thead><tr><th> Public identifier 454 <th> System identifier 455 <tbody><tr><td> <code>-//W3C//DTD HTML 4.0//EN</code> 456 <td> 457 <tr><td> <code>-//W3C//DTD HTML 4.0//EN</code> 458 <td> <code>http://www.w3.org/TR/REC-html40/strict.dtd</code> 459 <tr><td> <code>-//W3C//DTD HTML 4.01//EN</code> 460 <td> 461 <tr><td> <code>-//W3C//DTD HTML 4.01//EN</code> 462 <td> <code>http://www.w3.org/TR/html4/strict.dtd</code> 463 <tr><td> <code>-//W3C//DTD XHTML 1.0 Strict//EN</code> 464 <td> <code>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</code> 465 <tr><td> <code>-//W3C//DTD XHTML 1.1//EN</code> 466 <td> <code>http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd</code> 467 </table> 468 469 <p>A <a href=#syntax-doctype id=the-doctype:syntax-doctype>DOCTYPE</a> containing an <a href=#obsolete-permitted-doctype-string id=the-doctype:obsolete-permitted-doctype-string-3>obsolete permitted DOCTYPE 470 string</a> is an <dfn id=obsolete-permitted-doctype>obsolete permitted DOCTYPE</dfn>. Authors should not use <a href=#obsolete-permitted-doctype id=the-doctype:obsolete-permitted-doctype>obsolete permitted DOCTYPEs</a>, as they are unnecessarily 471 long.</p> 472 473 474 475 476 <h4 id=elements-2>12.1.2 Elements</h4> 477 478 <p>There are five different kinds of <dfn id=syntax-elements>elements</dfn>: <a href=#void-elements id=elements-2:void-elements>void 479 elements</a>, <a href=#raw-text-elements id=elements-2:raw-text-elements>raw text elements</a>, <a href=#escapable-raw-text-elements id=elements-2:escapable-raw-text-elements>escapable raw text elements</a>, 480 <a href=#foreign-elements id=elements-2:foreign-elements>foreign elements</a>, and <a href=#normal-elements id=elements-2:normal-elements>normal elements</a>.</p> 481 482 <dl><dt><dfn id=void-elements>Void elements</dfn><dd><code id=elements-2:the-area-element><a href=embedded-content.html#the-area-element>area</a></code>, <code id=elements-2:the-base-element><a href=semantics.html#the-base-element>base</a></code>, <code id=elements-2:the-br-element><a href=semantics.html#the-br-element>br</a></code>, <code id=elements-2:the-col-element><a href=tables.html#the-col-element>col</a></code>, <code id=elements-2:the-embed-element><a href=embedded-content.html#the-embed-element>embed</a></code>, 483 <code id=elements-2:the-hr-element><a href=semantics.html#the-hr-element>hr</a></code>, <code id=elements-2:the-img-element><a href=embedded-content.html#the-img-element>img</a></code>, <code id=elements-2:the-input-element><a href=forms.html#the-input-element>input</a></code>, <code id=elements-2:the-keygen-element><a href=forms.html#the-keygen-element>keygen</a></code>, <code id=elements-2:the-link-element><a href=semantics.html#the-link-element>link</a></code>, 484 <code id=elements-2:the-menuitem-element><a href=forms.html#the-menuitem-element>menuitem</a></code>, <code id=elements-2:the-meta-element><a href=semantics.html#the-meta-element>meta</a></code>, <code id=elements-2:the-param-element><a href=embedded-content.html#the-param-element>param</a></code>, <code id=elements-2:the-source-element><a href=embedded-content.html#the-source-element>source</a></code>, 485 <code id=elements-2:the-track-element><a href=embedded-content.html#the-track-element>track</a></code>, <code id=elements-2:the-wbr-element><a href=semantics.html#the-wbr-element>wbr</a></code><dt><dfn id=raw-text-elements>Raw text elements</dfn><dd><code id=elements-2:the-script-element><a href=scripting.html#the-script-element>script</a></code>, <code id=elements-2:the-style-element><a href=semantics.html#the-style-element>style</a></code><dt><dfn id=escapable-raw-text-elements>escapable raw text elements</dfn><dd><code id=elements-2:the-textarea-element><a href=forms.html#the-textarea-element>textarea</a></code>, <code id=elements-2:the-title-element><a href=semantics.html#the-title-element>title</a></code><dt><dfn id=foreign-elements>Foreign elements</dfn><dd>Elements from the <a id=elements-2:mathml-namespace href=infrastructure.html#mathml-namespace>MathML namespace</a> and the <a id=elements-2:svg-namespace href=infrastructure.html#svg-namespace>SVG namespace</a>.<dt><dfn id=normal-elements>Normal elements</dfn><dd>All other allowed <a id=elements-2:html-elements href=infrastructure.html#html-elements>HTML elements</a> are normal elements.</dl> 486 487 <p><dfn id=syntax-tags>Tags</dfn> are used to delimit the start and end of elements in the 488 markup. <a href=#raw-text-elements id=elements-2:raw-text-elements-2>Raw text</a>, <a href=#escapable-raw-text-elements id=elements-2:escapable-raw-text-elements-2>escapable raw text</a>, and <a href=#normal-elements id=elements-2:normal-elements-2>normal</a> elements have 489 a <a href=#syntax-start-tag id=elements-2:syntax-start-tag>start tag</a> to indicate where they begin, and an <a href=#syntax-end-tag id=elements-2:syntax-end-tag>end tag</a> to indicate where they end. The start and end tags of 490 certain <a href=#normal-elements id=elements-2:normal-elements-3>normal elements</a> can be <a href=#syntax-tag-omission id=elements-2:syntax-tag-omission>omitted</a>, as 491 described below in the section on <a href=#syntax-tag-omission id=elements-2:syntax-tag-omission-2>optional tags</a>. Those 492 that cannot be omitted must not be omitted. <a href=#void-elements id=elements-2:void-elements-2>Void elements</a> only have a start tag; end 493 tags must not be specified for <a href=#void-elements id=elements-2:void-elements-3>void elements</a>. <a href=#foreign-elements id=elements-2:foreign-elements-2>Foreign elements</a> must 494 either have a start tag and an end tag, or a start tag that is marked as self-closing, in which 495 case they must not have an end tag.</p> 496 497 <p>The <a href=dom.html#concept-html-contents id=elements-2:concept-html-contents>contents</a> of the element must be placed between 498 just after the start tag (which <a href=#syntax-tag-omission id=elements-2:syntax-tag-omission-3>might be implied, in certain 499 cases</a>) and just before the end tag (which again, <a href=#syntax-tag-omission id=elements-2:syntax-tag-omission-4>might be 500 implied in certain cases</a>). The exact allowed contents of each individual element depend on 501 the <a href=dom.html#content-models id=elements-2:content-models>content model</a> of that element, as described earlier in 502 this specification. Elements must not contain content that their content model disallows. In 503 addition to the restrictions placed on the contents by those content models, however, the five 504 types of elements have additional <em>syntactic</em> requirements.</p> 505 506 <p><a href=#void-elements id=elements-2:void-elements-4>Void elements</a> can't have any contents (since there's no end tag, no content can be 507 put between the start tag and the end tag).</p> 508 509 <p><a href=#raw-text-elements id=elements-2:raw-text-elements-3>Raw text elements</a> can have <a href=#syntax-text id=elements-2:syntax-text>text</a>, though it has <a href=#cdata-rcdata-restrictions>restrictions</a> described below.</p> 510 511 <p><a href=#escapable-raw-text-elements id=elements-2:escapable-raw-text-elements-3>Escapable raw text elements</a> can have <a href=#syntax-text id=elements-2:syntax-text-2>text</a> and 512 <a href=#syntax-charref id=elements-2:syntax-charref>character references</a>, but the text must not contain an <a href=#syntax-ambiguous-ampersand id=elements-2:syntax-ambiguous-ampersand>ambiguous ampersand</a>. There are also <a href=#cdata-rcdata-restrictions>further restrictions</a> described below.</p> 513 514 <p><a href=#foreign-elements id=elements-2:foreign-elements-3>Foreign elements</a> whose start tag is marked as self-closing can't have any contents 515 (since, again, as there's no end tag, no content can be put between the start tag and the end 516 tag). <a href=#foreign-elements id=elements-2:foreign-elements-4>Foreign elements</a> whose start tag is <em>not</em> marked as self-closing can 517 have <a href=#syntax-text id=elements-2:syntax-text-3>text</a>, <a href=#syntax-charref id=elements-2:syntax-charref-2>character 518 references</a>, <a href=#syntax-cdata id=elements-2:syntax-cdata>CDATA sections</a>, other <a href=#syntax-elements id=elements-2:syntax-elements>elements</a>, and <a href=#syntax-comments id=elements-2:syntax-comments>comments</a>, but 519 the text must not contain the character U+003C LESS-THAN SIGN (<) or an <a href=#syntax-ambiguous-ampersand id=elements-2:syntax-ambiguous-ampersand-2>ambiguous ampersand</a>.</p> 520 521 <div class=note> 522 523 <p>The HTML syntax does not support namespace declarations, even in <a href=#foreign-elements id=elements-2:foreign-elements-5>foreign 524 elements</a>.</p> 525 526 <p>For instance, consider the following HTML fragment:</p> 527 528 <pre><p> 529 <svg> 530 <metadata> 531 <!-- this is invalid --> 532 <cdr:license xmlns:cdr="http://www.example.com/cdr/metadata" name="MIT"/> 533 </metadata> 534 </svg> 535 </p></pre> 536 537 <p>The innermost element, <code>cdr:license</code>, is actually in the SVG namespace, as 538 the "<code>xmlns:cdr</code>" attribute has no effect (unlike in XML). In fact, as the 539 comment in the fragment above says, the fragment is actually non-conforming. This is because the 540 SVG specification does not define any elements called "<code>cdr:license</code>" in the 541 SVG namespace.</p> 542 543 </div> 544 545 <p><a href=#normal-elements id=elements-2:normal-elements-4>Normal elements</a> can have <a href=#syntax-text id=elements-2:syntax-text-4>text</a>, <a href=#syntax-charref id=elements-2:syntax-charref-3>character references</a>, other <a href=#syntax-elements id=elements-2:syntax-elements-2>elements</a>, and <a href=#syntax-comments id=elements-2:syntax-comments-2>comments</a>, but 546 the text must not contain the character U+003C LESS-THAN SIGN (<) or an <a href=#syntax-ambiguous-ampersand id=elements-2:syntax-ambiguous-ampersand-3>ambiguous ampersand</a>. Some <a href=#normal-elements id=elements-2:normal-elements-5>normal elements</a> 547 also have <a href=#element-restrictions>yet more restrictions</a> on what content they are 548 allowed to hold, beyond the restrictions imposed by the content model and those described in this 549 paragraph. Those restrictions are described below.</p> 550 551 <p>Tags contain a <dfn id=syntax-tag-name>tag name</dfn>, giving the element's name. HTML 552 elements all have names that only use <a id=elements-2:alphanumeric-ascii-characters href=infrastructure.html#alphanumeric-ascii-characters>alphanumeric ASCII characters</a>. In the HTML 553 syntax, tag names, even those for <a href=#foreign-elements id=elements-2:foreign-elements-6>foreign elements</a>, may be written with any mix of 554 lower- and uppercase letters that, when converted to all-lowercase, matches the element's tag 555 name; tag names are case-insensitive.</p> 556 557 558 <h5 id=start-tags>12.1.2.1 Start tags</h5> 559 560 <p><dfn id=syntax-start-tag>Start tags</dfn> must have the following format:</p> 561 562 <ol><li>The first character of a start tag must be a U+003C LESS-THAN SIGN character (<).<li>The next few characters of a start tag must be the element's <a href=#syntax-tag-name id=start-tags:syntax-tag-name>tag name</a>.<li>If there are to be any attributes in the next step, there must first be one or more <a href=infrastructure.html#space-character id=start-tags:space-character>space characters</a>.<li>Then, the start tag may have a number of attributes, the <a href=#syntax-attributes id=start-tags:syntax-attributes>syntax for which</a> is described below. Attributes must be 563 separated from each other by one or more <a href=infrastructure.html#space-character id=start-tags:space-character-2>space 564 characters</a>.<li>After the attributes, or after the <a href=#syntax-tag-name id=start-tags:syntax-tag-name-2>tag name</a> if there are 565 no attributes, there may be one or more <a href=infrastructure.html#space-character id=start-tags:space-character-3>space characters</a>. 566 (Some attributes are required to be followed by a space. See the <a href=#syntax-attributes id=start-tags:syntax-attributes-2>attributes section</a> below.)<li>Then, if the element is one of the <a href=#void-elements id=start-tags:void-elements>void elements</a>, or if the element is a <a href=#foreign-elements id=start-tags:foreign-elements>foreign element</a>, then there may be a single U+002F SOLIDUS 567 character (/). This character has no effect on <a href=#void-elements id=start-tags:void-elements-2>void elements</a>, but on <a href=#foreign-elements id=start-tags:foreign-elements-2>foreign 568 elements</a> it marks the start tag as self-closing.<li>Finally, start tags must be closed by a U+003E GREATER-THAN SIGN character (>).</ol> 569 570 571 <h5 id=end-tags>12.1.2.2 End tags</h5> 572 573 <p><dfn id=syntax-end-tag>End tags</dfn> must have the following format:</p> 574 575 <ol><li>The first character of an end tag must be a U+003C LESS-THAN SIGN character (<).<li>The second character of an end tag must be a U+002F SOLIDUS character (/).<li>The next few characters of an end tag must be the element's <a href=#syntax-tag-name id=end-tags:syntax-tag-name>tag 576 name</a>.<li>After the tag name, there may be one or more <a href=infrastructure.html#space-character id=end-tags:space-character>space 577 characters</a>.<li>Finally, end tags must be closed by a U+003E GREATER-THAN SIGN character (>).</ol> 578 579 580 <h5 id=attributes-2>12.1.2.3 Attributes</h5> 581 582 <p><dfn id=syntax-attributes>Attributes</dfn> for an element are expressed inside the 583 element's start tag.</p> 584 585 <p>Attributes have a name and a value. <dfn id=syntax-attribute-name>Attribute names</dfn> 586 must consist of one or more characters other than the <a href=infrastructure.html#space-character id=attributes-2:space-character>space 587 characters</a>, U+0000 NULL, U+0022 QUOTATION MARK ("), U+0027 APOSTROPHE ('), U+003E 588 GREATER-THAN SIGN (>), U+002F SOLIDUS (/), and U+003D EQUALS SIGN (=) characters, the <a id=attributes-2:control-characters href=infrastructure.html#control-characters>control 589 characters</a>, and any characters that are not defined by Unicode. In the HTML syntax, attribute 590 names, even those for <a href=#foreign-elements id=attributes-2:foreign-elements>foreign elements</a>, may be written with any mix of lower- and 591 uppercase letters that are an <a id=attributes-2:ascii-case-insensitive href=infrastructure.html#ascii-case-insensitive>ASCII case-insensitive</a> match for the attribute's 592 name.</p> 593 594 <p><dfn id=syntax-attribute-value>Attribute values</dfn> are a mixture of <a href=#syntax-text id=attributes-2:syntax-text>text</a> and <a href=#syntax-charref id=attributes-2:syntax-charref>character references</a>, 595 except with the additional restriction that the text cannot contain an <a href=#syntax-ambiguous-ampersand id=attributes-2:syntax-ambiguous-ampersand>ambiguous ampersand</a>.</p> 596 597 <p>Attributes can be specified in four different ways:</p> 598 599 <dl><dt>Empty attribute syntax<dd> 600 601 <p>Just the <a href=#syntax-attribute-name id=attributes-2:syntax-attribute-name>attribute name</a>. The value is implicitly 602 the empty string.</p> 603 604 <div class=example> 605 606 <p>In the following example, the <code id=attributes-2:attr-fe-disabled><a href=forms.html#attr-fe-disabled>disabled</a></code> attribute is 607 given with the empty attribute syntax:</p> 608 609 <pre><input <em>disabled</em>></pre> 610 611 </div> 612 613 <p>If an attribute using the empty attribute syntax is to be followed by another attribute, then 614 there must be a <a id=attributes-2:space-character-2 href=infrastructure.html#space-character>space character</a> separating the two.</p> 615 616 <dt id=unquoted>Unquoted attribute value syntax<dd> 617 618 <p>The <a href=#syntax-attribute-name id=attributes-2:syntax-attribute-name-2>attribute name</a>, followed by zero or more <a href=infrastructure.html#space-character id=attributes-2:space-character-3>space characters</a>, followed by a single U+003D EQUALS SIGN 619 character, followed by zero or more <a href=infrastructure.html#space-character id=attributes-2:space-character-4>space characters</a>, 620 followed by the <a href=#syntax-attribute-value id=attributes-2:syntax-attribute-value>attribute value</a>, which, in addition 621 to the requirements given above for attribute values, must not contain any literal <a href=infrastructure.html#space-character id=attributes-2:space-character-5>space characters</a>, any U+0022 QUOTATION MARK characters ("), 622 U+0027 APOSTROPHE characters ('), U+003D EQUALS SIGN characters (=), U+003C LESS-THAN SIGN 623 characters (<), U+003E GREATER-THAN SIGN characters (>), or U+0060 GRAVE ACCENT characters 624 (`), and must not be the empty string.</p> 625 626 627 628 629 <div class=example> 630 631 <p>In the following example, the <code id=attributes-2:attr-input-value><a href=forms.html#attr-input-value>value</a></code> attribute is given 632 with the unquoted attribute value syntax:</p> 633 634 <pre><input <em>value=yes</em>></pre> 635 636 </div> 637 638 <p>If an attribute using the unquoted attribute syntax is to be followed by another attribute or 639 by the optional U+002F SOLIDUS character (/) allowed in step 6 of the <a href=#syntax-start-tag id=attributes-2:syntax-start-tag>start tag</a> syntax above, then there must be a <a id=attributes-2:space-character-6 href=infrastructure.html#space-character>space 640 character</a> separating the two.</p> 641 642 <dt>Single-quoted attribute value syntax<dd> 643 644 <p>The <a href=#syntax-attribute-name id=attributes-2:syntax-attribute-name-3>attribute name</a>, followed by zero or more <a href=infrastructure.html#space-character id=attributes-2:space-character-7>space characters</a>, followed by a single U+003D EQUALS SIGN 645 character, followed by zero or more <a href=infrastructure.html#space-character id=attributes-2:space-character-8>space characters</a>, 646 followed by a single U+0027 APOSTROPHE character ('), followed by the <a href=#syntax-attribute-value id=attributes-2:syntax-attribute-value-2>attribute value</a>, which, in addition to the requirements 647 given above for attribute values, must not contain any literal U+0027 APOSTROPHE characters ('), 648 and finally followed by a second single U+0027 APOSTROPHE character (').</p> 649 650 <div class=example> 651 652 <p>In the following example, the <code id=attributes-2:attr-input-type><a href=forms.html#attr-input-type>type</a></code> attribute is given 653 with the single-quoted attribute value syntax:</p> 654 655 <pre><input <em>type='checkbox'</em>></pre> 656 657 </div> 658 659 <p>If an attribute using the single-quoted attribute syntax is to be followed by another 660 attribute, then there must be a <a id=attributes-2:space-character-9 href=infrastructure.html#space-character>space character</a> separating the two.</p> 661 662 <dt>Double-quoted attribute value syntax<dd> 663 664 <p>The <a href=#syntax-attribute-name id=attributes-2:syntax-attribute-name-4>attribute name</a>, followed by zero or more <a href=infrastructure.html#space-character id=attributes-2:space-character-10>space characters</a>, followed by a single U+003D EQUALS SIGN 665 character, followed by zero or more <a href=infrastructure.html#space-character id=attributes-2:space-character-11>space characters</a>, 666 followed by a single U+0022 QUOTATION MARK character ("), followed by the <a href=#syntax-attribute-value id=attributes-2:syntax-attribute-value-3>attribute value</a>, which, in addition to the requirements 667 given above for attribute values, must not contain any literal U+0022 QUOTATION MARK characters 668 ("), and finally followed by a second single U+0022 QUOTATION MARK character (").</p> 669 670 <div class=example> 671 672 <p>In the following example, the <code id=attributes-2:attr-fe-name><a href=forms.html#attr-fe-name>name</a></code> attribute is given with 673 the double-quoted attribute value syntax:</p> 674 675 <pre><input <em>name="be evil"</em>></pre> 676 677 </div> 678 679 <p>If an attribute using the double-quoted attribute syntax is to be followed by another 680 attribute, then there must be a <a id=attributes-2:space-character-12 href=infrastructure.html#space-character>space character</a> separating the two.</p> 681 682 </dl> 683 684 <p>There must never be two or more attributes on the same start tag whose names are an <a id=attributes-2:ascii-case-insensitive-2 href=infrastructure.html#ascii-case-insensitive>ASCII 685 case-insensitive</a> match for each other.</p> 686 687 <hr> 688 689 <p>When a <a href=#foreign-elements id=attributes-2:foreign-elements-2>foreign element</a> has one of the namespaced 690 attributes given by the local name and namespace of the first and second cells of a row from the 691 following table, it must be written using the name given by the third cell from the same row.</p> 692 693 <table><thead><tr><th> Local name <th> Namespace <th> Attribute name 694 <tbody><tr><td> <code>actuate</code> <td> <a id=attributes-2:xlink-namespace href=infrastructure.html#xlink-namespace>XLink namespace</a> <td> <code>xlink:actuate</code> 695 <tr><td> <code>arcrole</code> <td> <a id=attributes-2:xlink-namespace-2 href=infrastructure.html#xlink-namespace>XLink namespace</a> <td> <code>xlink:arcrole</code> 696 <tr><td> <code>href</code> <td> <a id=attributes-2:xlink-namespace-3 href=infrastructure.html#xlink-namespace>XLink namespace</a> <td> <code>xlink:href</code> 697 <tr><td> <code>role</code> <td> <a id=attributes-2:xlink-namespace-4 href=infrastructure.html#xlink-namespace>XLink namespace</a> <td> <code>xlink:role</code> 698 <tr><td> <code>show</code> <td> <a id=attributes-2:xlink-namespace-5 href=infrastructure.html#xlink-namespace>XLink namespace</a> <td> <code>xlink:show</code> 699 <tr><td> <code>title</code> <td> <a id=attributes-2:xlink-namespace-6 href=infrastructure.html#xlink-namespace>XLink namespace</a> <td> <code>xlink:title</code> 700 <tr><td> <code>type</code> <td> <a id=attributes-2:xlink-namespace-7 href=infrastructure.html#xlink-namespace>XLink namespace</a> <td> <code>xlink:type</code> 701 <tr><td> <code>base</code> <td> <a id=attributes-2:xml-namespace href=infrastructure.html#xml-namespace>XML namespace</a> <td> <code>xml:base</code> 702 <tr><td> <code>lang</code> <td> <a id=attributes-2:xml-namespace-2 href=infrastructure.html#xml-namespace>XML namespace</a> <td> <code>xml:lang</code> 703 <tr><td> <code>space</code> <td> <a id=attributes-2:xml-namespace-3 href=infrastructure.html#xml-namespace>XML namespace</a> <td> <code>xml:space</code> 704 <tr><td> <code>xmlns</code> <td> <a id=attributes-2:xmlns-namespace href=infrastructure.html#xmlns-namespace>XMLNS namespace</a> <td> <code>xmlns</code> 705 <tr><td> <code>xlink</code> <td> <a id=attributes-2:xmlns-namespace-2 href=infrastructure.html#xmlns-namespace>XMLNS namespace</a> <td> <code>xmlns:xlink</code> 706 </table> 707 708 <p>No other namespaced attribute can be expressed in <a href=#syntax id=attributes-2:syntax>the HTML syntax</a>.</p> 709 710 <p class=note>Whether the attributes in the table above are conforming or not is defined by 711 other specifications (e.g. the SVG and MathML specifications); this section only describes the 712 syntax rules if the attributes are serialised using the HTML syntax.</p> 713 714 715 <h5 id=optional-tags>12.1.2.4 Optional tags</h5> 716 717 <p>Certain tags can be <dfn id=syntax-tag-omission>omitted</dfn>.</p> 718 719 <p class=note>Omitting an element's <a href=#syntax-start-tag id=optional-tags:syntax-start-tag>start tag</a> in the 720 situations described below does not mean the element is not present; it is implied, but it is 721 still there. For example, an HTML document always has a root <code id=optional-tags:the-html-element><a href=semantics.html#the-html-element>html</a></code> element, even if 722 the string <code><html></code> doesn't appear anywhere in the markup.</p> 723 724 725 <p>An <code id=optional-tags:the-html-element-2><a href=semantics.html#the-html-element>html</a></code> element's <a href=#syntax-start-tag id=optional-tags:syntax-start-tag-2>start tag</a> may be omitted 726 if the first thing inside the <code id=optional-tags:the-html-element-3><a href=semantics.html#the-html-element>html</a></code> element is not a <a href=#syntax-comments id=optional-tags:syntax-comments>comment</a>.</p> 727 728 <div class=example> 729 730 <p>For example, in the following case it's ok to remove the "<code><html></code>" 731 tag:</p> 732 733 <pre><!DOCTYPE HTML> 734 <strong><html></strong> 735 <head> 736 <title>Hello</title> 737 </head> 738 <body> 739 <p>Welcome to this example.</p> 740 </body> 741 </html></pre> 742 743 <p>Doing so would make the document look like this:</p> 744 745 <pre><!DOCTYPE HTML> 746 747 <head> 748 <title>Hello</title> 749 </head> 750 <body> 751 <p>Welcome to this example.</p> 752 </body> 753 </html></pre> 754 755 <p>This has the exact same DOM. In particular, note that white space around the root element is 756 ignored by the parser. The following example would also have the exact same DOM:</p> 757 758 <pre><!DOCTYPE HTML><head> 759 <title>Hello</title> 760 </head> 761 <body> 762 <p>Welcome to this example.</p> 763 </body> 764 </html></pre> 765 766 <p>However, in the following example, removing the start tag moves the comment to before the 767 <code id=optional-tags:the-html-element-4><a href=semantics.html#the-html-element>html</a></code> element:</p> 768 769 <pre><!DOCTYPE HTML> 770 <html> 771 <strong><!-- where is this comment in the DOM? --></strong> 772 <head> 773 <title>Hello</title> 774 </head> 775 <body> 776 <p>Welcome to this example.</p> 777 </body> 778 </html></pre> 779 780 <p>With the tag removed, the document actually turns into the same as this:</p> 781 782 <pre><!DOCTYPE HTML> 783 <!-- where is this comment in the DOM? --> 784 <small><html></small> 785 <head> 786 <title>Hello</title> 787 </head> 788 <body> 789 <p>Welcome to this example.</p> 790 </body> 791 </html></pre> 792 793 <p>This is why the tag can only be removed if it is not followed by a comment: removing the tag 794 when there is a comment there changes the document's resulting parse tree. Of course, if the 795 position of the comment does not matter, then the tag can be omitted, as if the comment had been 796 moved to before the start tag in the first place.</p> 797 798 </div> 799 800 801 <p>An <code id=optional-tags:the-html-element-5><a href=semantics.html#the-html-element>html</a></code> element's <a href=#syntax-end-tag id=optional-tags:syntax-end-tag>end tag</a> may be omitted if 802 the <code id=optional-tags:the-html-element-6><a href=semantics.html#the-html-element>html</a></code> element is not immediately followed by a <a href=#syntax-comments id=optional-tags:syntax-comments-2>comment</a>.</p> 803 804 805 <p>A <code id=optional-tags:the-head-element><a href=semantics.html#the-head-element>head</a></code> element's <a href=#syntax-start-tag id=optional-tags:syntax-start-tag-3>start tag</a> may be omitted if 806 the element is empty, or if the first thing inside the <code id=optional-tags:the-head-element-2><a href=semantics.html#the-head-element>head</a></code> element is an 807 element.</p> 808 809 810 <p>A <code id=optional-tags:the-head-element-3><a href=semantics.html#the-head-element>head</a></code> element's <a href=#syntax-end-tag id=optional-tags:syntax-end-tag-2>end tag</a> may be omitted if the 811 <code id=optional-tags:the-head-element-4><a href=semantics.html#the-head-element>head</a></code> element is not immediately followed by a <a id=optional-tags:space-character href=infrastructure.html#space-character>space character</a> or a <a href=#syntax-comments id=optional-tags:syntax-comments-3>comment</a>.</p> 812 813 814 <p>A <code id=optional-tags:the-body-element><a href=semantics.html#the-body-element>body</a></code> element's <a href=#syntax-start-tag id=optional-tags:syntax-start-tag-4>start tag</a> may be omitted 815 if the element is empty, or if the first thing inside the <code id=optional-tags:the-body-element-2><a href=semantics.html#the-body-element>body</a></code> element is not a 816 <a id=optional-tags:space-character-2 href=infrastructure.html#space-character>space character</a> or a <a href=#syntax-comments id=optional-tags:syntax-comments-4>comment</a>, except if the 817 first thing inside the <code id=optional-tags:the-body-element-3><a href=semantics.html#the-body-element>body</a></code> element is a <code id=optional-tags:the-meta-element><a href=semantics.html#the-meta-element>meta</a></code>, <code id=optional-tags:the-link-element><a href=semantics.html#the-link-element>link</a></code>, 818 <code id=optional-tags:the-script-element><a href=scripting.html#the-script-element>script</a></code>, <code id=optional-tags:the-style-element><a href=semantics.html#the-style-element>style</a></code>, or <code id=optional-tags:the-template-element><a href=scripting.html#the-template-element>template</a></code> element. </p> 819 820 821 <p>A <code id=optional-tags:the-body-element-4><a href=semantics.html#the-body-element>body</a></code> element's <a href=#syntax-end-tag id=optional-tags:syntax-end-tag-3>end tag</a> may be omitted if the 822 <code id=optional-tags:the-body-element-5><a href=semantics.html#the-body-element>body</a></code> element is not immediately followed by a <a href=#syntax-comments id=optional-tags:syntax-comments-5>comment</a>.</p> 823 824 <div class=example> 825 826 <p>Note that in the example above, the <code id=optional-tags:the-head-element-5><a href=semantics.html#the-head-element>head</a></code> element start and end tags, and the 827 <code id=optional-tags:the-body-element-6><a href=semantics.html#the-body-element>body</a></code> element start tag, can't be omitted, because they are surrounded by white 828 space:</p> 829 830 <pre><!DOCTYPE HTML> 831 <html><strong> 832 </strong><head><strong> 833 </strong><title>Hello</title><strong> 834 </strong></head><strong> 835 </strong><body><strong> 836 </strong><p>Welcome to this example.</p> 837 </body> 838 </html></pre> 839 840 <p>(The <code id=optional-tags:the-body-element-7><a href=semantics.html#the-body-element>body</a></code> and <code id=optional-tags:the-html-element-7><a href=semantics.html#the-html-element>html</a></code> element end tags could be omitted without 841 trouble; any spaces after those get parsed into the <code id=optional-tags:the-body-element-8><a href=semantics.html#the-body-element>body</a></code> element anyway.)</p> 842 843 <p>Usually, however, white space isn't an issue. If we first remove the white space we don't care 844 about:</p> 845 846 <pre><!DOCTYPE HTML><html><head><title>Hello</title></head><body><p>Welcome to this example.</p></body></html></pre> 847 848 <p>Then we can omit a number of tags without affecting the DOM:</p> 849 850 <pre><!DOCTYPE HTML><title>Hello</title><p>Welcome to this example.</p></pre> 851 852 <p>At that point, we can also add some white space back:</p> 853 854 <pre><!DOCTYPE HTML> 855 <title>Hello</title> 856 <p>Welcome to this example.</p></pre> 857 858 <p>This would be equivalent to this document, with the omitted tags shown in their 859 parser-implied positions; the only white space text node that results from this is the newline at 860 the end of the <code id=optional-tags:the-head-element-6><a href=semantics.html#the-head-element>head</a></code> element:</p> 861 862 <pre><!DOCTYPE HTML> 863 <small><html><head></small><title>Hello</title> 864 <small></head><body></small><p>Welcome to this example.</p><small></body></html></small></pre> 865 866 </div> 867 868 869 <p>An <code id=optional-tags:the-li-element><a href=semantics.html#the-li-element>li</a></code> element's <a href=#syntax-end-tag id=optional-tags:syntax-end-tag-4>end tag</a> may be omitted if the 870 <code id=optional-tags:the-li-element-2><a href=semantics.html#the-li-element>li</a></code> element is immediately followed by another <code id=optional-tags:the-li-element-3><a href=semantics.html#the-li-element>li</a></code> element or if there is 871 no more content in the parent element.</p> 872 873 874 <p>A <code id=optional-tags:the-dt-element><a href=semantics.html#the-dt-element>dt</a></code> element's <a href=#syntax-end-tag id=optional-tags:syntax-end-tag-5>end tag</a> may be omitted if the 875 <code id=optional-tags:the-dt-element-2><a href=semantics.html#the-dt-element>dt</a></code> element is immediately followed by another <code id=optional-tags:the-dt-element-3><a href=semantics.html#the-dt-element>dt</a></code> element or a 876 <code id=optional-tags:the-dd-element><a href=semantics.html#the-dd-element>dd</a></code> element.</p> 877 878 879 <p>A <code id=optional-tags:the-dd-element-2><a href=semantics.html#the-dd-element>dd</a></code> element's <a href=#syntax-end-tag id=optional-tags:syntax-end-tag-6>end tag</a> may be omitted if the 880 <code id=optional-tags:the-dd-element-3><a href=semantics.html#the-dd-element>dd</a></code> element is immediately followed by another <code id=optional-tags:the-dd-element-4><a href=semantics.html#the-dd-element>dd</a></code> element or a 881 <code id=optional-tags:the-dt-element-4><a href=semantics.html#the-dt-element>dt</a></code> element, or if there is no more content in the parent element.</p> 882 883 884 <p>A <code id=optional-tags:the-p-element><a href=semantics.html#the-p-element>p</a></code> element's <a href=#syntax-end-tag id=optional-tags:syntax-end-tag-7>end tag</a> may be omitted if the 885 <code id=optional-tags:the-p-element-2><a href=semantics.html#the-p-element>p</a></code> element is immediately followed by an <code id=optional-tags:the-address-element><a href=semantics.html#the-address-element>address</a></code>, <code id=optional-tags:the-article-element><a href=semantics.html#the-article-element>article</a></code>, 886 <code id=optional-tags:the-aside-element><a href=semantics.html#the-aside-element>aside</a></code>, <code id=optional-tags:the-blockquote-element><a href=semantics.html#the-blockquote-element>blockquote</a></code>, <code id=optional-tags:the-details-element><a href=forms.html#the-details-element>details</a></code>, <code id=optional-tags:the-div-element><a href=semantics.html#the-div-element>div</a></code>, <code id=optional-tags:the-dl-element><a href=semantics.html#the-dl-element>dl</a></code>, 887 <code id=optional-tags:the-fieldset-element><a href=forms.html#the-fieldset-element>fieldset</a></code>, <code id=optional-tags:the-figcaption-element><a href=semantics.html#the-figcaption-element>figcaption</a></code>, <code id=optional-tags:the-figure-element><a href=semantics.html#the-figure-element>figure</a></code>, <code id=optional-tags:the-footer-element><a href=semantics.html#the-footer-element>footer</a></code>, <code id=optional-tags:the-form-element><a href=forms.html#the-form-element>form</a></code>, <code id=optional-tags:the-h1,-h2,-h3,-h4,-h5,-and-h6-elements><a href=semantics.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code>, <code id=optional-tags:the-h1,-h2,-h3,-h4,-h5,-and-h6-elements-2><a href=semantics.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h2</a></code>, 888 <code id=optional-tags:the-h1,-h2,-h3,-h4,-h5,-and-h6-elements-3><a href=semantics.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h3</a></code>, <code id=optional-tags:the-h1,-h2,-h3,-h4,-h5,-and-h6-elements-4><a href=semantics.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h4</a></code>, <code id=optional-tags:the-h1,-h2,-h3,-h4,-h5,-and-h6-elements-5><a href=semantics.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h5</a></code>, <code id=optional-tags:the-h1,-h2,-h3,-h4,-h5,-and-h6-elements-6><a href=semantics.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h6</a></code>, <code id=optional-tags:the-header-element><a href=semantics.html#the-header-element>header</a></code>, 889 <code id=optional-tags:the-hgroup-element><a href=semantics.html#the-hgroup-element>hgroup</a></code>, <code id=optional-tags:the-hr-element><a href=semantics.html#the-hr-element>hr</a></code>, <code id=optional-tags:the-main-element><a href=semantics.html#the-main-element>main</a></code>, <code id=optional-tags:the-menu-element><a href=forms.html#the-menu-element>menu</a></code>, <code id=optional-tags:the-nav-element><a href=semantics.html#the-nav-element>nav</a></code>, 890 <code id=optional-tags:the-ol-element><a href=semantics.html#the-ol-element>ol</a></code>, <code id=optional-tags:the-p-element-3><a href=semantics.html#the-p-element>p</a></code>, <code id=optional-tags:the-pre-element><a href=semantics.html#the-pre-element>pre</a></code>, <code id=optional-tags:the-section-element><a href=semantics.html#the-section-element>section</a></code>, <code id=optional-tags:the-table-element><a href=tables.html#the-table-element>table</a></code>, or 891 <code id=optional-tags:the-ul-element><a href=semantics.html#the-ul-element>ul</a></code>, element, or if there is no more content in the parent element and the parent 892 element is an <a href=infrastructure.html#html-elements id=optional-tags:html-elements>HTML element</a> that is not an <code id=optional-tags:the-a-element><a href=semantics.html#the-a-element>a</a></code>, <code id=optional-tags:the-audio-element><a href=embedded-content.html#the-audio-element>audio</a></code>, <code id=optional-tags:the-del-element><a href=semantics.html#the-del-element>del</a></code>, 893 <code id=optional-tags:the-ins-element><a href=semantics.html#the-ins-element>ins</a></code>, <code id=optional-tags:the-map-element><a href=embedded-content.html#the-map-element>map</a></code>, <code id=optional-tags:the-noscript-element><a href=scripting.html#the-noscript-element>noscript</a></code>, or <code id=optional-tags:the-video-element><a href=embedded-content.html#the-video-element>video</a></code> element.</p> 894 895 <div class=example> 896 897 <p>We can thus simplify the earlier example further: 898 899 <pre><!DOCTYPE HTML><title>Hello</title><p>Welcome to this example.<small></p></small></pre> 900 901 </div> 902 903 904 <p>An <code id=optional-tags:the-rt-element><a href=semantics.html#the-rt-element>rt</a></code> element's <a href=#syntax-end-tag id=optional-tags:syntax-end-tag-8>end tag</a> may be omitted if the 905 <code id=optional-tags:the-rt-element-2><a href=semantics.html#the-rt-element>rt</a></code> element is immediately followed by an <code id=optional-tags:the-rt-element-3><a href=semantics.html#the-rt-element>rt</a></code> or <code id=optional-tags:the-rp-element><a href=semantics.html#the-rp-element>rp</a></code> element, 906 or if there is no more content in the parent element.</p> 907 908 909 <p>An <code id=optional-tags:the-rp-element-2><a href=semantics.html#the-rp-element>rp</a></code> element's <a href=#syntax-end-tag id=optional-tags:syntax-end-tag-9>end tag</a> may be omitted if the 910 <code id=optional-tags:the-rp-element-3><a href=semantics.html#the-rp-element>rp</a></code> element is immediately followed by an <code id=optional-tags:the-rt-element-4><a href=semantics.html#the-rt-element>rt</a></code> or <code id=optional-tags:the-rp-element-4><a href=semantics.html#the-rp-element>rp</a></code> element, 911 or if there is no more content in the parent element.</p> 912 913 914 <p>An <code id=optional-tags:the-optgroup-element><a href=forms.html#the-optgroup-element>optgroup</a></code> element's <a href=#syntax-end-tag id=optional-tags:syntax-end-tag-10>end tag</a> may be omitted 915 if the <code id=optional-tags:the-optgroup-element-2><a href=forms.html#the-optgroup-element>optgroup</a></code> element is 916 immediately followed by another <code id=optional-tags:the-optgroup-element-3><a href=forms.html#the-optgroup-element>optgroup</a></code> element, or if there is no more content in 917 the parent element.</p> 918 919 920 921 <p>An <code id=optional-tags:the-option-element><a href=forms.html#the-option-element>option</a></code> element's <a href=#syntax-end-tag id=optional-tags:syntax-end-tag-11>end tag</a> may be omitted if 922 the <code id=optional-tags:the-option-element-2><a href=forms.html#the-option-element>option</a></code> element is immediately followed by another <code id=optional-tags:the-option-element-3><a href=forms.html#the-option-element>option</a></code> element, or 923 if it is immediately followed by an <code id=optional-tags:the-optgroup-element-4><a href=forms.html#the-optgroup-element>optgroup</a></code> element, or if there is no more content 924 in the parent element.</p> 925 926 927 <p>A <code id=optional-tags:the-colgroup-element><a href=tables.html#the-colgroup-element>colgroup</a></code> element's <a href=#syntax-start-tag id=optional-tags:syntax-start-tag-5>start tag</a> may be 928 omitted if the first thing inside the <code id=optional-tags:the-colgroup-element-2><a href=tables.html#the-colgroup-element>colgroup</a></code> element is a <code id=optional-tags:the-col-element><a href=tables.html#the-col-element>col</a></code> element, 929 and if the element is not immediately preceded by another <code id=optional-tags:the-colgroup-element-3><a href=tables.html#the-colgroup-element>colgroup</a></code> element whose 930 <a href=#syntax-end-tag id=optional-tags:syntax-end-tag-12>end tag</a> has been omitted. (It can't be omitted if the element 931 is empty.)</p> 932 933 934 <p>A <code id=optional-tags:the-colgroup-element-4><a href=tables.html#the-colgroup-element>colgroup</a></code> element's <a href=#syntax-end-tag id=optional-tags:syntax-end-tag-13>end tag</a> may be omitted if 935 the <code id=optional-tags:the-colgroup-element-5><a href=tables.html#the-colgroup-element>colgroup</a></code> element is not immediately followed by a <a id=optional-tags:space-character-3 href=infrastructure.html#space-character>space character</a> or 936 a <a href=#syntax-comments id=optional-tags:syntax-comments-6>comment</a>.</p> 937 938 939 <p>A <code id=optional-tags:the-caption-element><a href=tables.html#the-caption-element>caption</a></code> element's <a href=#syntax-end-tag id=optional-tags:syntax-end-tag-14>end tag</a> may be omitted if 940 the <code id=optional-tags:the-caption-element-2><a href=tables.html#the-caption-element>caption</a></code> element is not immediately followed by a <a id=optional-tags:space-character-4 href=infrastructure.html#space-character>space character</a> or 941 a <a href=#syntax-comments id=optional-tags:syntax-comments-7>comment</a>.</p> 942 943 944 <p>A <code id=optional-tags:the-thead-element><a href=tables.html#the-thead-element>thead</a></code> element's <a href=#syntax-end-tag id=optional-tags:syntax-end-tag-15>end tag</a> may be omitted if 945 the <code id=optional-tags:the-thead-element-2><a href=tables.html#the-thead-element>thead</a></code> element is immediately followed by a <code id=optional-tags:the-tbody-element><a href=tables.html#the-tbody-element>tbody</a></code> or 946 <code id=optional-tags:the-tfoot-element><a href=tables.html#the-tfoot-element>tfoot</a></code> element.</p> 947 948 949 <p>A <code id=optional-tags:the-tbody-element-2><a href=tables.html#the-tbody-element>tbody</a></code> element's <a href=#syntax-start-tag id=optional-tags:syntax-start-tag-6>start tag</a> may be omitted 950 if the first thing inside the <code id=optional-tags:the-tbody-element-3><a href=tables.html#the-tbody-element>tbody</a></code> element is a <code id=optional-tags:the-tr-element><a href=tables.html#the-tr-element>tr</a></code> element, and if the 951 element is not immediately preceded by a <code id=optional-tags:the-tbody-element-4><a href=tables.html#the-tbody-element>tbody</a></code>, <code id=optional-tags:the-thead-element-3><a href=tables.html#the-thead-element>thead</a></code>, or 952 <code id=optional-tags:the-tfoot-element-2><a href=tables.html#the-tfoot-element>tfoot</a></code> element whose <a href=#syntax-end-tag id=optional-tags:syntax-end-tag-16>end tag</a> has been omitted. (It 953 can't be omitted if the element is empty.)</p> 954 955 956 <p>A <code id=optional-tags:the-tbody-element-5><a href=tables.html#the-tbody-element>tbody</a></code> element's <a href=#syntax-end-tag id=optional-tags:syntax-end-tag-17>end tag</a> may be omitted if 957 the <code id=optional-tags:the-tbody-element-6><a href=tables.html#the-tbody-element>tbody</a></code> element is immediately followed by a <code id=optional-tags:the-tbody-element-7><a href=tables.html#the-tbody-element>tbody</a></code> or 958 <code id=optional-tags:the-tfoot-element-3><a href=tables.html#the-tfoot-element>tfoot</a></code> element, or if there is no more content in the parent element.</p> 959 960 961 <p>A <code id=optional-tags:the-tfoot-element-4><a href=tables.html#the-tfoot-element>tfoot</a></code> element's <a href=#syntax-end-tag id=optional-tags:syntax-end-tag-18>end tag</a> may be omitted if 962 the <code id=optional-tags:the-tfoot-element-5><a href=tables.html#the-tfoot-element>tfoot</a></code> element is immediately followed by a <code id=optional-tags:the-tbody-element-8><a href=tables.html#the-tbody-element>tbody</a></code> element, or if 963 there is no more content in the parent element.</p> 964 965 966 <p>A <code id=optional-tags:the-tr-element-2><a href=tables.html#the-tr-element>tr</a></code> element's <a href=#syntax-end-tag id=optional-tags:syntax-end-tag-19>end tag</a> may be omitted if the 967 <code id=optional-tags:the-tr-element-3><a href=tables.html#the-tr-element>tr</a></code> element is immediately followed by another <code id=optional-tags:the-tr-element-4><a href=tables.html#the-tr-element>tr</a></code> element, or if there is 968 no more content in the parent element.</p> 969 970 971 <p>A <code id=optional-tags:the-td-element><a href=tables.html#the-td-element>td</a></code> element's <a href=#syntax-end-tag id=optional-tags:syntax-end-tag-20>end tag</a> may be omitted if the 972 <code id=optional-tags:the-td-element-2><a href=tables.html#the-td-element>td</a></code> element is immediately followed by a <code id=optional-tags:the-td-element-3><a href=tables.html#the-td-element>td</a></code> or <code id=optional-tags:the-th-element><a href=tables.html#the-th-element>th</a></code> element, 973 or if there is no more content in the parent element.</p> 974 975 976 <p>A <code id=optional-tags:the-th-element-2><a href=tables.html#the-th-element>th</a></code> element's <a href=#syntax-end-tag id=optional-tags:syntax-end-tag-21>end tag</a> may be omitted if the 977 <code id=optional-tags:the-th-element-3><a href=tables.html#the-th-element>th</a></code> element is immediately followed by a <code id=optional-tags:the-td-element-4><a href=tables.html#the-td-element>td</a></code> or <code id=optional-tags:the-th-element-4><a href=tables.html#the-th-element>th</a></code> element, 978 or if there is no more content in the parent element.</p> 979 980 <div class=example> 981 982 <p>The ability to omit all these table-related tags makes table markup much terser.</p> 983 984 <p>Take this example:</p> 985 986 <pre><table> 987 <caption>37547 TEE Electric Powered Rail Car Train Functions (Abbreviated)</caption> 988 <colgroup><col><col><col></colgroup> 989 <thead> 990 <tr> 991 <th>Function</th> 992 <th>Control Unit</th> 993 <th>Central Station</th> 994 </tr> 995 </thead> 996 <tbody> 997 <tr> 998 <td>Headlights</td> 999 <td></td> 1000 <td></td> 1001 </tr> 1002 <tr> 1003 <td>Interior Lights</td> 1004 <td></td> 1005 <td></td> 1006 </tr> 1007 <tr> 1008 <td>Electric locomotive operating sounds</td> 1009 <td></td> 1010 <td></td> 1011 </tr> 1012 <tr> 1013 <td>Engineer's cab lighting</td> 1014 <td></td> 1015 <td></td> 1016 </tr> 1017 <tr> 1018 <td>Station Announcements - Swiss</td> 1019 <td></td> 1020 <td></td> 1021 </tr> 1022 </tbody> 1023 </table></pre> 1024 1025 <p>The exact same table, modulo some white space differences, could be marked up as follows:</p> 1026 1027 <pre><table> 1028 <caption>37547 TEE Electric Powered Rail Car Train Functions (Abbreviated) 1029 <colgroup><col><col><col> 1030 <thead> 1031 <tr> 1032 <th>Function 1033 <th>Control Unit 1034 <th>Central Station 1035 <tbody> 1036 <tr> 1037 <td>Headlights 1038 <td> 1039 <td> 1040 <tr> 1041 <td>Interior Lights 1042 <td> 1043 <td> 1044 <tr> 1045 <td>Electric locomotive operating sounds 1046 <td> 1047 <td> 1048 <tr> 1049 <td>Engineer's cab lighting 1050 <td> 1051 <td> 1052 <tr> 1053 <td>Station Announcements - Swiss 1054 <td> 1055 <td> 1056 </table></pre> 1057 1058 <p>Since the cells take up much less room this way, this can be made even terser by having each 1059 row on one line:</p> 1060 1061 <pre><table> 1062 <caption>37547 TEE Electric Powered Rail Car Train Functions (Abbreviated) 1063 <colgroup><col><col><col> 1064 <thead> 1065 <tr> <th>Function <th>Control Unit <th>Central Station 1066 <tbody> 1067 <tr> <td>Headlights <td> <td> 1068 <tr> <td>Interior Lights <td> <td> 1069 <tr> <td>Electric locomotive operating sounds <td> <td> 1070 <tr> <td>Engineer's cab lighting <td> <td> 1071 <tr> <td>Station Announcements - Swiss <td> <td> 1072 </table></pre> 1073 1074 <p>The only differences between these tables, at the DOM level, is with the precise position of 1075 the (in any case semantically-neutral) white space.</p> 1076 1077 </div> 1078 1079 <p><strong>However</strong>, a <a href=#syntax-start-tag id=optional-tags:syntax-start-tag-7>start tag</a> must never be 1080 omitted if it has any attributes.</p> 1081 1082 <div class=example> 1083 1084 <p>Returning to the earlier example with all the white space removed and then all the optional 1085 tags removed:</p> 1086 1087 <pre><!DOCTYPE HTML><title>Hello</title><p>Welcome to this example.</pre> 1088 1089 <p>If the <code id=optional-tags:the-body-element-9><a href=semantics.html#the-body-element>body</a></code> element in this example had to have a <code id=optional-tags:classes><a href=dom.html#classes>class</a></code> attribute and the <code id=optional-tags:the-html-element-8><a href=semantics.html#the-html-element>html</a></code> element had to have a <code id=optional-tags:attr-lang><a href=dom.html#attr-lang>lang</a></code> attribute, the markup would have to become:</p> 1090 1091 <pre><!DOCTYPE HTML><html lang="en"><title>Hello</title><body class="demo"><p>Welcome to this example.</pre> 1092 1093 </div> 1094 1095 <p class=note>This section assumes that the document is conforming, in particular, that there 1096 are no <a href=dom.html#content-models id=optional-tags:content-models>content model</a> violations. Omitting tags in the fashion 1097 described in this section in a document that does not conform to the <a id=optional-tags:content-models-2 href=dom.html#content-models>content models</a> 1098 described in this specification is likely to result in unexpected DOM differences (this is, in 1099 part, what the content models are designed to avoid).</p> 1100 1101 1102 <h5 id=element-restrictions>12.1.2.5 Restrictions on content models</h5> 1103 1104 <p>For historical reasons, certain elements have extra restrictions beyond even the restrictions 1105 given by their content model.</p> 1106 1107 <p>A <code id=element-restrictions:the-table-element><a href=tables.html#the-table-element>table</a></code> element must not contain <code id=element-restrictions:the-tr-element><a href=tables.html#the-tr-element>tr</a></code> elements, even though these 1108 elements are technically allowed inside <code id=element-restrictions:the-table-element-2><a href=tables.html#the-table-element>table</a></code> elements according to the content 1109 models described in this specification. (If a <code id=element-restrictions:the-tr-element-2><a href=tables.html#the-tr-element>tr</a></code> element is put inside a 1110 <code id=element-restrictions:the-table-element-3><a href=tables.html#the-table-element>table</a></code> in the markup, it will in fact imply a <code id=element-restrictions:the-tbody-element><a href=tables.html#the-tbody-element>tbody</a></code> start tag before 1111 it.)</p> 1112 1113 <p>A single <a href=#syntax-newlines id=element-restrictions:syntax-newlines>newline</a> may be placed immediately after the <a href=#syntax-start-tag id=element-restrictions:syntax-start-tag>start tag</a> of <code id=element-restrictions:the-pre-element><a href=semantics.html#the-pre-element>pre</a></code> and <code id=element-restrictions:the-textarea-element><a href=forms.html#the-textarea-element>textarea</a></code> elements. 1114 This does not affect the processing of the element. The otherwise optional <a href=#syntax-newlines id=element-restrictions:syntax-newlines-2>newline</a> <em>must</em> be included if the element's contents 1115 themselves start with a <a href=#syntax-newlines id=element-restrictions:syntax-newlines-3>newline</a> (because otherwise the 1116 leading newline in the contents would be treated like the optional newline, and ignored).</p> 1117 1118 <div class=example> 1119 <p>The following two <code id=element-restrictions:the-pre-element-2><a href=semantics.html#the-pre-element>pre</a></code> blocks are equivalent:</p> 1120 <pre><pre>Hello</pre></pre> 1121 <pre><pre><br>Hello</pre></pre> 1122 </div> 1123 1124 1125 <h5 id=cdata-rcdata-restrictions>12.1.2.6 Restrictions on the contents of raw text and escapable raw text elements</h5> 1126 1127 <p>The text in <a href=#raw-text-elements id=cdata-rcdata-restrictions:raw-text-elements>raw text</a> and <a href=#escapable-raw-text-elements id=cdata-rcdata-restrictions:escapable-raw-text-elements>escapable raw text 1128 elements</a> must not contain any occurrences of the string "<code></</code>" 1129 (U+003C LESS-THAN SIGN, U+002F SOLIDUS) followed by characters that case-insensitively match the 1130 tag name of the element followed by one of U+0009 CHARACTER TABULATION (tab), U+000A LINE FEED 1131 (LF), U+000C FORM FEED (FF), U+000D CARRIAGE RETURN (CR), U+0020 SPACE, U+003E GREATER-THAN SIGN 1132 (>), or U+002F SOLIDUS (/).</p> 1133 1134 1135 <h4 id=text-2>12.1.3 Text</h4> 1136 1137 <p><dfn id=syntax-text>Text</dfn> is allowed inside elements, attribute values, and comments. 1138 Extra constraints are placed on what is and what is not allowed in text based on where the text is 1139 to be put, as described in the other sections.</p> 1140 1141 1142 <h5 id=newlines>12.1.3.1 Newlines</h5> 1143 1144 <p><dfn id=syntax-newlines>Newlines</dfn> in HTML may be represented either as U+000D 1145 CARRIAGE RETURN (CR) characters, U+000A LINE FEED (LF) characters, or pairs of U+000D CARRIAGE 1146 RETURN (CR), U+000A LINE FEED (LF) characters in that order.</p> 1147 1148 <p>Where <a href=#syntax-charref id=newlines:syntax-charref>character references</a> are allowed, a character 1149 reference of a U+000A LINE FEED (LF) character (but not a U+000D CARRIAGE RETURN (CR) character) 1150 also represents a <a href=#syntax-newlines id=newlines:syntax-newlines>newline</a>.</p> 1151 1152 1153 <h4 id=character-references>12.1.4 Character references</h4> 1154 1155 <p>In certain cases described in other sections, <a href=#syntax-text id=character-references:syntax-text>text</a> may be 1156 mixed with <dfn id=syntax-charref>character references</dfn>. These can be used to escape 1157 characters that couldn't otherwise legally be included in <a href=#syntax-text id=character-references:syntax-text-2>text</a>.</p> 1158 1159 <p>Character references must start with a U+0026 AMPERSAND character (&). Following this, 1160 there are three possible kinds of character references:</p> 1161 1162 <dl><dt>Named character references<dd>The ampersand must be followed by one of the names given in the <a href=#named-character-references id=character-references:named-character-references>named character 1163 references</a> section, using the same case. The name must be one that is 1164 terminated by a U+003B SEMICOLON character (;).<dt>Decimal numeric character reference<dd>The ampersand must be followed by a U+0023 NUMBER SIGN character (#), followed by one or more 1165 <a id=character-references:ascii-digits href=infrastructure.html#ascii-digits>ASCII digits</a>, representing a base-ten integer that corresponds to a Unicode code 1166 point that is allowed according to the definition below. The digits must then be followed by a 1167 U+003B SEMICOLON character (;).<dt>Hexadecimal numeric character reference<dd>The ampersand must be followed by a U+0023 NUMBER SIGN character (#), which must be followed 1168 by either a U+0078 LATIN SMALL LETTER X character (x) or a U+0058 LATIN CAPITAL LETTER X 1169 character (X), which must then be followed by one or more <a id=character-references:ascii-hex-digits href=infrastructure.html#ascii-hex-digits>ASCII hex digits</a>, 1170 representing a hexadecimal integer that corresponds to a Unicode code point that is allowed 1171 according to the definition below. The digits must then be followed by a U+003B SEMICOLON 1172 character (;).</dl> 1173 1174 <p>The numeric character reference forms described above are allowed to reference any Unicode code 1175 point other than U+0000, U+000D, permanently undefined Unicode characters (noncharacters), 1176 surrogates (U+D800U+DFFF), and <a id=character-references:control-characters href=infrastructure.html#control-characters>control characters</a> other than <a href=infrastructure.html#space-character id=character-references:space-character>space characters</a>.</p> 1177 1178 <p>An <dfn id=syntax-ambiguous-ampersand>ambiguous ampersand</dfn> is a U+0026 AMPERSAND 1179 character (&) that is followed by one or more <a id=character-references:alphanumeric-ascii-characters href=infrastructure.html#alphanumeric-ascii-characters>alphanumeric ASCII characters</a>, 1180 followed by a U+003B SEMICOLON character (;), where these characters do not match any of the names 1181 given in the <a href=#named-character-references id=character-references:named-character-references-2>named character references</a> section.</p> 1182 1183 1184 <h4 id=cdata-sections>12.1.5 CDATA sections</h4> 1185 1186 <p><dfn id=syntax-cdata>CDATA sections</dfn> must consist of the following components, in 1187 this order:</p> 1188 1189 <ol><li>The string "<code><![CDATA[</code>".<li>Optionally, <a href=#syntax-text id=cdata-sections:syntax-text>text</a>, with the additional restriction that the 1190 text must not contain the string "<code>]]></code>".<li>The string "<code>]]></code>".</ol> 1191 1192 <div class=example> 1193 1194 <p>CDATA sections can only be used in foreign content (MathML or SVG). In this example, a CDATA 1195 section is used to escape the contents of an <code id=cdata-sections:math:ms><a href=embedded-content.html#math:ms>ms</a></code> element:</p> 1196 1197 <pre><p>You can add a string to a number, but this stringifies the number:</p> 1198 <math> 1199 <ms><![CDATA[x<y]]></ms> 1200 <mo>+</mo> 1201 <mn>3</mn> 1202 <mo>=</mo> 1203 <ms><![CDATA[x<y3]]></ms> 1204 </math></pre> 1205 1206 </div> 1207 1208 1209 <h4 id=comments>12.1.6 Comments</h4> 1210 1211 <p><dfn id=syntax-comments>Comments</dfn> must start with the four character sequence U+003C 1212 LESS-THAN SIGN, U+0021 EXCLAMATION MARK, U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS (<code><!--</code>). Following this sequence, the comment may have <a href=#syntax-text id=comments:syntax-text>text</a>, with the additional restriction that the text must not start with 1213 a single U+003E GREATER-THAN SIGN character (>), nor start with a U+002D HYPHEN-MINUS character 1214 (-) followed by a U+003E GREATER-THAN SIGN (>) character, nor contain two consecutive U+002D 1215 HYPHEN-MINUS characters (<code>--</code>), nor end with a U+002D HYPHEN-MINUS character 1216 (-). Finally, the comment must be ended by the three character sequence U+002D HYPHEN-MINUS, 1217 U+002D HYPHEN-MINUS, U+003E GREATER-THAN SIGN (<code>--></code>).</p> 1218 1219 1220 1221 1222 1223 1224 <h3 id=parsing>12.2 Parsing HTML documents</h3><div class=status><input onclick=toggleStatus(this) value= type=button><p class=bugs><strong>Spec bugs:</strong> <a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=24892" title="Specify speculative parsing and that it fetches bogus scripts. See https://code.google.com/p/chromium/issues/detail?id=329531">24892</a></div> 1225 1226 <p><i>This section only applies to user agents, data mining tools, and conformance 1227 checkers.</i></p> 1228 1229 <p class=note>The rules for parsing XML documents into DOM trees are covered by the next 1230 section, entitled "<a id=parsing:the-xhtml-syntax href=xhtml.html#the-xhtml-syntax>The XHTML syntax</a>".</p> 1231 1232 <p>User agents must use the parsing rules described in this section to generate the DOM trees from 1233 <code id=parsing:text/html><a href=iana.html#text/html>text/html</a></code> resources. Together, these rules define what is referred to as the 1234 <dfn id=html-parser>HTML parser</dfn>.</p> 1235 1236 <div class=note> 1237 1238 <p>While the HTML syntax described in this specification bears a close resemblance to SGML and 1239 XML, it is a separate language with its own parsing rules.</p> 1240 1241 <p>Some earlier versions of HTML (in particular from HTML2 to HTML4) were based on SGML and used 1242 SGML parsing rules. However, few (if any) web browsers ever implemented true SGML parsing for 1243 HTML documents; the only user agents to strictly handle HTML as an SGML application have 1244 historically been validators. The resulting confusion with validators claiming documents 1245 to have one representation while widely deployed Web browsers interoperably implemented a 1246 different representation has wasted decades of productivity. This version of HTML thus 1247 returns to a non-SGML basis.</p> 1248 1249 <p>Authors interested in using SGML tools in their authoring pipeline are encouraged to use XML 1250 tools and the XML serialisation of HTML.</p> 1251 1252 </div> 1253 1254 <p>This specification defines the parsing rules for HTML documents, whether they are syntactically 1255 correct or not. Certain points in the parsing algorithm are said to be <dfn id=parse-error>parse errors</dfn>. The error handling for parse errors is well-defined (that's the 1256 processing rules described throughout this specification), but user agents, while parsing an HTML 1257 document, may <a href=#abort-a-parser id=parsing:abort-a-parser>abort the parser</a> at the first <a href=#parse-error id=parsing:parse-error>parse 1258 error</a> that they encounter for which they do not wish to apply the rules described in this 1259 specification.</p> 1260 1261 <p>Conformance checkers must report at least one parse error condition to the user if one or more 1262 parse error conditions exist in the document and must not report parse error conditions if none 1263 exist in the document. Conformance checkers may report more than one parse error condition if more 1264 than one parse error condition exists in the document.</p> 1265 1266 <p class=note>Parse errors are only errors with the <em>syntax</em> of HTML. In addition to 1267 checking for parse errors, conformance checkers will also verify that the document obeys all the 1268 other conformance requirements described in this specification.</p> 1269 1270 <p>For the purposes of conformance checkers, if a resource is determined to be in <a href=#syntax id=parsing:syntax>the HTML 1271 syntax</a>, then it is an <a href=infrastructure.html#html-documents id=parsing:html-documents>HTML document</a>.</p> 1272 1273 <p class=note>As stated <a href=infrastructure.html#html-elements id=parsing:html-elements class=no-backref>in the terminology 1274 section</a>, references to <a href=infrastructure.html#element-type id=parsing:element-type>element types</a> that do not 1275 explicitly specify a namespace always refer to elements in the <a id=parsing:html-namespace-2 href=infrastructure.html#html-namespace-2>HTML namespace</a>. For 1276 example, if the spec talks about "a <code id=parsing:the-menuitem-element><a href=forms.html#the-menuitem-element>menuitem</a></code> element", then that is an element with 1277 the local name "<code>menuitem</code>", the namespace "<code>http://www.w3.org/1999/xhtml</code>", and the interface <code id=parsing:htmlmenuitemelement><a href=forms.html#htmlmenuitemelement>HTMLMenuItemElement</a></code>. 1278 Where possible, references to such elements are hyperlinked to their definition.</p> 1279 1280 1281 1282 1283 1284 1285 <h4 id=overview-of-the-parsing-model>12.2.1 Overview of the parsing model</h4> 1286 1287 <p class=overview><object width=345 height=535 data=images/parsing-model-overview.svg><img src=https://images.whatwg.org/parsing-model-overview.png width=345 alt="" height=450></object></p> 1288 1289 <p>The input to the HTML parsing process consists of a stream of <a href=infrastructure.html#unicode-code-point id=overview-of-the-parsing-model:unicode-code-point>Unicode code points</a>, which is passed through a <a href=#tokenization id=overview-of-the-parsing-model:tokenization>tokenization</a> stage 1290 followed by a <a href=#tree-construction id=overview-of-the-parsing-model:tree-construction>tree construction</a> stage. The output is a <code id=overview-of-the-parsing-model:document><a href=dom.html#document>Document</a></code> 1291 object.</p> 1292 1293 <p class=note>Implementations that <a href=infrastructure.html#non-scripted>do not support scripting</a> do not 1294 have to actually create a DOM <code id=overview-of-the-parsing-model:document-2><a href=dom.html#document>Document</a></code> object, but the DOM tree in such cases is 1295 still used as the model for the rest of the specification.</p> 1296 1297 <p>In the common case, the data handled by the tokenization stage comes from the network, but 1298 <a href=webappapis.html#dynamic-markup-insertion id=overview-of-the-parsing-model:dynamic-markup-insertion>it can also come from script</a> running in the user 1299 agent, e.g. using the <code id=overview-of-the-parsing-model:dom-document-write><a href=webappapis.html#dom-document-write>document.write()</a></code> API.</p> 1300 1301 <p id=nestedParsing>There is only one set of states for the tokenizer stage and the tree 1302 construction stage, but the tree construction stage is reentrant, meaning that while the tree 1303 construction stage is handling one token, the tokenizer might be resumed, causing further tokens 1304 to be emitted and processed before the first token's processing is complete.</p> 1305 1306 <div class=example> 1307 1308 <p>In the following example, the tree construction stage will be called upon to handle a "p" 1309 start tag token while handling the "script" end tag token:</p> 1310 1311 <pre>... 1312 <script> 1313 document.write('<p>'); 1314 </script> 1315 ...</pre> 1316 1317 </div> 1318 1319 <p>To handle these cases, parsers have a <dfn id=script-nesting-level>script nesting level</dfn>, which must be initially 1320 set to zero, and a <dfn id=parser-pause-flag>parser pause flag</dfn>, which must be initially set to false.</p> 1321 1322 1323 1324 1325 1326 1327 1328 <h4 id=the-input-byte-stream>12.2.2 The <dfn>input byte stream</dfn></h4> 1329 1330 <p>The stream of Unicode code points that comprises the input to the tokenization stage will be 1331 initially seen by the user agent as a stream of bytes (typically coming over the network or from 1332 the local file system). The bytes encode the actual characters according to a particular 1333 <i>character encoding</i>, which the user agent uses to decode the bytes into characters.</p> 1334 1335 <p class=note>For XML documents, the algorithm user agents are required to use to determine the 1336 character encoding is given by the XML specification. This section does not apply to XML 1337 documents. <a href=references.html#refsXML>[XML]</a></p> 1338 1339 <p>Usually, the <a href=#encoding-sniffing-algorithm id=the-input-byte-stream:encoding-sniffing-algorithm>encoding sniffing algorithm</a> defined below is used to determine the 1340 character encoding.</p> 1341 1342 <p>Given a character encoding, the bytes in the <a href=#the-input-byte-stream id=the-input-byte-stream:the-input-byte-stream>input byte stream</a> must be converted 1343 to Unicode code points for the tokenizer's <a href=#input-stream id=the-input-byte-stream:input-stream>input stream</a>, as described by the rules 1344 for that encoding's <a id=the-input-byte-stream:decoder href=infrastructure.html#decoder>decoder</a>.</p> 1345 1346 <p class=note>Bytes or sequences of bytes in the original byte stream that did not conform to 1347 the Encoding standard (e.g. invalid UTF-8 byte sequences in a UTF-8 input byte stream) are errors 1348 that conformance checkers are expected to report. <a href=references.html#refsENCODING>[ENCODING]</a></p> 1349 1350 <p class=note>Leading Byte Order Marks (BOMs) are not stripped by the decoder algorithms, they 1351 are stripped by the algorithm below.</p> 1352 1353 <p class=warning>The decoder algorithms describe how to handle invalid input; for security 1354 reasons, it is imperative that those rules be followed precisely. Differences in how invalid byte 1355 sequences are handled can result in, amongst other problems, script injection vulnerabilities 1356 ("XSS").</p> 1357 1358 <p>When the HTML parser is decoding an input byte stream, it uses a character encoding and a <dfn id=concept-encoding-confidence>confidence</dfn>. The confidence is either <i>tentative</i>, 1359 <i>certain</i>, or <i>irrelevant</i>. The encoding used, and whether the confidence in that 1360 encoding is <i>tentative</i> or <i>certain</i>, is <a href=#meta-charset-during-parse>used 1361 during the parsing</a> to determine whether to <a href=#change-the-encoding id=the-input-byte-stream:change-the-encoding>change the encoding</a>. If no encoding is 1362 necessary, e.g. because the parser is operating on a Unicode stream and doesn't have to use a 1363 character encoding at all, then the <a href=#concept-encoding-confidence id=the-input-byte-stream:concept-encoding-confidence>confidence</a> is 1364 <i>irrelevant</i>.</p> 1365 1366 <p class=note>Some algorithms feed the parser by directly adding characters to the <a href=#input-stream id=the-input-byte-stream:input-stream-2>input 1367 stream</a> rather than adding bytes to the <a href=#the-input-byte-stream id=the-input-byte-stream:the-input-byte-stream-2>input byte stream</a>.</p> 1368 1369 1370 1371 <h5 id=parsing-with-a-known-character-encoding>12.2.2.1 Parsing with a known character encoding</h5> 1372 1373 <p>When the HTML parser is to operate on an input byte stream that has <dfn id=a-known-definite-encoding>a known definite 1374 encoding</dfn>, then the character encoding is that encoding and the <a href=#concept-encoding-confidence id=parsing-with-a-known-character-encoding:concept-encoding-confidence>confidence</a> is <i>certain</i>.</p> 1375 1376 1377 <h5 id=determining-the-character-encoding>12.2.2.2 Determining the character encoding</h5> 1378 1379 <p>In some cases, it might be impractical to unambiguously determine the encoding before parsing 1380 the document. Because of this, this specification provides for a two-pass mechanism with an 1381 optional pre-scan. Implementations are allowed, as described below, to apply a simplified parsing 1382 algorithm to whatever bytes they have available before beginning to parse the document. Then, the 1383 real parser is started, using a tentative encoding derived from this pre-parse and other 1384 out-of-band metadata. If, while the document is being loaded, the user agent discovers a character 1385 encoding declaration that conflicts with this information, then the parser can get reinvoked to 1386 perform a parse of the document with the real encoding.</p> 1387 1388 <p id=documentEncoding>User agents must use the following algorithm, called the <dfn id=encoding-sniffing-algorithm>encoding 1389 sniffing algorithm</dfn>, to determine the character encoding to use when decoding a document in 1390 the first pass. This algorithm takes as input any out-of-band metadata available to the user agent 1391 (e.g. the <a href=infrastructure.html#content-type id=determining-the-character-encoding:content-type>Content-Type metadata</a> of the document) and all the 1392 bytes available so far, and returns a character encoding and a <a href=#concept-encoding-confidence id=determining-the-character-encoding:concept-encoding-confidence>confidence</a> that is either <i>tentative</i> or 1393 <i>certain</i>.<div class=status><input onclick=toggleStatus(this) value= type=button><p class=bugs><strong>Spec bugs:</strong> <a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=18396" title="Encoding Sniffing Algorithm: Add an XML check as a step zero">18396</a></div> 1394 1395 <ol><li> 1396 1397 <p>If the user has explicitly instructed the user agent to override the document's character 1398 encoding with a specific encoding, optionally return that encoding with the <a href=#concept-encoding-confidence id=determining-the-character-encoding:concept-encoding-confidence-2>confidence</a> <i>certain</i> and abort these steps.</p> 1399 1400 <p class=note>Typically, user agents remember such user requests across sessions, and in some 1401 cases apply them to documents in <code id=determining-the-character-encoding:the-iframe-element><a href=embedded-content.html#the-iframe-element>iframe</a></code>s as well.</p> 1402 1403 <li> 1404 1405 <p>The user agent may wait for more bytes of the resource to be available, either in this step 1406 or at any later step in this algorithm. For instance, a user agent might wait 500ms or 1024 1407 bytes, whichever came first. In general preparsing the source to find the encoding improves 1408 performance, as it reduces the need to throw away the data structures used when parsing upon 1409 finding the encoding information. However, if the user agent delays too long to obtain data to 1410 determine the encoding, then the cost of the delay could outweigh any performance improvements 1411 from the preparse.</p> 1412 1413 <p class=note>The authoring conformance requirements for character encoding declarations limit 1414 them to only appearing <a href=semantics.html#charset1024>in the first 1024 bytes</a>. User agents are 1415 therefore encouraged to use the prescan algorithm below (as invoked by these steps) on the first 1416 1024 bytes, but not to stall beyond that.</p> 1417 1418 <li> 1419 1420 1421 1422 <p>For each of the rows in the following table, starting with the first one and going down, if 1423 there are as many or more bytes available than the number of bytes in the first column, and the 1424 first bytes of the file match the bytes given in the first column, then return the encoding 1425 given in the cell in the second column of that row, with the <a href=#concept-encoding-confidence id=determining-the-character-encoding:concept-encoding-confidence-3>confidence</a> <i>certain</i>, and abort these steps:</p> 1426 1427 1428 <table><thead><tr><th>Bytes in Hexadecimal 1429 <th>Encoding 1430 <tbody><tr><td>FE FF 1431 <td>Big-endian UTF-16 1432 <tr><td>FF FE 1433 <td>Little-endian UTF-16 1434 <tr><td>EF BB BF 1435 <td>UTF-8 1436 1437 </table> 1438 1439 <p class=note>This step looks for Unicode Byte Order Marks (BOMs).</p> 1440 1441 <p class=note>That this step happens before the next one honoring the HTTP 1442 <code id=determining-the-character-encoding:content-type-2><a href=infrastructure.html#content-type>Content-Type</a></code> header is a <a id=determining-the-character-encoding:willful-violation href=introduction.html#willful-violation>willful violation</a> of the HTTP specification, 1443 motivated by a desire to be maximally compatible with legacy content. <a href=references.html#refsHTTP>[HTTP]</a></p> 1444 1445 <li><p>If the transport layer specifies a character encoding, and it is supported, return that 1446 encoding with the <a href=#concept-encoding-confidence id=determining-the-character-encoding:concept-encoding-confidence-4>confidence</a> <i>certain</i>, and 1447 abort these steps.<li> 1448 1449 <p>Optionally <a href=#prescan-a-byte-stream-to-determine-its-encoding id=determining-the-character-encoding:prescan-a-byte-stream-to-determine-its-encoding>prescan the byte 1450 stream to determine its encoding</a>. The <var>end condition</var> is that the user 1451 agent decides that scanning further bytes would not be efficient. User agents are encouraged to 1452 only prescan the first 1024 bytes. User agents may decide that scanning <em>any</em> bytes is 1453 not efficient, in which case these substeps are entirely skipped.</p> 1454 1455 <p>The aforementioned algorithm either aborts unsuccessfully or returns a character encoding. If 1456 it returns a character encoding, then this algorithm must be aborted, returning the same 1457 encoding, with <a href=#concept-encoding-confidence id=determining-the-character-encoding:concept-encoding-confidence-5>confidence</a> <i>tentative</i>.</p> 1458 1459 <li> 1460 1461 <p>If the <a href=#html-parser id=determining-the-character-encoding:html-parser>HTML parser</a> for which this algorithm is being run is associated with a 1462 <code id=determining-the-character-encoding:document><a href=dom.html#document>Document</a></code> that is itself in a <a id=determining-the-character-encoding:nested-browsing-context href=browsers.html#nested-browsing-context>nested browsing context</a>, run these 1463 substeps:</p> 1464 1465 <ol><li><p>Let <var>new document</var> be the <code id=determining-the-character-encoding:document-2><a href=dom.html#document>Document</a></code> with which the 1466 <a href=#html-parser id=determining-the-character-encoding:html-parser-2>HTML parser</a> is associated.<li><p>Let <var>parent document</var> be the <code id=determining-the-character-encoding:document-3><a href=dom.html#document>Document</a></code> <a href=browsers.html#browsing-context-nested-through id=determining-the-character-encoding:browsing-context-nested-through>through which <var>new document</var> is 1467 nested</a> (the <a id=determining-the-character-encoding:active-document href=browsers.html#active-document>active document</a> of the <a id=determining-the-character-encoding:parent-browsing-context href=browsers.html#parent-browsing-context>parent browsing context</a> of 1468 <var>new document</var>).<li><p>If <var>parent document</var>'s <a id=determining-the-character-encoding:origin-2 href=browsers.html#origin-2>origin</a> is not the <a id=determining-the-character-encoding:same-origin href=browsers.html#same-origin>same 1469 origin</a> as <var>new document</var>'s <a id=determining-the-character-encoding:origin-2-2 href=browsers.html#origin-2>origin</a>, then abort these 1470 substeps.<li><p>If <var>parent document</var>'s <a href="infrastructure.html#document's-character-encoding" id="determining-the-character-encoding:document's-character-encoding">character encoding</a> is not an <a id=determining-the-character-encoding:ascii-compatible-character-encoding href=infrastructure.html#ascii-compatible-character-encoding>ASCII-compatible character encoding</a>, 1471 then abort these substeps.<li><p>Return <var>parent document</var>'s <a href="infrastructure.html#document's-character-encoding" id="determining-the-character-encoding:document's-character-encoding-2">character encoding</a>, with the <a href=#concept-encoding-confidence id=determining-the-character-encoding:concept-encoding-confidence-6>confidence</a> <i>tentative</i>, and abort the 1472 <a href=#encoding-sniffing-algorithm id=determining-the-character-encoding:encoding-sniffing-algorithm>encoding sniffing algorithm</a>'s steps.</ol> 1473 1474 <li><p>Otherwise, if the user agent has information on the likely encoding for this page, e.g. 1475 based on the encoding of the page when it was last visited, then return that encoding, with the 1476 <a href=#concept-encoding-confidence id=determining-the-character-encoding:concept-encoding-confidence-7>confidence</a> <i>tentative</i>, and abort these 1477 steps.<li> 1478 1479 <p>The user agent may attempt to autodetect the character encoding from applying frequency 1480 analysis or other algorithms to the data stream. Such algorithms may use information about the 1481 resource other than the resource's contents, including the address of the resource. If 1482 autodetection succeeds in determining a character encoding, and that encoding is a supported 1483 encoding, then return that encoding, with the <a href=#concept-encoding-confidence id=determining-the-character-encoding:concept-encoding-confidence-8>confidence</a> <i>tentative</i>, and abort these steps. 1484 <a href=references.html#refsUNIVCHARDET>[UNIVCHARDET]</a></p> 1485 1486 <p class=note>User agents are generally discouraged from attempting to autodetect encodings 1487 for resources obtained over the network, since doing so involves inherently non-interoperable 1488 heuristics. Attempting to detect encodings based on an HTML document's preamble is especially 1489 tricky since HTML markup typically uses only ASCII characters, and HTML documents tend to begin 1490 with a lot of markup rather than with text content.</p> 1491 1492 <p class=note>The UTF-8 encoding has a highly detectable bit pattern. Files from the local 1493 file system that contain bytes with values greater than 0x7F which match the UTF-8 pattern are 1494 very likely to be UTF-8, while documents with byte sequences that do not match it are very 1495 likely not. When a user agent can examine the whole file, rather than just the preamble, 1496 detecting for UTF-8 specifically can be especially effective. <a href=references.html#refsPPUTF8>[PPUTF8]</a> <a href=references.html#refsUTF8DET>[UTF8DET]</a></p> 1497 1498 <li> 1499 1500 <p>Otherwise, return an implementation-defined or user-specified default character encoding, 1501 with the <a href=#concept-encoding-confidence id=determining-the-character-encoding:concept-encoding-confidence-9>confidence</a> <i>tentative</i>.</p> 1502 1503 <p>In controlled environments or in environments where the encoding of documents can be 1504 prescribed (for example, for user agents intended for dedicated use in new networks), the 1505 comprehensive <code>UTF-8</code> encoding is suggested.</p> 1506 1507 <p>In other environments, the default encoding is typically dependent on the user's locale (an 1508 approximation of the languages, and thus often encodings, of the pages that the user is likely 1509 to frequent). The following table gives suggested defaults based on the user's locale, for 1510 compatibility with legacy content. Locales are identified by BCP 47 language tags. <a href=references.html#refsBCP47>[BCP47]</a> <a href=references.html#refsENCODING>[ENCODING]</a></p> 1511 1512 1513 1514 <table><thead><tr><th colspan=2>Locale language 1515 <th>Suggested default encoding 1516 <tbody><tr><td>ar 1517 <td>Arabic 1518 <td>windows-1256 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 <tr><td>ba 1529 <td>Bashkir 1530 <td>windows-1251 1531 1532 1533 1534 <tr><td>be 1535 <td>Belarusian 1536 <td>windows-1251 1537 1538 1539 1540 <tr><td>bg 1541 <td>Bulgarian 1542 <td>windows-1251 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 <tr><td>cs 1557 <td>Czech 1558 <td>windows-1250 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 <tr><td>el 1570 <td>Greek 1571 <td>ISO-8859-7 1572 1573 1574 1575 1576 1577 <tr><td>et 1578 <td>Estonian 1579 <td>windows-1257 1580 1581 1582 1583 <tr><td>fa 1584 <td>Persian 1585 <td>windows-1256 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 <tr><td>he 1608 <td>Hebrew 1609 <td>windows-1255 1610 1611 1612 1613 <tr><td>hr 1614 <td>Croatian 1615 <td>windows-1250 1616 1617 <tr><td>hu 1618 <td>Hungarian 1619 <td>ISO-8859-2 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 <tr><td>ja 1634 <td>Japanese 1635 <td>Shift_JIS 1636 1637 1638 1639 <tr><td>kk 1640 <td>Kazakh 1641 <td>windows-1251 1642 1643 1644 1645 1646 1647 <tr><td>ko 1648 <td>Korean 1649 <td>euc-kr 1650 1651 <tr><td>ku 1652 <td>Kurdish 1653 <td>windows-1254 1654 1655 1656 1657 <tr><td>ky 1658 <td>Kyrgyz 1659 <td>windows-1251 1660 1661 1662 1663 <tr><td>lt 1664 <td>Lithuanian 1665 <td>windows-1257 1666 1667 <tr><td>lv 1668 <td>Latvian 1669 <td>windows-1257 1670 1671 1672 1673 <tr><td>mk 1674 <td>Macedonian 1675 <td>windows-1251 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 <tr><td>pl 1700 <td>Polish 1701 <td>ISO-8859-2 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 <tr><td>ru 1724 <td>Russian 1725 <td>windows-1251 1726 1727 1728 1729 1730 1731 <tr><td>sah 1732 <td>Yakut 1733 <td>windows-1251 1734 1735 1736 1737 1738 1739 1740 1741 <tr><td>sk 1742 <td>Slovak 1743 <td>windows-1250 1744 1745 <tr><td>sl 1746 <td>Slovenian 1747 <td>ISO-8859-2 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 <tr><td>sr 1766 <td>Serbian 1767 <td>windows-1251 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 <tr><td>tg 1784 <td>Tajik 1785 <td>windows-1251 1786 1787 <tr><td>th 1788 <td>Thai 1789 <td>windows-874 1790 1791 1792 1793 1794 1795 <tr><td>tr 1796 <td>Turkish 1797 <td>windows-1254 1798 1799 1800 1801 <tr><td>tt 1802 <td>Tatar 1803 <td>windows-1251 1804 1805 1806 1807 1808 1809 <tr><td>uk 1810 <td>Ukrainian 1811 <td>windows-1251 1812 1813 1814 1815 1816 1817 1818 1819 <tr><td>vi 1820 <td>Vietnamese 1821 <td>windows-1258 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 <tr><td>zh-CN 1834 <td>Chinese (People's Republic of China) 1835 <td>GB18030 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 <tr><td>zh-TW 1848 <td>Chinese (Taiwan) 1849 <td>Big5 1850 1851 1852 1853 <tr><td colspan=2>All other locales 1854 <td>windows-1252 1855 1856 </table> 1857 1858 <p class=tablenote><small>The contents of this table are derived from the intersection of 1859 Windows, Chrome, and Firefox defaults.</small></p> 1860 1861 </ol> 1862 1863 <p>The <a id="determining-the-character-encoding:document's-character-encoding-3" href="infrastructure.html#document's-character-encoding">document's character encoding</a> must immediately be set to the value returned 1864 from this algorithm, at the same time as the user agent uses the returned value to select the 1865 decoder to use for the input byte stream.</p> 1866 1867 <hr> 1868 1869 <p>When an algorithm requires a user agent to <dfn id=prescan-a-byte-stream-to-determine-its-encoding>prescan a byte stream to determine its 1870 encoding</dfn>, given some defined <var>end condition</var>, then it must run the 1871 following steps. These steps either abort unsuccessfully or return a character encoding. If at any 1872 point during these steps (including during instances of the <a href=#concept-get-attributes-when-sniffing id=determining-the-character-encoding:concept-get-attributes-when-sniffing>get an attribute</a> algorithm invoked by this 1873 one) the user agent either runs out of bytes (meaning the <var>position</var> pointer 1874 created in the first step below goes beyond the end of the byte stream obtained so far) or reaches 1875 its <var>end condition</var>, then abort the <a href=#prescan-a-byte-stream-to-determine-its-encoding id=determining-the-character-encoding:prescan-a-byte-stream-to-determine-its-encoding-2>prescan a byte stream to determine its 1876 encoding</a> algorithm unsuccessfully.</p> 1877 1878 <ol><li> 1879 1880 <p>Let <var>position</var> be a pointer to a byte in the input byte stream, initially 1881 pointing at the first byte.</p> 1882 1883 <li> 1884 1885 <p><i>Loop</i>: If <var>position</var> points to:</p> 1886 1887 <dl class=switch><dt>A sequence of bytes starting with: 0x3C 0x21 0x2D 0x2D (ASCII '<!--')<dd> 1888 1889 <p>Advance the <var>position</var> pointer so that it points at the first 0x3E byte 1890 which is preceded by two 0x2D bytes (i.e. at the end of an ASCII '-->' sequence) and comes 1891 after the 0x3C byte that was found. (The two 0x2D bytes can be the same as the those in the 1892 '<!--' sequence.)</p> 1893 1894 <dt>A sequence of bytes starting with: 0x3C, 0x4D or 0x6D, 0x45 or 0x65, 0x54 or 0x74, 0x41 or 0x61, and one of 0x09, 0x0A, 0x0C, 0x0D, 0x20, 0x2F (case-insensitive ASCII '<meta' followed by a space or slash)<dd> 1895 1896 <ol><li><p>Advance the <var>position</var> pointer so that it points at the next 0x09, 1897 0x0A, 0x0C, 0x0D, 0x20, or 0x2F byte (the one in sequence of characters matched 1898 above).<li><p>Let <var>attribute list</var> be an empty list of strings.<li><p>Let <var>got pragma</var> be false.<li><p>Let <var>need pragma</var> be null.<li><p>Let <var>charset</var> be the null value (which, for the purposes of this 1899 algorithm, is distinct from an unrecognised encoding or the empty string).<li><p><i>Attributes</i>: <a href=#concept-get-attributes-when-sniffing id=determining-the-character-encoding:concept-get-attributes-when-sniffing-2>Get an 1900 attribute</a> and its value. If no attribute was sniffed, then jump to the 1901 <i>processing</i> step below.<li><p>If the attribute's name is already in <var>attribute list</var>, then return 1902 to the step labeled <i>attributes</i>.</p> 1903 1904 <li><p>Add the attribute's name to <var>attribute list</var>.</p> 1905 1906 <li> 1907 1908 <p>Run the appropriate step from the following list, if one applies:</p> 1909 1910 <dl class=switch><dt>If the attribute's name is "<code>http-equiv</code>"<dd><p>If the attribute's value is "<code>content-type</code>", then set <var>got pragma</var> to true.<dt>If the attribute's name is "<code>content</code>"<dd><p>Apply the <a id=determining-the-character-encoding:algorithm-for-extracting-a-character-encoding-from-a-meta-element href=infrastructure.html#algorithm-for-extracting-a-character-encoding-from-a-meta-element>algorithm for extracting a character encoding from a 1911 <code>meta</code> element</a>, giving the attribute's value as the string to parse. If a 1912 character encoding is returned, and if <var>charset</var> is still set to null, 1913 let <var>charset</var> be the encoding returned, and set <var>need 1914 pragma</var> to true.<dt>If the attribute's name is "<code>charset</code>"<dd><p>Let <var>charset</var> be the result of <a id=determining-the-character-encoding:getting-an-encoding href=https://encoding.spec.whatwg.org/#concept-encoding-get data-x-internal=getting-an-encoding>getting an encoding</a> 1915 from the attribute's value, and set <var>need pragma</var> to false.</dl> 1916 1917 <li><p>Return to the step labeled <i>attributes</i>.<li><p><i>Processing</i>: If <var>need pragma</var> is null, then jump to the step 1918 below labeled <i>next byte</i>.<li><p>If <var>need pragma</var> is true but <var>got pragma</var> is 1919 false, then jump to the step below labeled <i>next byte</i>.<li><p>If <var>charset</var> is <a id=determining-the-character-encoding:a-utf-16-encoding href=infrastructure.html#a-utf-16-encoding>a UTF-16 encoding</a>, change the value of 1920 <var>charset</var> to UTF-8.<li><p>If <var>charset</var> is the x-user-defined encoding, change the value of 1921 <var>charset</var> to Windows-1252. <a href=references.html#refsENCODING>[ENCODING]</a><li><p>If <var>charset</var> is not a supported character encoding, then jump to the 1922 step below labeled <i>next byte</i>.<li><p>Abort the <a href=#prescan-a-byte-stream-to-determine-its-encoding id=determining-the-character-encoding:prescan-a-byte-stream-to-determine-its-encoding-3>prescan a byte stream to determine its encoding</a> algorithm, 1923 returning the encoding given by <var>charset</var>.</ol> 1924 1925 <dt>A sequence of bytes starting with a 0x3C byte (ASCII <), optionally a 0x2F byte (ASCII /), and finally a byte in the range 0x41-0x5A or 0x61-0x7A (an ASCII letter)<dd> 1926 1927 <ol><li><p>Advance the <var>position</var> pointer so that it points at the next 0x09 1928 (ASCII TAB), 0x0A (ASCII LF), 0x0C (ASCII FF), 0x0D (ASCII CR), 0x20 (ASCII space), or 0x3E 1929 (ASCII >) byte.<li><p>Repeatedly <a href=#concept-get-attributes-when-sniffing id=determining-the-character-encoding:concept-get-attributes-when-sniffing-3>get an attribute</a> 1930 until no further attributes can be found, then jump to the step below labeled <i>next 1931 byte</i>.</ol> 1932 1933 <dt>A sequence of bytes starting with: 0x3C 0x21 (ASCII '<!')<dt>A sequence of bytes starting with: 0x3C 0x2F (ASCII '</')<dt>A sequence of bytes starting with: 0x3C 0x3F (ASCII '<?')<dd> 1934 1935 <p>Advance the <var>position</var> pointer so that it points at the first 0x3E byte 1936 (ASCII >) that comes after the 0x3C byte that was found.</p> 1937 1938 <dt>Any other byte<dd> 1939 1940 <p>Do nothing with that byte.</p> 1941 1942 </dl> 1943 1944 <li><i>Next byte</i>: Move <var>position</var> so it points at the next byte in the 1945 input byte stream, and return to the step above labeled <i>loop</i>.</ol> 1946 1947 <p>When the <a href=#prescan-a-byte-stream-to-determine-its-encoding id=determining-the-character-encoding:prescan-a-byte-stream-to-determine-its-encoding-4>prescan a byte stream to determine its encoding</a> algorithm says to <dfn id=concept-get-attributes-when-sniffing>get an attribute</dfn>, it means doing this:</p> 1948 1949 <ol><li><p>If the byte at <var>position</var> is one of 0x09 (ASCII TAB), 0x0A (ASCII LF), 1950 0x0C (ASCII FF), 0x0D (ASCII CR), 0x20 (ASCII space), or 0x2F (ASCII /) then advance <var>position</var> to the next byte and redo this step.<li><p>If the byte at <var>position</var> is 0x3E (ASCII >), then abort the <a href=#concept-get-attributes-when-sniffing id=determining-the-character-encoding:concept-get-attributes-when-sniffing-4>get an attribute</a> algorithm. There isn't 1951 one.<li><p>Otherwise, the byte at <var>position</var> is the start of the attribute name. 1952 Let <var>attribute name</var> and <var>attribute value</var> be the empty 1953 string.<li><p>Process the byte at <var>position</var> as follows:</p> 1954 1955 <dl class=switch><dt>If it is 0x3D (ASCII =), and the <var>attribute name</var> is longer than the 1956 empty string<dd>Advance <var>position</var> to the next byte and jump to the step below labeled 1957 <i>value</i>.<dt>If it is 0x09 (ASCII TAB), 0x0A (ASCII LF), 0x0C (ASCII FF), 0x0D (ASCII CR), or 0x20 1958 (ASCII space)<dd>Jump to the step below labeled <i>spaces</i>.<dt>If it is 0x2F (ASCII /) or 0x3E (ASCII >)<dd>Abort the <a href=#concept-get-attributes-when-sniffing id=determining-the-character-encoding:concept-get-attributes-when-sniffing-5>get an attribute</a> 1959 algorithm. The attribute's name is the value of <var>attribute name</var>, its value 1960 is the empty string.<dt>If it is in the range 0x41 (ASCII A) to 0x5A (ASCII Z)<dd>Append the Unicode character with code point <span><var>b</var>+0x20</span> to <var>attribute name</var> (where <var>b</var> 1961 is the value of the byte at <var>position</var>). (This converts the input to 1962 lowercase.)<dt>Anything else<dd>Append the Unicode character with the same code point as the value of the byte at <var>position</var> to <var>attribute name</var>. (It doesn't actually matter how 1963 bytes outside the ASCII range are handled here, since only ASCII characters can contribute to 1964 the detection of a character encoding.)</dl> 1965 1966 <li><p>Advance <var>position</var> to the next byte and return to the previous 1967 step.<li><p><i>Spaces</i>: If the byte at <var>position</var> is one of 0x09 (ASCII TAB), 1968 0x0A (ASCII LF), 0x0C (ASCII FF), 0x0D (ASCII CR), or 0x20 (ASCII space) then advance <var>position</var> to the next byte, then, repeat this step.<li><p>If the byte at <var>position</var> is <em>not</em> 0x3D (ASCII =), abort the 1969 <a href=#concept-get-attributes-when-sniffing id=determining-the-character-encoding:concept-get-attributes-when-sniffing-6>get an attribute</a> algorithm. The 1970 attribute's name is the value of <var>attribute name</var>, its value is the empty 1971 string.<li><p>Advance <var>position</var> past the 0x3D (ASCII =) byte.<li><p><i>Value</i>: If the byte at <var>position</var> is one of 0x09 (ASCII TAB), 0x0A 1972 (ASCII LF), 0x0C (ASCII FF), 0x0D (ASCII CR), or 0x20 (ASCII space) then advance <var>position</var> to the next byte, then, repeat this step.<li><p>Process the byte at <var>position</var> as follows:</p> 1973 1974 <dl class=switch><dt>If it is 0x22 (ASCII ") or 0x27 (ASCII ')<dd> 1975 1976 <ol><li>Let <var>b</var> be the value of the byte at <var>position</var>.<li><i>Quote loop</i>: Advance <var>position</var> to the next byte.<li>If the value of the byte at <var>position</var> is the value of <var>b</var>, then advance <var>position</var> to the next byte and abort the 1977 "get an attribute" algorithm. The attribute's name is the value of <var>attribute 1978 name</var>, and its value is the value of <var>attribute value</var>.<li>Otherwise, if the value of the byte at <var>position</var> is in the range 0x41 1979 (ASCII A) to 0x5A (ASCII Z), then append a Unicode character to <var>attribute 1980 value</var> whose code point is 0x20 more than the value of the byte at <var>position</var>.<li>Otherwise, append a Unicode character to <var>attribute value</var> whose code 1981 point is the same as the value of the byte at <var>position</var>.<li>Return to the step above labeled <i>quote loop</i>.</ol> 1982 1983 <dt>If it is 0x3E (ASCII >)<dd>Abort the <a href=#concept-get-attributes-when-sniffing id=determining-the-character-encoding:concept-get-attributes-when-sniffing-7>get an attribute</a> 1984 algorithm. The attribute's name is the value of <var>attribute name</var>, its value 1985 is the empty string.<dt>If it is in the range 0x41 (ASCII A) to 0x5A (ASCII Z)<dd>Append the Unicode character with code point <span><var>b</var>+0x20</span> to <var>attribute value</var> (where <var>b</var> is the value of the byte at <var>position</var>). Advance <var>position</var> to the next byte.<dt>Anything else<dd>Append the Unicode character with the same code point as the value of the byte at <var>position</var> to <var>attribute value</var>. Advance <var>position</var> to the next byte.</dl> 1986 1987 <li><p>Process the byte at <var>position</var> as 1988 follows:</p> 1989 1990 <dl class=switch><dt>If it is 0x09 (ASCII TAB), 0x0A (ASCII LF), 0x0C (ASCII FF), 0x0D (ASCII CR), 0x20 (ASCII 1991 space), or 0x3E (ASCII >)<dd>Abort the <a href=#concept-get-attributes-when-sniffing id=determining-the-character-encoding:concept-get-attributes-when-sniffing-8>get an attribute</a> 1992 algorithm. The attribute's name is the value of <var>attribute name</var> and its 1993 value is the value of <var>attribute value</var>.<dt>If it is in the range 0x41 (ASCII A) to 0x5A (ASCII Z)<dd>Append the Unicode character with code point <span><var>b</var>+0x20</span> to <var>attribute value</var> (where <var>b</var> is the value of the byte at <var>position</var>).<dt>Anything else<dd>Append the Unicode character with the same code point as the value of the byte at <var>position</var> to <var>attribute value</var>.</dl> 1994 1995 <li><p>Advance <var>position</var> to the next byte and return to the previous 1996 step.</ol> 1997 1998 <p>For the sake of interoperability, user agents should not use a pre-scan algorithm that returns 1999 different results than the one described above. (But, if you do, please at least let us know, so 2000 that we can improve this algorithm and benefit everyone...)</p> 2001 2002 2003 2004 2005 2006 <h5 id=character-encodings>12.2.2.3 Character encodings</h5> 2007 2008 <p>User agents must support the encodings defined in the WHATWG Encoding standard. User agents 2009 should not support other encodings.</p> 2010 2011 <p>User agents must not support the CESU-8, UTF-7, BOCU-1 and SCSU encodings. <a href=references.html#refsCESU8>[CESU8]</a> <a href=references.html#refsUTF7>[UTF7]</a> <a href=references.html#refsBOCU1>[BOCU1]</a> <a href=references.html#refsSCSU>[SCSU]</a></p> 2012 2013 <p>Support for encodings based on EBCDIC is especially discouraged. This encoding is rarely used 2014 for publicly-facing Web content. Support for UTF-32 is also especially discouraged. This encoding 2015 is rarely used, and frequently implemented incorrectly.</p> 2016 2017 <p class=note>This specification does not make any attempt to support EBCDIC-based encodings and 2018 UTF-32 in its algorithms; support and use of these encodings can thus lead to unexpected behavior 2019 in implementations of this specification.</p> 2020 2021 2022 <h5 id=changing-the-encoding-while-parsing>12.2.2.4 Changing the encoding while parsing</h5> 2023 2024 <p>When the parser requires the user agent to <dfn id=change-the-encoding>change the encoding</dfn>, it must run the 2025 following steps. This might happen if the <a href=#encoding-sniffing-algorithm id=changing-the-encoding-while-parsing:encoding-sniffing-algorithm>encoding sniffing algorithm</a> described above 2026 failed to find a character encoding, or if it found a character encoding that was not the actual 2027 encoding of the file.</p> 2028 2029 <ol><li><p>If the encoding that is already being used to interpret the input stream is <a id=changing-the-encoding-while-parsing:a-utf-16-encoding href=infrastructure.html#a-utf-16-encoding>a UTF-16 2030 encoding</a>, then set the <a href=#concept-encoding-confidence id=changing-the-encoding-while-parsing:concept-encoding-confidence>confidence</a> to 2031 <i>certain</i> and abort these steps. The new encoding is ignored; if it was anything but the 2032 same encoding, then it would be clearly incorrect.<li><p>If the new encoding is <a id=changing-the-encoding-while-parsing:a-utf-16-encoding-2 href=infrastructure.html#a-utf-16-encoding>a UTF-16 encoding</a>, change it to UTF-8.<li><p>If the new encoding is the x-user-defined encoding, change it to Windows-1252. <a href=references.html#refsENCODING>[ENCODING]</a><li><p>If the new encoding is identical or equivalent to the encoding that is already being used 2033 to interpret the input stream, then set the <a href=#concept-encoding-confidence id=changing-the-encoding-while-parsing:concept-encoding-confidence-2>confidence</a> to <i>certain</i> and abort these steps. 2034 This happens when the encoding information found in the file matches what the <a href=#encoding-sniffing-algorithm id=changing-the-encoding-while-parsing:encoding-sniffing-algorithm-2>encoding 2035 sniffing algorithm</a> determined to be the encoding, and in the second pass through the 2036 parser if the first pass found that the encoding sniffing algorithm described in the earlier 2037 section failed to find the right encoding.<li><p>If all the bytes up to the last byte converted by the current decoder have the same 2038 Unicode interpretations in both the current encoding and the new encoding, and if the user agent 2039 supports changing the converter on the fly, then the user agent may change to the new converter 2040 for the encoding on the fly. Set the <a id="changing-the-encoding-while-parsing:document's-character-encoding" href="infrastructure.html#document's-character-encoding">document's character encoding</a> and the encoding 2041 used to convert the input stream to the new encoding, set the <a href=#concept-encoding-confidence id=changing-the-encoding-while-parsing:concept-encoding-confidence-3>confidence</a> to <i>certain</i>, and abort these 2042 steps.<li><p>Otherwise, <a id=changing-the-encoding-while-parsing:navigate href=browsers.html#navigate>navigate</a> to the document again, with 2043 <a id=changing-the-encoding-while-parsing:replacement-enabled href=browsers.html#replacement-enabled>replacement enabled</a>, and using the same <a id=changing-the-encoding-while-parsing:source-browsing-context href=browsers.html#source-browsing-context>source browsing context</a>, but 2044 this time skip the <a href=#encoding-sniffing-algorithm id=changing-the-encoding-while-parsing:encoding-sniffing-algorithm-3>encoding sniffing algorithm</a> and instead just set the encoding to 2045 the new encoding and the <a href=#concept-encoding-confidence id=changing-the-encoding-while-parsing:concept-encoding-confidence-4>confidence</a> to 2046 <i>certain</i>. Whenever possible, this should be done without actually contacting the network 2047 layer (the bytes should be re-parsed from memory), even if, e.g., the document is marked as not 2048 being cacheable. If this is not possible and contacting the network layer would involve repeating 2049 a request that uses a method other than HTTP GET (<a href=infrastructure.html#concept-http-equivalent-get id=changing-the-encoding-while-parsing:concept-http-equivalent-get>or 2050 equivalent</a> for non-HTTP URLs), then instead set the <a href=#concept-encoding-confidence id=changing-the-encoding-while-parsing:concept-encoding-confidence-5>confidence</a> to <i>certain</i> and ignore the new 2051 encoding. The resource will be misinterpreted. User agents may notify the user of the situation, 2052 to aid in application development.</ol> 2053 2054 <p class=note>This algorithm is only invoked when a new encoding is found declared on a 2055 <code id=changing-the-encoding-while-parsing:the-meta-element><a href=semantics.html#the-meta-element>meta</a></code> element.</p> 2056 2057 2058 <h5 id=preprocessing-the-input-stream>12.2.2.5 Preprocessing the input stream</h5> 2059 2060 <p>The <dfn id=input-stream>input stream</dfn> consists of the characters pushed into it as the <a href=#the-input-byte-stream id=preprocessing-the-input-stream:the-input-byte-stream>input byte 2061 stream</a> is decoded or from the various APIs that directly manipulate the input stream.</p> 2062 2063 <p>One leading U+FEFF BYTE ORDER MARK character must be ignored if any are present in the 2064 <a href=#input-stream id=preprocessing-the-input-stream:input-stream>input stream</a>.</p> 2065 2066 <p class=note>The requirement to strip a U+FEFF BYTE ORDER MARK character regardless of whether 2067 that character was used to determine the byte order is a <a id=preprocessing-the-input-stream:willful-violation href=introduction.html#willful-violation>willful violation</a> of 2068 Unicode, motivated by a desire to increase the resilience of user agents in the face of nave 2069 transcoders.</p> 2070 2071 <p>Any occurrences of any characters in the ranges U+0001 to U+0008, U+000E to U+001F, 2072 U+007F to U+009F, U+FDD0 to U+FDEF, and 2073 characters U+000B, U+FFFE, U+FFFF, U+1FFFE, U+1FFFF, U+2FFFE, U+2FFFF, U+3FFFE, U+3FFFF, U+4FFFE, 2074 U+4FFFF, U+5FFFE, U+5FFFF, U+6FFFE, U+6FFFF, U+7FFFE, U+7FFFF, U+8FFFE, U+8FFFF, U+9FFFE, U+9FFFF, 2075 U+AFFFE, U+AFFFF, U+BFFFE, U+BFFFF, U+CFFFE, U+CFFFF, U+DFFFE, U+DFFFF, U+EFFFE, U+EFFFF, U+FFFFE, 2076 U+FFFFF, U+10FFFE, and U+10FFFF are <a href=#parse-error id=preprocessing-the-input-stream:parse-error>parse errors</a>. These are all 2077 <a id=preprocessing-the-input-stream:control-characters href=infrastructure.html#control-characters>control characters</a> or permanently undefined Unicode characters (noncharacters).</p> 2078 2079 <p>Any <a id=preprocessing-the-input-stream:character href=infrastructure.html#character>character</a> that is a not a <a id=preprocessing-the-input-stream:unicode-character href=infrastructure.html#unicode-character>Unicode character</a>, i.e. any isolated 2080 surrogate, is a <a href=#parse-error id=preprocessing-the-input-stream:parse-error-2>parse error</a>. (These can only find their way into the input stream via 2081 script APIs such as <code id=preprocessing-the-input-stream:dom-document-write><a href=webappapis.html#dom-document-write>document.write()</a></code>.)</p> 2082 2083 <p>U+000D CARRIAGE RETURN (CR) characters and U+000A LINE FEED (LF) characters are treated 2084 specially. All CR characters must be converted to LF characters, and any LF characters that 2085 immediately follow a CR character must be ignored. Thus, newlines in HTML DOMs are represented by 2086 LF characters, and there are never any CR characters in the input to the <a href=#tokenization id=preprocessing-the-input-stream:tokenization>tokenization</a> 2087 stage.</p> 2088 2089 <p>The <dfn id=next-input-character>next input character</dfn> is the first character in the <a href=#input-stream id=preprocessing-the-input-stream:input-stream-2>input stream</a> 2090 that has not yet been <dfn>consumed</dfn> or explicitly ignored by the requirements in 2091 this section. Initially, the <i id=preprocessing-the-input-stream:next-input-character><a href=#next-input-character>next input character</a></i> is the 2092 first character in the input. The <dfn id=current-input-character>current input character</dfn> is the last character to have 2093 been <i>consumed</i>.</p> 2094 2095 <p>The <dfn id=insertion-point>insertion point</dfn> is the position (just before a character or just before the end 2096 of the input stream) where content inserted using <code id=preprocessing-the-input-stream:dom-document-write-2><a href=webappapis.html#dom-document-write>document.write()</a></code> is actually inserted. The insertion point is 2097 relative to the position of the character immediately after it, it is not an absolute offset into 2098 the input stream. Initially, the insertion point is undefined.</p> 2099 2100 <p>The "EOF" character in the tables below is a conceptual character representing the end of the 2101 <a href=#input-stream id=preprocessing-the-input-stream:input-stream-3>input stream</a>. If the parser is a <a id=preprocessing-the-input-stream:script-created-parser href=webappapis.html#script-created-parser>script-created parser</a>, then the end of 2102 the <a href=#input-stream id=preprocessing-the-input-stream:input-stream-4>input stream</a> is reached when an <dfn id=explicit-eof-character>explicit "EOF" character</dfn> (inserted by 2103 the <code id=preprocessing-the-input-stream:dom-document-close><a href=webappapis.html#dom-document-close>document.close()</a></code> method) is consumed. Otherwise, the 2104 "EOF" character is not a real character in the stream, but rather the lack of any further 2105 characters.</p> 2106 2107 <p class=note>The handling of U+0000 NULL characters varies based on where the characters are 2108 found. In general, they are ignored except where doing so could plausibly introduce an attack 2109 vector. This handling is, by necessity, spread across both the tokenization stage and the tree 2110 construction stage.</p> 2111 2112 2113 2114 2115 2116 2117 <h4 id=parse-state>12.2.3 Parse state</h4> 2118 2119 <h5 id=the-insertion-mode>12.2.3.1 The insertion mode</h5> 2120 2121 <p>The <dfn id=insertion-mode>insertion mode</dfn> is a state variable that controls the primary operation of the 2122 tree construction stage.</p> 2123 2124 <p>Initially, the <a href=#insertion-mode id=the-insertion-mode:insertion-mode>insertion mode</a> is "<a href=#the-initial-insertion-mode id=the-insertion-mode:the-initial-insertion-mode>initial</a>". It can change to "<a href=#the-before-html-insertion-mode id=the-insertion-mode:the-before-html-insertion-mode>before 2125 html</a>", "<a href=#the-before-head-insertion-mode id=the-insertion-mode:the-before-head-insertion-mode>before head</a>", "<a href=#parsing-main-inhead id=the-insertion-mode:parsing-main-inhead>in head</a>", "<a href=#parsing-main-inheadnoscript id=the-insertion-mode:parsing-main-inheadnoscript>in head noscript</a>", "<a href=#the-after-head-insertion-mode id=the-insertion-mode:the-after-head-insertion-mode>after head</a>", 2126 "<a href=#parsing-main-inbody id=the-insertion-mode:parsing-main-inbody>in body</a>", "<a href=#parsing-main-incdata id=the-insertion-mode:parsing-main-incdata>text</a>", "<a href=#parsing-main-intable id=the-insertion-mode:parsing-main-intable>in table</a>", "<a href=#parsing-main-intabletext id=the-insertion-mode:parsing-main-intabletext>in table text</a>", "<a href=#parsing-main-incaption id=the-insertion-mode:parsing-main-incaption>in caption</a>", "<a href=#parsing-main-incolgroup id=the-insertion-mode:parsing-main-incolgroup>in column 2127 group</a>", "<a href=#parsing-main-intbody id=the-insertion-mode:parsing-main-intbody>in table body</a>", "<a href=#parsing-main-intr id=the-insertion-mode:parsing-main-intr>in row</a>", "<a href=#parsing-main-intd id=the-insertion-mode:parsing-main-intd>in 2128 cell</a>", "<a href=#parsing-main-inselect id=the-insertion-mode:parsing-main-inselect>in select</a>", "<a href=#parsing-main-inselectintable id=the-insertion-mode:parsing-main-inselectintable>in select in table</a>", "<a href=#parsing-main-intemplate id=the-insertion-mode:parsing-main-intemplate>in template</a>", "<a href=#parsing-main-afterbody id=the-insertion-mode:parsing-main-afterbody>after body</a>", 2129 "<a href=#parsing-main-inframeset id=the-insertion-mode:parsing-main-inframeset>in frameset</a>", "<a href=#parsing-main-afterframeset id=the-insertion-mode:parsing-main-afterframeset>after frameset</a>", "<a href=#the-after-after-body-insertion-mode id=the-insertion-mode:the-after-after-body-insertion-mode>after 2130 after body</a>", and "<a href=#the-after-after-frameset-insertion-mode id=the-insertion-mode:the-after-after-frameset-insertion-mode>after after 2131 frameset</a>" during the course of the parsing, as described in the <a href=#tree-construction id=the-insertion-mode:tree-construction>tree 2132 construction</a> stage. The insertion mode affects how tokens are processed and whether CDATA 2133 sections are supported.</p> 2134 2135 <p>Several of these modes, namely "<a href=#parsing-main-inhead id=the-insertion-mode:parsing-main-inhead-2>in head</a>", "<a href=#parsing-main-inbody id=the-insertion-mode:parsing-main-inbody-2>in body</a>", "<a href=#parsing-main-intable id=the-insertion-mode:parsing-main-intable-2>in 2136 table</a>", and "<a href=#parsing-main-inselect id=the-insertion-mode:parsing-main-inselect-2>in select</a>", are special, in 2137 that the other modes defer to them at various times. When the algorithm below says that the user 2138 agent is to do something "<dfn id=using-the-rules-for>using the rules for</dfn> the <var>m</var> insertion 2139 mode", where <var>m</var> is one of these modes, the user agent must use the rules 2140 described under the <var>m</var> <a href=#insertion-mode id=the-insertion-mode:insertion-mode-2>insertion mode</a>'s section, but must leave 2141 the <a href=#insertion-mode id=the-insertion-mode:insertion-mode-3>insertion mode</a> unchanged unless the rules in <var>m</var> themselves 2142 switch the <a href=#insertion-mode id=the-insertion-mode:insertion-mode-4>insertion mode</a> to a new value.</p> 2143 2144 <p>When the insertion mode is switched to "<a href=#parsing-main-incdata id=the-insertion-mode:parsing-main-incdata-2>text</a>" or 2145 "<a href=#parsing-main-intabletext id=the-insertion-mode:parsing-main-intabletext-2>in table text</a>", the <dfn id=original-insertion-mode>original insertion 2146 mode</dfn> is also set. This is the insertion mode to which the tree construction stage will 2147 return.</p> 2148 2149 <p>Similarly, to parse nested <code id=the-insertion-mode:the-template-element><a href=scripting.html#the-template-element>template</a></code> elements, a <dfn id=stack-of-template-insertion-modes>stack of template insertion 2150 modes</dfn> is used. It is initially empty. The <dfn id=current-template-insertion-mode>current template insertion mode</dfn> is the 2151 insertion mode that was most recently added to the <a href=#stack-of-template-insertion-modes id=the-insertion-mode:stack-of-template-insertion-modes>stack of template insertion modes</a>. 2152 The algorithms in the sections below will <i>push</i> insertion modes onto this stack, meaning 2153 that the specified insertion mode is to be added to the stack, and <i>pop</i> insertion modes from 2154 the stack, which means that the most recently added insertion mode must be removed from the 2155 stack.</p> 2156 2157 <hr> 2158 2159 <p>When the steps below require the UA to <dfn id=reset-the-insertion-mode-appropriately>reset the insertion mode appropriately</dfn>, it 2160 means the UA must follow these steps:</p> 2161 2162 <ol><li><p>Let <var>last</var> be false.<li><p>Let <var>node</var> be the last node in the <a href=#stack-of-open-elements id=the-insertion-mode:stack-of-open-elements>stack of open 2163 elements</a>.<li><p><i>Loop</i>: If <var>node</var> is the first node in the stack of open elements, 2164 then set <var>last</var> to true, and, if the parser was originally created as part of 2165 the <a href=#html-fragment-parsing-algorithm id=the-insertion-mode:html-fragment-parsing-algorithm>HTML fragment parsing algorithm</a> (<a href=#fragment-case id=the-insertion-mode:fragment-case>fragment case</a>), set <var>node</var> to the <var id=the-insertion-mode:concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></var> 2166 element.<li> 2167 2168 <p>If <var>node</var> is a <code id=the-insertion-mode:the-select-element><a href=forms.html#the-select-element>select</a></code> element, run these substeps:</p> 2169 2170 <ol><li><p>If <var>last</var> is true, jump to the step below labeled 2171 <i>done</i>.<li><p>Let <var>ancestor</var> be <var>node</var>.<li><p><i>Loop</i>: If <var>ancestor</var> is the first node in the <a href=#stack-of-open-elements id=the-insertion-mode:stack-of-open-elements-2>stack of 2172 open elements</a>, jump to the step below labeled <i>done</i>.<li><p>Let <var>ancestor</var> be the node before <var>ancestor</var> in the 2173 <a href=#stack-of-open-elements id=the-insertion-mode:stack-of-open-elements-3>stack of open elements</a>.<li><p>If <var>ancestor</var> is a <code id=the-insertion-mode:the-template-element-2><a href=scripting.html#the-template-element>template</a></code> node, jump to the step below 2174 labeled <i>done</i>.<li><p>If <var>ancestor</var> is a <code id=the-insertion-mode:the-table-element><a href=tables.html#the-table-element>table</a></code> node, switch the <a href=#insertion-mode id=the-insertion-mode:insertion-mode-5>insertion 2175 mode</a> to "<a href=#parsing-main-inselectintable id=the-insertion-mode:parsing-main-inselectintable-2>in select in table</a>" and 2176 abort these steps.<li><p>Jump back to the step labeled <i>loop</i>.<li><p><i>Done</i>: Switch the <a href=#insertion-mode id=the-insertion-mode:insertion-mode-6>insertion mode</a> to "<a href=#parsing-main-inselect id=the-insertion-mode:parsing-main-inselect-3>in select</a>" and abort these steps.</ol> 2177 2178 <li><p>If <var>node</var> is a <code id=the-insertion-mode:the-td-element><a href=tables.html#the-td-element>td</a></code> or <code id=the-insertion-mode:the-th-element><a href=tables.html#the-th-element>th</a></code> element and <var>last</var> is false, then switch the <a href=#insertion-mode id=the-insertion-mode:insertion-mode-7>insertion mode</a> to "<a href=#parsing-main-intd id=the-insertion-mode:parsing-main-intd-2>in cell</a>" and abort these steps.<li><p>If <var>node</var> is a <code id=the-insertion-mode:the-tr-element><a href=tables.html#the-tr-element>tr</a></code> element, then switch the <a href=#insertion-mode id=the-insertion-mode:insertion-mode-8>insertion 2179 mode</a> to "<a href=#parsing-main-intr id=the-insertion-mode:parsing-main-intr-2>in row</a>" and abort these 2180 steps.<li><p>If <var>node</var> is a <code id=the-insertion-mode:the-tbody-element><a href=tables.html#the-tbody-element>tbody</a></code>, <code id=the-insertion-mode:the-thead-element><a href=tables.html#the-thead-element>thead</a></code>, or 2181 <code id=the-insertion-mode:the-tfoot-element><a href=tables.html#the-tfoot-element>tfoot</a></code> element, then switch the <a href=#insertion-mode id=the-insertion-mode:insertion-mode-9>insertion mode</a> to "<a href=#parsing-main-intbody id=the-insertion-mode:parsing-main-intbody-2>in table body</a>" and abort these steps.<li><p>If <var>node</var> is a <code id=the-insertion-mode:the-caption-element><a href=tables.html#the-caption-element>caption</a></code> element, then switch the 2182 <a href=#insertion-mode id=the-insertion-mode:insertion-mode-10>insertion mode</a> to "<a href=#parsing-main-incaption id=the-insertion-mode:parsing-main-incaption-2>in caption</a>" and 2183 abort these steps.<li><p>If <var>node</var> is a <code id=the-insertion-mode:the-colgroup-element><a href=tables.html#the-colgroup-element>colgroup</a></code> element, then switch the 2184 <a href=#insertion-mode id=the-insertion-mode:insertion-mode-11>insertion mode</a> to "<a href=#parsing-main-incolgroup id=the-insertion-mode:parsing-main-incolgroup-2>in column 2185 group</a>" and abort these steps.<li><p>If <var>node</var> is a <code id=the-insertion-mode:the-table-element-2><a href=tables.html#the-table-element>table</a></code> element, then switch the 2186 <a href=#insertion-mode id=the-insertion-mode:insertion-mode-12>insertion mode</a> to "<a href=#parsing-main-intable id=the-insertion-mode:parsing-main-intable-3>in table</a>" and abort 2187 these steps.<li><p>If <var>node</var> is a <code id=the-insertion-mode:the-template-element-3><a href=scripting.html#the-template-element>template</a></code> element, then switch the 2188 <a href=#insertion-mode id=the-insertion-mode:insertion-mode-13>insertion mode</a> to the <a href=#current-template-insertion-mode id=the-insertion-mode:current-template-insertion-mode>current template insertion mode</a> and abort these 2189 steps.<li><p>If <var>node</var> is a <code id=the-insertion-mode:the-head-element><a href=semantics.html#the-head-element>head</a></code> element and <var>last</var> is 2190 false, then switch the <a href=#insertion-mode id=the-insertion-mode:insertion-mode-14>insertion mode</a> to "<a href=#parsing-main-inhead id=the-insertion-mode:parsing-main-inhead-3>in 2191 head</a>" and abort these steps.<li><p>If <var>node</var> is a <code id=the-insertion-mode:the-body-element><a href=semantics.html#the-body-element>body</a></code> element, then switch the 2192 <a href=#insertion-mode id=the-insertion-mode:insertion-mode-15>insertion mode</a> to "<a href=#parsing-main-inbody id=the-insertion-mode:parsing-main-inbody-3>in body</a>" and abort 2193 these steps.<li><p>If <var>node</var> is a <code id=the-insertion-mode:frameset><a href=obsolete.html#frameset>frameset</a></code> element, then switch the 2194 <a href=#insertion-mode id=the-insertion-mode:insertion-mode-16>insertion mode</a> to "<a href=#parsing-main-inframeset id=the-insertion-mode:parsing-main-inframeset-2>in frameset</a>" and 2195 abort these steps. (<a href=#fragment-case id=the-insertion-mode:fragment-case-2>fragment case</a>)<li> 2196 2197 <p>If <var>node</var> is an <code id=the-insertion-mode:the-html-element><a href=semantics.html#the-html-element>html</a></code> element, run these substeps:</p> 2198 2199 <ol><li><p>If the <a href=#head-element-pointer id=the-insertion-mode:head-element-pointer><code>head</code> element pointer</a> is null, switch the 2200 <a href=#insertion-mode id=the-insertion-mode:insertion-mode-17>insertion mode</a> to "<a href=#the-before-head-insertion-mode id=the-insertion-mode:the-before-head-insertion-mode-2>before head</a>" 2201 and abort these steps. (<a href=#fragment-case id=the-insertion-mode:fragment-case-3>fragment case</a>)<li><p>Otherwise, the <a href=#head-element-pointer id=the-insertion-mode:head-element-pointer-2><code>head</code> element pointer</a> is not null, switch the 2202 <a href=#insertion-mode id=the-insertion-mode:insertion-mode-18>insertion mode</a> to "<a href=#the-after-head-insertion-mode id=the-insertion-mode:the-after-head-insertion-mode-2>after head</a>" and 2203 abort these steps.</ol> 2204 2205 <li><p>If <var>last</var> is true, then switch the <a href=#insertion-mode id=the-insertion-mode:insertion-mode-19>insertion mode</a> to "<a href=#parsing-main-inbody id=the-insertion-mode:parsing-main-inbody-4>in body</a>" and abort these steps. (<a href=#fragment-case id=the-insertion-mode:fragment-case-4>fragment 2206 case</a>)<li><p>Let <var>node</var> now be the node before <var>node</var> in the 2207 <a href=#stack-of-open-elements id=the-insertion-mode:stack-of-open-elements-4>stack of open elements</a>.<li><p>Return to the step labeled <i>loop</i>.</ol> 2208 2209 2210 <h5 id=the-stack-of-open-elements>12.2.3.2 The stack of open elements</h5> 2211 2212 <p>Initially, the <dfn id=stack-of-open-elements>stack of open elements</dfn> is empty. The stack grows downwards; the 2213 topmost node on the stack is the first one added to the stack, and the bottommost node of the 2214 stack is the most recently added node in the stack (notwithstanding when the stack is manipulated 2215 in a random access fashion as part of <a href=#adoptionAgency>the handling for misnested 2216 tags</a>).</p> 2217 2218 <p class=note>The "<a href=#the-before-html-insertion-mode id=the-stack-of-open-elements:the-before-html-insertion-mode>before html</a>" <a href=#insertion-mode id=the-stack-of-open-elements:insertion-mode>insertion 2219 mode</a> creates the <code id=the-stack-of-open-elements:the-html-element><a href=semantics.html#the-html-element>html</a></code> root element node, which is then added to the stack.</p> 2220 2221 <p class=note>In the <a href=#fragment-case id=the-stack-of-open-elements:fragment-case>fragment case</a>, the <a href=#stack-of-open-elements id=the-stack-of-open-elements:stack-of-open-elements>stack of open elements</a> is 2222 initialised to contain an <code id=the-stack-of-open-elements:the-html-element-2><a href=semantics.html#the-html-element>html</a></code> element that is created as part of <a href=#html-fragment-parsing-algorithm id=the-stack-of-open-elements:html-fragment-parsing-algorithm>that algorithm</a>. (The <a href=#fragment-case id=the-stack-of-open-elements:fragment-case-2>fragment case</a> skips the 2223 "<a href=#the-before-html-insertion-mode id=the-stack-of-open-elements:the-before-html-insertion-mode-2>before html</a>" <a href=#insertion-mode id=the-stack-of-open-elements:insertion-mode-2>insertion mode</a>.)</p> 2224 2225 <p>The <code id=the-stack-of-open-elements:the-html-element-3><a href=semantics.html#the-html-element>html</a></code> node, however it is created, is the topmost node of the stack. It only 2226 gets popped off the stack when the parser <a href=#stop-parsing id=the-stack-of-open-elements:stop-parsing>finishes</a>.</p> 2227 2228 <p>The <dfn id=current-node>current node</dfn> is the bottommost node in this <a href=#stack-of-open-elements id=the-stack-of-open-elements:stack-of-open-elements-2>stack of open 2229 elements</a>.</p> 2230 2231 <p>The <dfn id=adjusted-current-node>adjusted current node</dfn> is the <i id=the-stack-of-open-elements:concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></i> 2232 element if the <a href=#stack-of-open-elements id=the-stack-of-open-elements:stack-of-open-elements-3>stack of open elements</a> has only one element in it and the parser was 2233 created by the <a href=#html-fragment-parsing-algorithm id=the-stack-of-open-elements:html-fragment-parsing-algorithm-2>HTML fragment parsing algorithm</a>; otherwise, the <a href=#adjusted-current-node id=the-stack-of-open-elements:adjusted-current-node>adjusted current 2234 node</a> is the <a href=#current-node id=the-stack-of-open-elements:current-node>current node</a>.</p> 2235 2236 <p>Elements in the <a href=#stack-of-open-elements id=the-stack-of-open-elements:stack-of-open-elements-4>stack of open elements</a> fall into the following categories:</p> 2237 2238 <dl><dt><dfn id=special>Special</dfn><dd><p>The following elements have varying levels of special parsing rules: HTML's 2239 <code id=the-stack-of-open-elements:the-address-element><a href=semantics.html#the-address-element>address</a></code>, <code id=the-stack-of-open-elements:the-applet-element><a href=obsolete.html#the-applet-element>applet</a></code>, <code id=the-stack-of-open-elements:the-area-element><a href=embedded-content.html#the-area-element>area</a></code>, <code id=the-stack-of-open-elements:the-article-element><a href=semantics.html#the-article-element>article</a></code>, 2240 <code id=the-stack-of-open-elements:the-aside-element><a href=semantics.html#the-aside-element>aside</a></code>, <code id=the-stack-of-open-elements:the-base-element><a href=semantics.html#the-base-element>base</a></code>, <code id=the-stack-of-open-elements:basefont><a href=obsolete.html#basefont>basefont</a></code>, <code id=the-stack-of-open-elements:bgsound><a href=obsolete.html#bgsound>bgsound</a></code>, 2241 <code id=the-stack-of-open-elements:the-blockquote-element><a href=semantics.html#the-blockquote-element>blockquote</a></code>, <code id=the-stack-of-open-elements:the-body-element><a href=semantics.html#the-body-element>body</a></code>, <code id=the-stack-of-open-elements:the-br-element><a href=semantics.html#the-br-element>br</a></code>, <code id=the-stack-of-open-elements:the-button-element><a href=forms.html#the-button-element>button</a></code>, 2242 <code id=the-stack-of-open-elements:the-caption-element><a href=tables.html#the-caption-element>caption</a></code>, <code id=the-stack-of-open-elements:center><a href=obsolete.html#center>center</a></code>, <code id=the-stack-of-open-elements:the-col-element><a href=tables.html#the-col-element>col</a></code>, <code id=the-stack-of-open-elements:the-colgroup-element><a href=tables.html#the-colgroup-element>colgroup</a></code>, 2243 <code id=the-stack-of-open-elements:the-dd-element><a href=semantics.html#the-dd-element>dd</a></code>, <code id=the-stack-of-open-elements:the-details-element><a href=forms.html#the-details-element>details</a></code>, <code id=the-stack-of-open-elements:dir><a href=obsolete.html#dir>dir</a></code>, <code id=the-stack-of-open-elements:the-div-element><a href=semantics.html#the-div-element>div</a></code>, <code id=the-stack-of-open-elements:the-dl-element><a href=semantics.html#the-dl-element>dl</a></code>, 2244 <code id=the-stack-of-open-elements:the-dt-element><a href=semantics.html#the-dt-element>dt</a></code>, <code id=the-stack-of-open-elements:the-embed-element><a href=embedded-content.html#the-embed-element>embed</a></code>, <code id=the-stack-of-open-elements:the-fieldset-element><a href=forms.html#the-fieldset-element>fieldset</a></code>, <code id=the-stack-of-open-elements:the-figcaption-element><a href=semantics.html#the-figcaption-element>figcaption</a></code>, 2245 <code id=the-stack-of-open-elements:the-figure-element><a href=semantics.html#the-figure-element>figure</a></code>, <code id=the-stack-of-open-elements:the-footer-element><a href=semantics.html#the-footer-element>footer</a></code>, <code id=the-stack-of-open-elements:the-form-element><a href=forms.html#the-form-element>form</a></code>, <code id=the-stack-of-open-elements:frame><a href=obsolete.html#frame>frame</a></code>, 2246 <code id=the-stack-of-open-elements:frameset><a href=obsolete.html#frameset>frameset</a></code>, <code id=the-stack-of-open-elements:the-h1,-h2,-h3,-h4,-h5,-and-h6-elements><a href=semantics.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code>, <code id=the-stack-of-open-elements:the-h1,-h2,-h3,-h4,-h5,-and-h6-elements-2><a href=semantics.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h2</a></code>, <code id=the-stack-of-open-elements:the-h1,-h2,-h3,-h4,-h5,-and-h6-elements-3><a href=semantics.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h3</a></code>, <code id=the-stack-of-open-elements:the-h1,-h2,-h3,-h4,-h5,-and-h6-elements-4><a href=semantics.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h4</a></code>, 2247 <code id=the-stack-of-open-elements:the-h1,-h2,-h3,-h4,-h5,-and-h6-elements-5><a href=semantics.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h5</a></code>, <code id=the-stack-of-open-elements:the-h1,-h2,-h3,-h4,-h5,-and-h6-elements-6><a href=semantics.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h6</a></code>, <code id=the-stack-of-open-elements:the-head-element><a href=semantics.html#the-head-element>head</a></code>, <code id=the-stack-of-open-elements:the-header-element><a href=semantics.html#the-header-element>header</a></code>, <code id=the-stack-of-open-elements:the-hgroup-element><a href=semantics.html#the-hgroup-element>hgroup</a></code>, 2248 <code id=the-stack-of-open-elements:the-hr-element><a href=semantics.html#the-hr-element>hr</a></code>, <code id=the-stack-of-open-elements:the-html-element-4><a href=semantics.html#the-html-element>html</a></code>, <code id=the-stack-of-open-elements:the-iframe-element><a href=embedded-content.html#the-iframe-element>iframe</a></code>, 2249 <code id=the-stack-of-open-elements:the-img-element><a href=embedded-content.html#the-img-element>img</a></code>, <code id=the-stack-of-open-elements:the-input-element><a href=forms.html#the-input-element>input</a></code>, <code id=the-stack-of-open-elements:isindex-2><a href=obsolete.html#isindex-2>isindex</a></code>, <code id=the-stack-of-open-elements:the-li-element><a href=semantics.html#the-li-element>li</a></code>, <code id=the-stack-of-open-elements:the-link-element><a href=semantics.html#the-link-element>link</a></code>, 2250 <code id=the-stack-of-open-elements:listing><a href=obsolete.html#listing>listing</a></code>, <code id=the-stack-of-open-elements:the-main-element><a href=semantics.html#the-main-element>main</a></code>, <code id=the-stack-of-open-elements:the-marquee-element-2><a href=obsolete.html#the-marquee-element-2>marquee</a></code>, <code id=the-stack-of-open-elements:the-menu-element><a href=forms.html#the-menu-element>menu</a></code>, 2251 <code id=the-stack-of-open-elements:the-menuitem-element><a href=forms.html#the-menuitem-element>menuitem</a></code>, <code id=the-stack-of-open-elements:the-meta-element><a href=semantics.html#the-meta-element>meta</a></code>, <code id=the-stack-of-open-elements:the-nav-element><a href=semantics.html#the-nav-element>nav</a></code>, <code id=the-stack-of-open-elements:noembed><a href=obsolete.html#noembed>noembed</a></code>, 2252 <code id=the-stack-of-open-elements:noframes><a href=obsolete.html#noframes>noframes</a></code>, <code id=the-stack-of-open-elements:the-noscript-element><a href=scripting.html#the-noscript-element>noscript</a></code>, <code id=the-stack-of-open-elements:the-object-element><a href=embedded-content.html#the-object-element>object</a></code>, <code id=the-stack-of-open-elements:the-ol-element><a href=semantics.html#the-ol-element>ol</a></code>, 2253 <code id=the-stack-of-open-elements:the-p-element><a href=semantics.html#the-p-element>p</a></code>, <code id=the-stack-of-open-elements:the-param-element><a href=embedded-content.html#the-param-element>param</a></code>, <code id=the-stack-of-open-elements:plaintext><a href=obsolete.html#plaintext>plaintext</a></code>, <code id=the-stack-of-open-elements:the-pre-element><a href=semantics.html#the-pre-element>pre</a></code>, 2254 <code id=the-stack-of-open-elements:the-script-element><a href=scripting.html#the-script-element>script</a></code>, <code id=the-stack-of-open-elements:the-section-element><a href=semantics.html#the-section-element>section</a></code>, <code id=the-stack-of-open-elements:the-select-element><a href=forms.html#the-select-element>select</a></code>, <code id=the-stack-of-open-elements:the-source-element><a href=embedded-content.html#the-source-element>source</a></code>, 2255 <code id=the-stack-of-open-elements:the-style-element><a href=semantics.html#the-style-element>style</a></code>, <code id=the-stack-of-open-elements:the-summary-element><a href=forms.html#the-summary-element>summary</a></code>, <code id=the-stack-of-open-elements:the-table-element><a href=tables.html#the-table-element>table</a></code>, <code id=the-stack-of-open-elements:the-tbody-element><a href=tables.html#the-tbody-element>tbody</a></code>, 2256 <code id=the-stack-of-open-elements:the-td-element><a href=tables.html#the-td-element>td</a></code>, <code id=the-stack-of-open-elements:the-template-element><a href=scripting.html#the-template-element>template</a></code>, <code id=the-stack-of-open-elements:the-textarea-element><a href=forms.html#the-textarea-element>textarea</a></code>, <code id=the-stack-of-open-elements:the-tfoot-element><a href=tables.html#the-tfoot-element>tfoot</a></code>, 2257 <code id=the-stack-of-open-elements:the-th-element><a href=tables.html#the-th-element>th</a></code>, <code id=the-stack-of-open-elements:the-thead-element><a href=tables.html#the-thead-element>thead</a></code>, <code id=the-stack-of-open-elements:the-title-element><a href=semantics.html#the-title-element>title</a></code>, <code id=the-stack-of-open-elements:the-tr-element><a href=tables.html#the-tr-element>tr</a></code>, <code id=the-stack-of-open-elements:the-track-element><a href=embedded-content.html#the-track-element>track</a></code>, 2258 <code id=the-stack-of-open-elements:the-ul-element><a href=semantics.html#the-ul-element>ul</a></code>, <code id=the-stack-of-open-elements:the-wbr-element><a href=semantics.html#the-wbr-element>wbr</a></code>, and <code id=the-stack-of-open-elements:xmp><a href=obsolete.html#xmp>xmp</a></code>; MathML's <code id=the-stack-of-open-elements:math:mi><a href=embedded-content.html#math:mi>mi</a></code>, <code id=the-stack-of-open-elements:math:mo><a href=embedded-content.html#math:mo>mo</a></code>, <code id=the-stack-of-open-elements:math:mn><a href=embedded-content.html#math:mn>mn</a></code>, 2259 <code id=the-stack-of-open-elements:math:ms><a href=embedded-content.html#math:ms>ms</a></code>, <code id=the-stack-of-open-elements:math:mtext><a href=embedded-content.html#math:mtext>mtext</a></code>, and <code id=the-stack-of-open-elements:math:annotation-xml><a href=embedded-content.html#math:annotation-xml>annotation-xml</a></code>; and SVG's <code>foreignObject</code>, <code>desc</code>, and <code>title</code>.<dt><dfn id=formatting>Formatting</dfn><dd><p>The following HTML elements are those that end up in the <a href=#list-of-active-formatting-elements id=the-stack-of-open-elements:list-of-active-formatting-elements>list of active formatting 2260 elements</a>: <code id=the-stack-of-open-elements:the-a-element><a href=semantics.html#the-a-element>a</a></code>, <code id=the-stack-of-open-elements:the-b-element><a href=semantics.html#the-b-element>b</a></code>, <code id=the-stack-of-open-elements:big><a href=obsolete.html#big>big</a></code>, <code id=the-stack-of-open-elements:the-code-element><a href=semantics.html#the-code-element>code</a></code>, 2261 <code id=the-stack-of-open-elements:the-em-element><a href=semantics.html#the-em-element>em</a></code>, <code id=the-stack-of-open-elements:font><a href=obsolete.html#font>font</a></code>, <code id=the-stack-of-open-elements:the-i-element><a href=semantics.html#the-i-element>i</a></code>, <code id=the-stack-of-open-elements:nobr><a href=obsolete.html#nobr>nobr</a></code>, <code id=the-stack-of-open-elements:the-s-element><a href=semantics.html#the-s-element>s</a></code>, 2262 <code id=the-stack-of-open-elements:the-small-element><a href=semantics.html#the-small-element>small</a></code>, <code id=the-stack-of-open-elements:strike><a href=obsolete.html#strike>strike</a></code>, <code id=the-stack-of-open-elements:the-strong-element><a href=semantics.html#the-strong-element>strong</a></code>, <code id=the-stack-of-open-elements:tt><a href=obsolete.html#tt>tt</a></code>, and 2263 <code id=the-stack-of-open-elements:the-u-element><a href=semantics.html#the-u-element>u</a></code>.<dt><dfn id=ordinary>Ordinary</dfn><dd><p>All other elements found while parsing an HTML document.</dl> 2264 2265 <p>The <a href=#stack-of-open-elements id=the-stack-of-open-elements:stack-of-open-elements-5>stack of open elements</a> is said to <dfn id=has-an-element-in-the-specific-scope>have an element <var>target node</var> in a specific scope</dfn> consisting of a 2266 list of element types <var>list</var> when the following algorithm terminates in a match 2267 state:</p> 2268 2269 <ol><li><p>Initialise <var>node</var> to be the <a href=#current-node id=the-stack-of-open-elements:current-node-2>current node</a> (the bottommost 2270 node of the stack).<li><p>If <var>node</var> is the target node, terminate in a match state.<li><p>Otherwise, if <var>node</var> is one of the element types in <var>list</var>, terminate in a failure state.<li><p>Otherwise, set <var>node</var> to the previous entry in the <a href=#stack-of-open-elements id=the-stack-of-open-elements:stack-of-open-elements-6>stack of open 2271 elements</a> and return to step 2. (This will never fail, since the loop will always terminate 2272 in the previous step if the top of the stack an <code id=the-stack-of-open-elements:the-html-element-5><a href=semantics.html#the-html-element>html</a></code> element is 2273 reached.)</ol> 2274 2275 <p>The <a href=#stack-of-open-elements id=the-stack-of-open-elements:stack-of-open-elements-7>stack of open elements</a> is said to <dfn id=has-an-element-in-scope>have a 2276 particular element in scope</dfn> when it <a href=#has-an-element-in-the-specific-scope id=the-stack-of-open-elements:has-an-element-in-the-specific-scope>has 2277 that element in the specific scope</a> consisting of the following element types:</p> 2278 2279 <ul class=brief><li><code id=the-stack-of-open-elements:the-applet-element-2><a href=obsolete.html#the-applet-element>applet</a></code> in the <a id=the-stack-of-open-elements:html-namespace-2 href=infrastructure.html#html-namespace-2>HTML namespace</a><li><code id=the-stack-of-open-elements:the-caption-element-2><a href=tables.html#the-caption-element>caption</a></code> in the <a id=the-stack-of-open-elements:html-namespace-2-2 href=infrastructure.html#html-namespace-2>HTML namespace</a><li><code id=the-stack-of-open-elements:the-html-element-6><a href=semantics.html#the-html-element>html</a></code> in the <a id=the-stack-of-open-elements:html-namespace-2-3 href=infrastructure.html#html-namespace-2>HTML namespace</a><li><code id=the-stack-of-open-elements:the-table-element-2><a href=tables.html#the-table-element>table</a></code> in the <a id=the-stack-of-open-elements:html-namespace-2-4 href=infrastructure.html#html-namespace-2>HTML namespace</a><li><code id=the-stack-of-open-elements:the-td-element-2><a href=tables.html#the-td-element>td</a></code> in the <a id=the-stack-of-open-elements:html-namespace-2-5 href=infrastructure.html#html-namespace-2>HTML namespace</a><li><code id=the-stack-of-open-elements:the-th-element-2><a href=tables.html#the-th-element>th</a></code> in the <a id=the-stack-of-open-elements:html-namespace-2-6 href=infrastructure.html#html-namespace-2>HTML namespace</a><li><code id=the-stack-of-open-elements:the-marquee-element-2-2><a href=obsolete.html#the-marquee-element-2>marquee</a></code> in the <a id=the-stack-of-open-elements:html-namespace-2-7 href=infrastructure.html#html-namespace-2>HTML namespace</a><li><code id=the-stack-of-open-elements:the-object-element-2><a href=embedded-content.html#the-object-element>object</a></code> in the <a id=the-stack-of-open-elements:html-namespace-2-8 href=infrastructure.html#html-namespace-2>HTML namespace</a><li><code id=the-stack-of-open-elements:the-template-element-2><a href=scripting.html#the-template-element>template</a></code> in the <a id=the-stack-of-open-elements:html-namespace-2-9 href=infrastructure.html#html-namespace-2>HTML namespace</a><li><code id=the-stack-of-open-elements:math:mi-2><a href=embedded-content.html#math:mi>mi</a></code> in the <a id=the-stack-of-open-elements:mathml-namespace href=infrastructure.html#mathml-namespace>MathML namespace</a><li><code id=the-stack-of-open-elements:math:mo-2><a href=embedded-content.html#math:mo>mo</a></code> in the <a id=the-stack-of-open-elements:mathml-namespace-2 href=infrastructure.html#mathml-namespace>MathML namespace</a><li><code id=the-stack-of-open-elements:math:mn-2><a href=embedded-content.html#math:mn>mn</a></code> in the <a id=the-stack-of-open-elements:mathml-namespace-3 href=infrastructure.html#mathml-namespace>MathML namespace</a><li><code id=the-stack-of-open-elements:math:ms-2><a href=embedded-content.html#math:ms>ms</a></code> in the <a id=the-stack-of-open-elements:mathml-namespace-4 href=infrastructure.html#mathml-namespace>MathML namespace</a><li><code id=the-stack-of-open-elements:math:mtext-2><a href=embedded-content.html#math:mtext>mtext</a></code> in the <a id=the-stack-of-open-elements:mathml-namespace-5 href=infrastructure.html#mathml-namespace>MathML namespace</a><li><code id=the-stack-of-open-elements:math:annotation-xml-2><a href=embedded-content.html#math:annotation-xml>annotation-xml</a></code> in the <a id=the-stack-of-open-elements:mathml-namespace-6 href=infrastructure.html#mathml-namespace>MathML namespace</a><li><code>foreignObject</code> in the <a id=the-stack-of-open-elements:svg-namespace href=infrastructure.html#svg-namespace>SVG namespace</a><li><code>desc</code> in the <a id=the-stack-of-open-elements:svg-namespace-2 href=infrastructure.html#svg-namespace>SVG namespace</a><li><code>title</code> in the <a id=the-stack-of-open-elements:svg-namespace-3 href=infrastructure.html#svg-namespace>SVG namespace</a></ul> 2280 2281 <p>The <a href=#stack-of-open-elements id=the-stack-of-open-elements:stack-of-open-elements-8>stack of open elements</a> is said to <dfn id=has-an-element-in-list-item-scope>have a particular element in list item scope</dfn> when it <a href=#has-an-element-in-the-specific-scope id=the-stack-of-open-elements:has-an-element-in-the-specific-scope-2>has that element in the specific scope</a> consisting of the following 2282 element types:</p> 2283 2284 <ul class=brief><li>All the element types listed above for the <i id=the-stack-of-open-elements:has-an-element-in-scope><a href=#has-an-element-in-scope>has an element in scope</a></i> algorithm.<li><code id=the-stack-of-open-elements:the-ol-element-2><a href=semantics.html#the-ol-element>ol</a></code> in the <a id=the-stack-of-open-elements:html-namespace-2-10 href=infrastructure.html#html-namespace-2>HTML namespace</a><li><code id=the-stack-of-open-elements:the-ul-element-2><a href=semantics.html#the-ul-element>ul</a></code> in the <a id=the-stack-of-open-elements:html-namespace-2-11 href=infrastructure.html#html-namespace-2>HTML namespace</a></ul> 2285 2286 <p>The <a href=#stack-of-open-elements id=the-stack-of-open-elements:stack-of-open-elements-9>stack of open elements</a> is said to <dfn id=has-an-element-in-button-scope>have a particular element in button scope</dfn> when it <a href=#has-an-element-in-the-specific-scope id=the-stack-of-open-elements:has-an-element-in-the-specific-scope-3>has that element in the specific scope</a> consisting of the following element 2287 types:</p> 2288 2289 <ul class=brief><li>All the element types listed above for the <i id=the-stack-of-open-elements:has-an-element-in-scope-2><a href=#has-an-element-in-scope>has an element in scope</a></i> algorithm.<li><code id=the-stack-of-open-elements:the-button-element-2><a href=forms.html#the-button-element>button</a></code> in the <a id=the-stack-of-open-elements:html-namespace-2-12 href=infrastructure.html#html-namespace-2>HTML namespace</a></ul> 2290 2291 <p>The <a href=#stack-of-open-elements id=the-stack-of-open-elements:stack-of-open-elements-10>stack of open elements</a> is said to <dfn id=has-an-element-in-table-scope>have a particular element in table scope</dfn> when it <a href=#has-an-element-in-the-specific-scope id=the-stack-of-open-elements:has-an-element-in-the-specific-scope-4>has that element in the specific scope</a> consisting of the following element 2292 types:</p> 2293 2294 <ul class=brief><li><code id=the-stack-of-open-elements:the-html-element-7><a href=semantics.html#the-html-element>html</a></code> in the <a id=the-stack-of-open-elements:html-namespace-2-13 href=infrastructure.html#html-namespace-2>HTML namespace</a><li><code id=the-stack-of-open-elements:the-table-element-3><a href=tables.html#the-table-element>table</a></code> in the <a id=the-stack-of-open-elements:html-namespace-2-14 href=infrastructure.html#html-namespace-2>HTML namespace</a><li><code id=the-stack-of-open-elements:the-template-element-3><a href=scripting.html#the-template-element>template</a></code> in the <a id=the-stack-of-open-elements:html-namespace-2-15 href=infrastructure.html#html-namespace-2>HTML namespace</a></ul> 2295 2296 <p>The <a href=#stack-of-open-elements id=the-stack-of-open-elements:stack-of-open-elements-11>stack of open elements</a> is said to <dfn id=has-an-element-in-select-scope>have a particular element in select scope</dfn> when it <a href=#has-an-element-in-the-specific-scope id=the-stack-of-open-elements:has-an-element-in-the-specific-scope-5>has that element in the specific scope</a> consisting of all element types 2297 <em>except</em> the following:</p> 2298 2299 <ul class=brief><li><code id=the-stack-of-open-elements:the-optgroup-element><a href=forms.html#the-optgroup-element>optgroup</a></code> in the <a id=the-stack-of-open-elements:html-namespace-2-16 href=infrastructure.html#html-namespace-2>HTML namespace</a><li><code id=the-stack-of-open-elements:the-option-element><a href=forms.html#the-option-element>option</a></code> in the <a id=the-stack-of-open-elements:html-namespace-2-17 href=infrastructure.html#html-namespace-2>HTML namespace</a></ul> 2300 2301 <p>Nothing happens if at any time any of the elements in the <a href=#stack-of-open-elements id=the-stack-of-open-elements:stack-of-open-elements-12>stack of open elements</a> 2302 are moved to a new location in, or removed from, the <code id=the-stack-of-open-elements:document><a href=dom.html#document>Document</a></code> tree. In particular, 2303 the stack is not changed in this situation. This can cause, amongst other strange effects, content 2304 to be appended to nodes that are no longer in the DOM.</p> 2305 2306 <p class=note>In some cases (namely, when <a href=#adoptionAgency>closing misnested formatting 2307 elements</a>), the stack is manipulated in a random-access fashion.</p> 2308 2309 2310 <h5 id=the-list-of-active-formatting-elements>12.2.3.3 The list of active formatting elements</h5> 2311 2312 <p>Initially, the <dfn id=list-of-active-formatting-elements>list of active formatting elements</dfn> is empty. It is used to handle 2313 mis-nested <a href=#formatting id=the-list-of-active-formatting-elements:formatting>formatting element tags</a>.</p> 2314 2315 <p>The list contains elements in the <a href=#formatting id=the-list-of-active-formatting-elements:formatting-2>formatting</a> category, and <a href=#concept-parser-marker id=the-list-of-active-formatting-elements:concept-parser-marker>markers</a>. The <dfn id=concept-parser-marker>markers</dfn> are inserted when entering <code id=the-list-of-active-formatting-elements:the-applet-element><a href=obsolete.html#the-applet-element>applet</a></code> 2316 elements, buttons, <code id=the-list-of-active-formatting-elements:the-object-element><a href=embedded-content.html#the-object-element>object</a></code> elements, marquees, table cells, and table captions, and 2317 are used to prevent formatting from "leaking" <em>into</em> <code id=the-list-of-active-formatting-elements:the-applet-element-2><a href=obsolete.html#the-applet-element>applet</a></code> elements, buttons, 2318 <code id=the-list-of-active-formatting-elements:the-object-element-2><a href=embedded-content.html#the-object-element>object</a></code> elements, marquees, and tables.</p> 2319 2320 <p>In addition, each element in the <a href=#list-of-active-formatting-elements id=the-list-of-active-formatting-elements:list-of-active-formatting-elements>list of active formatting elements</a> is associated 2321 with the token for which it was created, so that further elements can be created for that token if 2322 necessary.</p> 2323 2324 <p>When the steps below require the UA to <dfn id=push-onto-the-list-of-active-formatting-elements>push onto the list of active formatting 2325 elements</dfn> an element <var>element</var>, the UA must perform the following 2326 steps:</p> 2327 2328 <ol id=noah><li><p>If there are already three elements in the <a href=#list-of-active-formatting-elements id=the-list-of-active-formatting-elements:list-of-active-formatting-elements-2>list of active formatting elements</a> 2329 after the last <a href=#concept-parser-marker id=the-list-of-active-formatting-elements:concept-parser-marker-2>marker</a>, if any, or anywhere in the 2330 list if there are no <a href=#concept-parser-marker id=the-list-of-active-formatting-elements:concept-parser-marker-3>markers</a>, that have the same tag 2331 name, namespace, and attributes as <var>element</var>, then remove the earliest such 2332 element from the <a href=#list-of-active-formatting-elements id=the-list-of-active-formatting-elements:list-of-active-formatting-elements-3>list of active formatting elements</a>. For these purposes, the 2333 attributes must be compared as they were when the elements were created by the parser; two 2334 elements have the same attributes if all their parsed attributes can be paired such that the two 2335 attributes in each pair have identical names, namespaces, and values (the order of the attributes 2336 does not matter).</p> 2337 2338 <p class=note>This is the Noah's Ark clause. But with three per family instead of two.<li><p>Add <var>element</var> to the <a href=#list-of-active-formatting-elements id=the-list-of-active-formatting-elements:list-of-active-formatting-elements-4>list of active formatting 2339 elements</a>.</ol> 2340 2341 <p>When the steps below require the UA to <dfn id=reconstruct-the-active-formatting-elements>reconstruct the active formatting elements</dfn>, 2342 the UA must perform the following steps:</p> 2343 2344 <ol><li><p>If there are no entries in the <a href=#list-of-active-formatting-elements id=the-list-of-active-formatting-elements:list-of-active-formatting-elements-5>list of active formatting elements</a>, then there 2345 is nothing to reconstruct; stop this algorithm.<li><p>If the last (most recently added) entry in the <a href=#list-of-active-formatting-elements id=the-list-of-active-formatting-elements:list-of-active-formatting-elements-6>list of active formatting 2346 elements</a> is a <a href=#concept-parser-marker id=the-list-of-active-formatting-elements:concept-parser-marker-4>marker</a>, or if it is an element 2347 that is in the <a href=#stack-of-open-elements id=the-list-of-active-formatting-elements:stack-of-open-elements>stack of open elements</a>, then there is nothing to reconstruct; stop 2348 this algorithm.<li><p>Let <var>entry</var> be the last (most recently added) element in the <a href=#list-of-active-formatting-elements id=the-list-of-active-formatting-elements:list-of-active-formatting-elements-7>list 2349 of active formatting elements</a>.<li><p><i>Rewind</i>: If there are no entries before <var>entry</var> in the <a href=#list-of-active-formatting-elements id=the-list-of-active-formatting-elements:list-of-active-formatting-elements-8>list 2350 of active formatting elements</a>, then jump to the step labeled <i>create</i>.<li><p>Let <var>entry</var> be the entry one earlier than <var>entry</var> in 2351 the <a href=#list-of-active-formatting-elements id=the-list-of-active-formatting-elements:list-of-active-formatting-elements-9>list of active formatting elements</a>.<li><p>If <var>entry</var> is neither a <a href=#concept-parser-marker id=the-list-of-active-formatting-elements:concept-parser-marker-5>marker</a> nor an element that is also in the <a href=#stack-of-open-elements id=the-list-of-active-formatting-elements:stack-of-open-elements-2>stack of 2352 open elements</a>, go to the step labeled <i>rewind</i>.<li><p><i>Advance</i>: Let <var>entry</var> be the element one later than <var>entry</var> in the <a href=#list-of-active-formatting-elements id=the-list-of-active-formatting-elements:list-of-active-formatting-elements-10>list of active formatting elements</a>.<li><p><i>Create</i>: <a href=#insert-an-html-element id=the-list-of-active-formatting-elements:insert-an-html-element>Insert an HTML element</a> for the token for which the element 2353 <var>entry</var> was created, to obtain <var>new element</var>.<li><p>Replace the entry for <var>entry</var> in the list with an entry for <var>new element</var>.<li><p>If the entry for <var>new element</var> in the <a href=#list-of-active-formatting-elements id=the-list-of-active-formatting-elements:list-of-active-formatting-elements-11>list of active formatting 2354 elements</a> is not the last entry in the list, return to the step labeled 2355 <i>advance</i>.</ol> 2356 2357 <p>This has the effect of reopening all the formatting elements that were opened in the current 2358 body, cell, or caption (whichever is youngest) that haven't been explicitly closed.</p> 2359 2360 <p class=note>The way this specification is written, the <a href=#list-of-active-formatting-elements id=the-list-of-active-formatting-elements:list-of-active-formatting-elements-12>list of active formatting 2361 elements</a> always consists of elements in chronological order with the least recently added 2362 element first and the most recently added element last (except for while steps 8 to 11 of the 2363 above algorithm are being executed, of course).</p> 2364 2365 <p>When the steps below require the UA to <dfn id=clear-the-list-of-active-formatting-elements-up-to-the-last-marker>clear the list of active formatting elements up to 2366 the last marker</dfn>, the UA must perform the following steps:</p> 2367 2368 <ol><li><p>Let <var>entry</var> be the last (most recently added) entry in the <a href=#list-of-active-formatting-elements id=the-list-of-active-formatting-elements:list-of-active-formatting-elements-13>list of 2369 active formatting elements</a>.<li><p>Remove <var>entry</var> from the <a href=#list-of-active-formatting-elements id=the-list-of-active-formatting-elements:list-of-active-formatting-elements-14>list of active formatting 2370 elements</a>.<li><p>If <var>entry</var> was a <a href=#concept-parser-marker id=the-list-of-active-formatting-elements:concept-parser-marker-6>marker</a>, 2371 then stop the algorithm at this point. The list has been cleared up to the last <a href=#concept-parser-marker id=the-list-of-active-formatting-elements:concept-parser-marker-7>marker</a>.<li><p>Go to step 1.</ol> 2372 2373 2374 <h5 id=the-element-pointers>12.2.3.4 The element pointers</h5> 2375 2376 <p>Initially, the <dfn id=head-element-pointer><code>head</code> element pointer</dfn> and the <dfn id=form-element-pointer><code>form</code> element pointer</dfn> are both null.</p> 2377 2378 <p>Once a <code id=the-element-pointers:the-head-element><a href=semantics.html#the-head-element>head</a></code> element has been parsed (whether implicitly or explicitly) the 2379 <a href=#head-element-pointer id=the-element-pointers:head-element-pointer><code>head</code> element pointer</a> gets set to point to this node.</p> 2380 2381 <p>The <a href=#form-element-pointer id=the-element-pointers:form-element-pointer><code>form</code> element pointer</a> points to the last 2382 <code id=the-element-pointers:the-form-element><a href=forms.html#the-form-element>form</a></code> element that was opened and whose end tag has not yet been seen. It is used to 2383 make form controls associate with forms in the face of dramatically bad markup, for historical 2384 reasons. It is ignored inside <code id=the-element-pointers:the-template-element><a href=scripting.html#the-template-element>template</a></code> elements.</p> 2385 2386 2387 <h5 id=other-parsing-state-flags>12.2.3.5 Other parsing state flags</h5> 2388 2389 <p>The <dfn id=scripting-flag>scripting flag</dfn> is set to "enabled" if <a href=webappapis.html#concept-n-script id=other-parsing-state-flags:concept-n-script>scripting 2390 was enabled</a> for the <code id=other-parsing-state-flags:document><a href=dom.html#document>Document</a></code> with which the parser is associated when the 2391 parser was created, and "disabled" otherwise.</p> 2392 2393 <p class=note>The <a href=#scripting-flag id=other-parsing-state-flags:scripting-flag>scripting flag</a> can be enabled even when the parser was originally 2394 created for the <a href=#html-fragment-parsing-algorithm id=other-parsing-state-flags:html-fragment-parsing-algorithm>HTML fragment parsing algorithm</a>, even though <code id=other-parsing-state-flags:the-script-element><a href=scripting.html#the-script-element>script</a></code> 2395 elements don't execute in that case.</p> 2396 2397 <p>The <dfn id=frameset-ok-flag>frameset-ok flag</dfn> is set to "ok" when the parser is created. It is set to "not 2398 ok" after certain tokens are seen.</p> 2399 2400 2401 2402 2403 2404 2405 <h4 id=tokenization>12.2.4 <dfn>Tokenization</dfn></h4> 2406 2407 <p>Implementations must act as if they used the following state machine to tokenise HTML. The 2408 state machine must start in the <a href=#data-state id=tokenization:data-state>data state</a>. Most states consume a single character, 2409 which may have various side-effects, and either switches the state machine to a new state to 2410 <i>reconsume</i> the same character, or switches it to a new state to consume the next character, 2411 or stays in the same state to consume the next character. Some states have more complicated 2412 behavior and can consume several characters before switching to another state. In some cases, the 2413 tokenizer state is also changed by the tree construction stage.</p> 2414 2415 <p>The exact behavior of certain states depends on the <a href=#insertion-mode id=tokenization:insertion-mode>insertion mode</a> and the 2416 <a href=#stack-of-open-elements id=tokenization:stack-of-open-elements>stack of open elements</a>. Certain states also use a <dfn id=temporary-buffer><var>temporary buffer</var></dfn> to track progress.</p> 2417 2418 <p>The output of the tokenization step is a series of zero or more of the following tokens: 2419 DOCTYPE, start tag, end tag, comment, character, end-of-file. DOCTYPE tokens have a name, a public 2420 identifier, a system identifier, and a <dfn id=force-quirks-flag><i>force-quirks flag</i></dfn>. When a DOCTYPE token 2421 is created, its name, public identifier, and system identifier must be marked as missing (which is 2422 a distinct state from the empty string), and the <i id=tokenization:force-quirks-flag><a href=#force-quirks-flag>force-quirks flag</a></i> must be set to 2423 <i>off</i> (its other state is <i>on</i>). Start and end tag tokens have a tag name, a <dfn id=self-closing-flag>self-closing flag</dfn>, and a list of attributes, each of which has a 2424 name and a value. When a start or end tag token is created, its <i id=tokenization:self-closing-flag><a href=#self-closing-flag>self-closing flag</a></i> must be unset (its other state is that it be set), and its attributes 2425 list must be empty. Comment and character tokens have data.</p> 2426 2427 <p>When a token is emitted, it must immediately be handled by the <a href=#tree-construction id=tokenization:tree-construction>tree construction</a> 2428 stage. The tree construction stage can affect the state of the tokenization stage, and can insert 2429 additional characters into the stream. (For example, the <code id=tokenization:the-script-element><a href=scripting.html#the-script-element>script</a></code> element can result in 2430 scripts executing and using the <a id=tokenization:dynamic-markup-insertion href=webappapis.html#dynamic-markup-insertion>dynamic markup insertion</a> APIs to insert characters 2431 into the stream being tokenized.)</p> 2432 2433 <p class=note>Creating a token and emitting it are distinct actions. It is possible for a token 2434 to be created but implicitly abandoned (never emitted), e.g. if the file ends unexpectedly while 2435 processing the characters that are being parsed into a start tag token.</p> 2436 2437 <p>When a start tag token is emitted with its <i id=tokenization:self-closing-flag-2><a href=#self-closing-flag>self-closing flag</a></i> set, if the flag is not 2438 <dfn id=acknowledge-self-closing-flag>acknowledged</dfn> when it is processed by the tree 2439 construction stage, that is a <a href=#parse-error id=tokenization:parse-error>parse error</a>.</p> 2440 2441 <p>When an end tag token is emitted with attributes, that is a <a href=#parse-error id=tokenization:parse-error-2>parse error</a>.</p> 2442 2443 <p>When an end tag token is emitted with its <i id=tokenization:self-closing-flag-3><a href=#self-closing-flag>self-closing flag</a></i> set, that is a <a href=#parse-error id=tokenization:parse-error-3>parse 2444 error</a>.</p> 2445 2446 <p>An <dfn id=appropriate-end-tag-token>appropriate end tag token</dfn> is an end tag token whose tag name matches the tag name 2447 of the last start tag to have been emitted from this tokenizer, if any. If no start tag has been 2448 emitted from this tokenizer, then no end tag token is appropriate.</p> 2449 2450 <p>Before each step of the tokenizer, the user agent must first check the <a href=#parser-pause-flag id=tokenization:parser-pause-flag>parser pause 2451 flag</a>. If it is true, then the tokenizer must abort the processing of any nested invocations 2452 of the tokenizer, yielding control back to the caller.</p> 2453 2454 <p>The tokenizer state machine consists of the states defined in the following subsections.</p> 2455 2456 2457 2458 2459 2460 <h5 id=data-state>12.2.4.1 <dfn>Data state</dfn></h5> 2461 2462 <p>Consume the <a href=#next-input-character id=data-state:next-input-character>next input character</a>:</p> 2463 2464 <dl class=switch><dt>U+0026 AMPERSAND (&)<dd>Switch to the <a href=#character-reference-in-data-state id=data-state:character-reference-in-data-state>character reference in data state</a>.<dt>U+003C LESS-THAN SIGN (<)<dd>Switch to the <a href=#tag-open-state id=data-state:tag-open-state>tag open state</a>.<dt>U+0000 NULL<dd><a href=#parse-error id=data-state:parse-error>Parse error</a>. Emit the <a href=#current-input-character id=data-state:current-input-character>current input character</a> as a character 2465 token.<dt>EOF<dd>Emit an end-of-file token.<dt>Anything else<dd>Emit the <a href=#current-input-character id=data-state:current-input-character-2>current input character</a> as a character token.</dl> 2466 2467 2468 <h5 id=character-reference-in-data-state>12.2.4.2 <dfn>Character reference in data state</dfn></h5> 2469 2470 <p>Switch to the <a href=#data-state id=character-reference-in-data-state:data-state>data state</a>.</p> 2471 2472 <p>Attempt to <a href=#consume-a-character-reference id=character-reference-in-data-state:consume-a-character-reference>consume a character reference</a>, with no <a href=#additional-allowed-character id=character-reference-in-data-state:additional-allowed-character>additional allowed 2473 character</a>.</p> 2474 2475 <p>If nothing is returned, emit a U+0026 AMPERSAND character (&) token.</p> 2476 2477 <p>Otherwise, emit the character tokens that were returned.</p> 2478 2479 2480 <h5 id=rcdata-state>12.2.4.3 <dfn>RCDATA state</dfn></h5> 2481 2482 <p>Consume the <a href=#next-input-character id=rcdata-state:next-input-character>next input character</a>:</p> 2483 2484 <dl class=switch><dt>U+0026 AMPERSAND (&)<dd>Switch to the <a href=#character-reference-in-rcdata-state id=rcdata-state:character-reference-in-rcdata-state>character reference in RCDATA state</a>.<dt>U+003C LESS-THAN SIGN (<)<dd>Switch to the <a href=#rcdata-less-than-sign-state id=rcdata-state:rcdata-less-than-sign-state>RCDATA less-than sign state</a>.<dt>U+0000 NULL<dd><a href=#parse-error id=rcdata-state:parse-error>Parse error</a>. Emit a U+FFFD REPLACEMENT CHARACTER character token.<dt>EOF<dd>Emit an end-of-file token.<dt>Anything else<dd>Emit the <a href=#current-input-character id=rcdata-state:current-input-character>current input character</a> as a character token.</dl> 2485 2486 2487 <h5 id=character-reference-in-rcdata-state>12.2.4.4 <dfn>Character reference in RCDATA state</dfn></h5> 2488 2489 <p>Switch to the <a href=#rcdata-state id=character-reference-in-rcdata-state:rcdata-state>RCDATA state</a>.</p> 2490 2491 <p>Attempt to <a href=#consume-a-character-reference id=character-reference-in-rcdata-state:consume-a-character-reference>consume a character reference</a>, with no <a href=#additional-allowed-character id=character-reference-in-rcdata-state:additional-allowed-character>additional allowed 2492 character</a>.</p> 2493 2494 <p>If nothing is returned, emit a U+0026 AMPERSAND character (&) token.</p> 2495 2496 <p>Otherwise, emit the character tokens that were returned.</p> 2497 2498 2499 <h5 id=rawtext-state>12.2.4.5 <dfn>RAWTEXT state</dfn></h5> 2500 2501 <p>Consume the <a href=#next-input-character id=rawtext-state:next-input-character>next input character</a>:</p> 2502 2503 <dl class=switch><dt>U+003C LESS-THAN SIGN (<)<dd>Switch to the <a href=#rawtext-less-than-sign-state id=rawtext-state:rawtext-less-than-sign-state>RAWTEXT less-than sign state</a>.<dt>U+0000 NULL<dd><a href=#parse-error id=rawtext-state:parse-error>Parse error</a>. Emit a U+FFFD REPLACEMENT CHARACTER character token.<dt>EOF<dd>Emit an end-of-file token.<dt>Anything else<dd>Emit the <a href=#current-input-character id=rawtext-state:current-input-character>current input character</a> as a character token.</dl> 2504 2505 2506 <h5 id=script-data-state>12.2.4.6 <dfn>Script data state</dfn></h5> 2507 2508 <p>Consume the <a href=#next-input-character id=script-data-state:next-input-character>next input character</a>:</p> 2509 2510 <dl class=switch><dt>U+003C LESS-THAN SIGN (<)<dd>Switch to the <a href=#script-data-less-than-sign-state id=script-data-state:script-data-less-than-sign-state>script data less-than sign state</a>.<dt>U+0000 NULL<dd><a href=#parse-error id=script-data-state:parse-error>Parse error</a>. Emit a U+FFFD REPLACEMENT CHARACTER character token.<dt>EOF<dd>Emit an end-of-file token.<dt>Anything else<dd>Emit the <a href=#current-input-character id=script-data-state:current-input-character>current input character</a> as a character token.</dl> 2511 2512 2513 <h5 id=plaintext-state>12.2.4.7 <dfn>PLAINTEXT state</dfn></h5> 2514 2515 <p>Consume the <a href=#next-input-character id=plaintext-state:next-input-character>next input character</a>:</p> 2516 2517 <dl class=switch><dt>U+0000 NULL<dd><a href=#parse-error id=plaintext-state:parse-error>Parse error</a>. Emit a U+FFFD REPLACEMENT CHARACTER character token.<dt>EOF<dd>Emit an end-of-file token.<dt>Anything else<dd>Emit the <a href=#current-input-character id=plaintext-state:current-input-character>current input character</a> as a character token.</dl> 2518 2519 2520 <h5 id=tag-open-state>12.2.4.8 <dfn>Tag open state</dfn></h5> 2521 2522 <p>Consume the <a href=#next-input-character id=tag-open-state:next-input-character>next input character</a>:</p> 2523 2524 <dl class=switch><dt>U+0021 EXCLAMATION MARK (!)<dd>Switch to the <a href=#markup-declaration-open-state id=tag-open-state:markup-declaration-open-state>markup declaration open state</a>.<dt>U+002F SOLIDUS (/)<dd>Switch to the <a href=#end-tag-open-state id=tag-open-state:end-tag-open-state>end tag open state</a>.<dt><a href=infrastructure.html#uppercase-ascii-letters id=tag-open-state:uppercase-ascii-letters>Uppercase ASCII letter</a><dd>Create a new start tag token, set its tag name to the lowercase version of the <a href=#current-input-character id=tag-open-state:current-input-character>current 2525 input character</a> (add 0x0020 to the character's code point), then switch to the <a href=#tag-name-state id=tag-open-state:tag-name-state>tag 2526 name state</a>. (Don't emit the token yet; further details will be filled in before it is 2527 emitted.)<dt><a href=infrastructure.html#lowercase-ascii-letters id=tag-open-state:lowercase-ascii-letters>Lowercase ASCII letter</a><dd>Create a new start tag token, set its tag name to the <a href=#current-input-character id=tag-open-state:current-input-character-2>current input character</a>, 2528 then switch to the <a href=#tag-name-state id=tag-open-state:tag-name-state-2>tag name state</a>. (Don't emit the token yet; further details will 2529 be filled in before it is emitted.)<dt>U+003F QUESTION MARK (?)<dd><a href=#parse-error id=tag-open-state:parse-error>Parse error</a>. Switch to the <a href=#bogus-comment-state id=tag-open-state:bogus-comment-state>bogus comment state</a>.<dt>Anything else<dd><a href=#parse-error id=tag-open-state:parse-error-2>Parse error</a>. Switch to the <a href=#data-state id=tag-open-state:data-state>data state</a>. Emit a U+003C LESS-THAN SIGN 2530 character token. Reconsume the <a href=#current-input-character id=tag-open-state:current-input-character-3>current input character</a>.</dl> 2531 2532 <h5 id=end-tag-open-state>12.2.4.9 <dfn>End tag open state</dfn></h5> 2533 2534 <p>Consume the <a href=#next-input-character id=end-tag-open-state:next-input-character>next input character</a>:</p> 2535 2536 <dl class=switch><dt><a href=infrastructure.html#uppercase-ascii-letters id=end-tag-open-state:uppercase-ascii-letters>Uppercase ASCII letter</a><dd>Create a new end tag token, set its tag name to the lowercase version of the <a href=#current-input-character id=end-tag-open-state:current-input-character>current 2537 input character</a> (add 0x0020 to the character's code point), then switch to the <a href=#tag-name-state id=end-tag-open-state:tag-name-state>tag 2538 name state</a>. (Don't emit the token yet; further details will be filled in before it is 2539 emitted.)<dt><a href=infrastructure.html#lowercase-ascii-letters id=end-tag-open-state:lowercase-ascii-letters>Lowercase ASCII letter</a><dd>Create a new end tag token, set its tag name to the <a href=#current-input-character id=end-tag-open-state:current-input-character-2>current input character</a>, 2540 then switch to the <a href=#tag-name-state id=end-tag-open-state:tag-name-state-2>tag name state</a>. (Don't emit the token yet; further details will 2541 be filled in before it is emitted.)<dt>U+003E GREATER-THAN SIGN (>)<dd><a href=#parse-error id=end-tag-open-state:parse-error>Parse error</a>. Switch to the <a href=#data-state id=end-tag-open-state:data-state>data state</a>.<dt>EOF<dd><a href=#parse-error id=end-tag-open-state:parse-error-2>Parse error</a>. Switch to the <a href=#data-state id=end-tag-open-state:data-state-2>data state</a>. Emit a U+003C LESS-THAN SIGN 2542 character token and a U+002F SOLIDUS character token. Reconsume the EOF character.<dt>Anything else<dd><a href=#parse-error id=end-tag-open-state:parse-error-3>Parse error</a>. Switch to the <a href=#bogus-comment-state id=end-tag-open-state:bogus-comment-state>bogus comment state</a>.</dl> 2543 2544 2545 <h5 id=tag-name-state>12.2.4.10 <dfn>Tag name state</dfn></h5> 2546 2547 <p>Consume the <a href=#next-input-character id=tag-name-state:next-input-character>next input character</a>:</p> 2548 2549 <dl class=switch><dt>U+0009 CHARACTER TABULATION (tab)<dt>U+000A LINE FEED (LF)<dt>U+000C FORM FEED (FF)<dt>U+0020 SPACE<dd>Switch to the <a href=#before-attribute-name-state id=tag-name-state:before-attribute-name-state>before attribute name state</a>.<dt>U+002F SOLIDUS (/)<dd>Switch to the <a href=#self-closing-start-tag-state id=tag-name-state:self-closing-start-tag-state>self-closing start tag state</a>.<dt>U+003E GREATER-THAN SIGN (>)<dd>Switch to the <a href=#data-state id=tag-name-state:data-state>data state</a>. Emit the current tag token.<dt><a href=infrastructure.html#uppercase-ascii-letters id=tag-name-state:uppercase-ascii-letters>Uppercase ASCII letter</a><dd>Append the lowercase version of the <a href=#current-input-character id=tag-name-state:current-input-character>current input character</a> (add 0x0020 to the 2550 character's code point) to the current tag token's tag name.<dt>U+0000 NULL<dd><a href=#parse-error id=tag-name-state:parse-error>Parse error</a>. Append a U+FFFD REPLACEMENT CHARACTER character to the current tag 2551 token's tag name.<dt>EOF<dd><a href=#parse-error id=tag-name-state:parse-error-2>Parse error</a>. Switch to the <a href=#data-state id=tag-name-state:data-state-2>data state</a>. Reconsume the EOF 2552 character.<dt>Anything else<dd>Append the <a href=#current-input-character id=tag-name-state:current-input-character-2>current input character</a> to the current tag token's tag name.</dl> 2553 2554 2555 <h5 id=rcdata-less-than-sign-state>12.2.4.11 <dfn>RCDATA less-than sign state</dfn></h5> 2556 2557 2558 <p>Consume the <a href=#next-input-character id=rcdata-less-than-sign-state:next-input-character>next input character</a>:</p> 2559 2560 <dl class=switch><dt>U+002F SOLIDUS (/)<dd>Set the <var id=rcdata-less-than-sign-state:temporary-buffer><a href=#temporary-buffer>temporary buffer</a></var> to the empty string. Switch to 2561 the <a href=#rcdata-end-tag-open-state id=rcdata-less-than-sign-state:rcdata-end-tag-open-state>RCDATA end tag open state</a>.<dt>Anything else<dd>Switch to the <a href=#rcdata-state id=rcdata-less-than-sign-state:rcdata-state>RCDATA state</a>. Emit a U+003C LESS-THAN SIGN character token. 2562 Reconsume the <a href=#current-input-character id=rcdata-less-than-sign-state:current-input-character>current input character</a>.</dl> 2563 2564 2565 <h5 id=rcdata-end-tag-open-state>12.2.4.12 <dfn>RCDATA end tag open state</dfn></h5> 2566 2567 2568 <p>Consume the <a href=#next-input-character id=rcdata-end-tag-open-state:next-input-character>next input character</a>:</p> 2569 2570 <dl class=switch><dt><a href=infrastructure.html#uppercase-ascii-letters id=rcdata-end-tag-open-state:uppercase-ascii-letters>Uppercase ASCII letter</a><dd>Create a new end tag token, and set its tag name to the lowercase version of the 2571 <a href=#current-input-character id=rcdata-end-tag-open-state:current-input-character>current input character</a> (add 0x0020 to the character's code point). Append the 2572 <a href=#current-input-character id=rcdata-end-tag-open-state:current-input-character-2>current input character</a> to the <var id=rcdata-end-tag-open-state:temporary-buffer><a href=#temporary-buffer>temporary 2573 buffer</a></var>. Finally, switch to the <a href=#rcdata-end-tag-name-state id=rcdata-end-tag-open-state:rcdata-end-tag-name-state>RCDATA end tag name state</a>. (Don't emit the 2574 token yet; further details will be filled in before it is emitted.)<dt><a href=infrastructure.html#lowercase-ascii-letters id=rcdata-end-tag-open-state:lowercase-ascii-letters>Lowercase ASCII letter</a><dd>Create a new end tag token, and set its tag name to the <a href=#current-input-character id=rcdata-end-tag-open-state:current-input-character-3>current input character</a>. 2575 Append the <a href=#current-input-character id=rcdata-end-tag-open-state:current-input-character-4>current input character</a> to the <var id=rcdata-end-tag-open-state:temporary-buffer-2><a href=#temporary-buffer>temporary 2576 buffer</a></var>. Finally, switch to the <a href=#rcdata-end-tag-name-state id=rcdata-end-tag-open-state:rcdata-end-tag-name-state-2>RCDATA end tag name state</a>. (Don't emit the 2577 token yet; further details will be filled in before it is emitted.)<dt>Anything else<dd>Switch to the <a href=#rcdata-state id=rcdata-end-tag-open-state:rcdata-state>RCDATA state</a>. Emit a U+003C LESS-THAN SIGN character token and a 2578 U+002F SOLIDUS character token. Reconsume the <a href=#current-input-character id=rcdata-end-tag-open-state:current-input-character-5>current input character</a>.</dl> 2579 2580 2581 <h5 id=rcdata-end-tag-name-state>12.2.4.13 <dfn>RCDATA end tag name state</dfn></h5> 2582 2583 2584 <p>Consume the <a href=#next-input-character id=rcdata-end-tag-name-state:next-input-character>next input character</a>:</p> 2585 2586 <dl class=switch><dt>U+0009 CHARACTER TABULATION (tab)<dt>U+000A LINE FEED (LF)<dt>U+000C FORM FEED (FF)<dt>U+0020 SPACE<dd>If the current end tag token is an <a href=#appropriate-end-tag-token id=rcdata-end-tag-name-state:appropriate-end-tag-token>appropriate end tag token</a>, then switch to the 2587 <a href=#before-attribute-name-state id=rcdata-end-tag-name-state:before-attribute-name-state>before attribute name state</a>. Otherwise, treat it as per the "anything else" entry 2588 below.<dt>U+002F SOLIDUS (/)<dd>If the current end tag token is an <a href=#appropriate-end-tag-token id=rcdata-end-tag-name-state:appropriate-end-tag-token-2>appropriate end tag token</a>, then switch to the 2589 <a href=#self-closing-start-tag-state id=rcdata-end-tag-name-state:self-closing-start-tag-state>self-closing start tag state</a>. Otherwise, treat it as per the "anything else" entry 2590 below.<dt>U+003E GREATER-THAN SIGN (>)<dd>If the current end tag token is an <a href=#appropriate-end-tag-token id=rcdata-end-tag-name-state:appropriate-end-tag-token-3>appropriate end tag token</a>, then switch to the 2591 <a href=#data-state id=rcdata-end-tag-name-state:data-state>data state</a> and emit the current tag token. Otherwise, treat it as per the "anything 2592 else" entry below.<dt><a href=infrastructure.html#uppercase-ascii-letters id=rcdata-end-tag-name-state:uppercase-ascii-letters>Uppercase ASCII letter</a><dd>Append the lowercase version of the <a href=#current-input-character id=rcdata-end-tag-name-state:current-input-character>current input character</a> (add 0x0020 to the 2593 character's code point) to the current tag token's tag name. Append the <a href=#current-input-character id=rcdata-end-tag-name-state:current-input-character-2>current input 2594 character</a> to the <var id=rcdata-end-tag-name-state:temporary-buffer><a href=#temporary-buffer>temporary buffer</a></var>.<dt><a href=infrastructure.html#lowercase-ascii-letters id=rcdata-end-tag-name-state:lowercase-ascii-letters>Lowercase ASCII letter</a><dd>Append the <a href=#current-input-character id=rcdata-end-tag-name-state:current-input-character-3>current input character</a> to the current tag token's tag name. Append 2595 the <a href=#current-input-character id=rcdata-end-tag-name-state:current-input-character-4>current input character</a> to the <var id=rcdata-end-tag-name-state:temporary-buffer-2><a href=#temporary-buffer>temporary 2596 buffer</a></var>.<dt>Anything else<dd>Switch to the <a href=#rcdata-state id=rcdata-end-tag-name-state:rcdata-state>RCDATA state</a>. Emit a U+003C LESS-THAN SIGN character token, a 2597 U+002F SOLIDUS character token, and a character token for each of the characters in the <var id=rcdata-end-tag-name-state:temporary-buffer-3><a href=#temporary-buffer>temporary buffer</a></var> (in the order they were added to the buffer). 2598 Reconsume the <a href=#current-input-character id=rcdata-end-tag-name-state:current-input-character-5>current input character</a>.</dl> 2599 2600 2601 <h5 id=rawtext-less-than-sign-state>12.2.4.14 <dfn>RAWTEXT less-than sign state</dfn></h5> 2602 2603 2604 <p>Consume the <a href=#next-input-character id=rawtext-less-than-sign-state:next-input-character>next input character</a>:</p> 2605 2606 <dl class=switch><dt>U+002F SOLIDUS (/)<dd>Set the <var id=rawtext-less-than-sign-state:temporary-buffer><a href=#temporary-buffer>temporary buffer</a></var> to the empty string. Switch to 2607 the <a href=#rawtext-end-tag-open-state id=rawtext-less-than-sign-state:rawtext-end-tag-open-state>RAWTEXT end tag open state</a>.<dt>Anything else<dd>Switch to the <a href=#rawtext-state id=rawtext-less-than-sign-state:rawtext-state>RAWTEXT state</a>. Emit a U+003C LESS-THAN SIGN character token. 2608 Reconsume the <a href=#current-input-character id=rawtext-less-than-sign-state:current-input-character>current input character</a>.</dl> 2609 2610 2611 <h5 id=rawtext-end-tag-open-state>12.2.4.15 <dfn>RAWTEXT end tag open state</dfn></h5> 2612 2613 2614 <p>Consume the <a href=#next-input-character id=rawtext-end-tag-open-state:next-input-character>next input character</a>:</p> 2615 2616 <dl class=switch><dt><a href=infrastructure.html#uppercase-ascii-letters id=rawtext-end-tag-open-state:uppercase-ascii-letters>Uppercase ASCII letter</a><dd>Create a new end tag token, and set its tag name to the lowercase version of the 2617 <a href=#current-input-character id=rawtext-end-tag-open-state:current-input-character>current input character</a> (add 0x0020 to the character's code point). Append the 2618 <a href=#current-input-character id=rawtext-end-tag-open-state:current-input-character-2>current input character</a> to the <var id=rawtext-end-tag-open-state:temporary-buffer><a href=#temporary-buffer>temporary 2619 buffer</a></var>. Finally, switch to the <a href=#rawtext-end-tag-name-state id=rawtext-end-tag-open-state:rawtext-end-tag-name-state>RAWTEXT end tag name state</a>. (Don't emit the 2620 token yet; further details will be filled in before it is emitted.)<dt><a href=infrastructure.html#lowercase-ascii-letters id=rawtext-end-tag-open-state:lowercase-ascii-letters>Lowercase ASCII letter</a><dd>Create a new end tag token, and set its tag name to the <a href=#current-input-character id=rawtext-end-tag-open-state:current-input-character-3>current input character</a>. 2621 Append the <a href=#current-input-character id=rawtext-end-tag-open-state:current-input-character-4>current input character</a> to the <var id=rawtext-end-tag-open-state:temporary-buffer-2><a href=#temporary-buffer>temporary 2622 buffer</a></var>. Finally, switch to the <a href=#rawtext-end-tag-name-state id=rawtext-end-tag-open-state:rawtext-end-tag-name-state-2>RAWTEXT end tag name state</a>. (Don't emit the 2623 token yet; further details will be filled in before it is emitted.)<dt>Anything else<dd>Switch to the <a href=#rawtext-state id=rawtext-end-tag-open-state:rawtext-state>RAWTEXT state</a>. Emit a U+003C LESS-THAN SIGN character token and a 2624 U+002F SOLIDUS character token. Reconsume the <a href=#current-input-character id=rawtext-end-tag-open-state:current-input-character-5>current input character</a>.</dl> 2625 2626 2627 <h5 id=rawtext-end-tag-name-state>12.2.4.16 <dfn>RAWTEXT end tag name state</dfn></h5> 2628 2629 2630 <p>Consume the <a href=#next-input-character id=rawtext-end-tag-name-state:next-input-character>next input character</a>:</p> 2631 2632 <dl class=switch><dt>U+0009 CHARACTER TABULATION (tab)<dt>U+000A LINE FEED (LF)<dt>U+000C FORM FEED (FF)<dt>U+0020 SPACE<dd>If the current end tag token is an <a href=#appropriate-end-tag-token id=rawtext-end-tag-name-state:appropriate-end-tag-token>appropriate end tag token</a>, then switch to the 2633 <a href=#before-attribute-name-state id=rawtext-end-tag-name-state:before-attribute-name-state>before attribute name state</a>. Otherwise, treat it as per the "anything else" entry 2634 below.<dt>U+002F SOLIDUS (/)<dd>If the current end tag token is an <a href=#appropriate-end-tag-token id=rawtext-end-tag-name-state:appropriate-end-tag-token-2>appropriate end tag token</a>, then switch to the 2635 <a href=#self-closing-start-tag-state id=rawtext-end-tag-name-state:self-closing-start-tag-state>self-closing start tag state</a>. Otherwise, treat it as per the "anything else" entry 2636 below.<dt>U+003E GREATER-THAN SIGN (>)<dd>If the current end tag token is an <a href=#appropriate-end-tag-token id=rawtext-end-tag-name-state:appropriate-end-tag-token-3>appropriate end tag token</a>, then switch to the 2637 <a href=#data-state id=rawtext-end-tag-name-state:data-state>data state</a> and emit the current tag token. Otherwise, treat it as per the "anything 2638 else" entry below.<dt><a href=infrastructure.html#uppercase-ascii-letters id=rawtext-end-tag-name-state:uppercase-ascii-letters>Uppercase ASCII letter</a><dd>Append the lowercase version of the <a href=#current-input-character id=rawtext-end-tag-name-state:current-input-character>current input character</a> (add 0x0020 to the 2639 character's code point) to the current tag token's tag name. Append the <a href=#current-input-character id=rawtext-end-tag-name-state:current-input-character-2>current input 2640 character</a> to the <var id=rawtext-end-tag-name-state:temporary-buffer><a href=#temporary-buffer>temporary buffer</a></var>.<dt><a href=infrastructure.html#lowercase-ascii-letters id=rawtext-end-tag-name-state:lowercase-ascii-letters>Lowercase ASCII letter</a><dd>Append the <a href=#current-input-character id=rawtext-end-tag-name-state:current-input-character-3>current input character</a> to the current tag token's tag name. Append 2641 the <a href=#current-input-character id=rawtext-end-tag-name-state:current-input-character-4>current input character</a> to the <var id=rawtext-end-tag-name-state:temporary-buffer-2><a href=#temporary-buffer>temporary 2642 buffer</a></var>.<dt>Anything else<dd>Switch to the <a href=#rawtext-state id=rawtext-end-tag-name-state:rawtext-state>RAWTEXT state</a>. Emit a U+003C LESS-THAN SIGN character token, a 2643 U+002F SOLIDUS character token, and a character token for each of the characters in the <var id=rawtext-end-tag-name-state:temporary-buffer-3><a href=#temporary-buffer>temporary buffer</a></var> (in the order they were added to the buffer). 2644 Reconsume the <a href=#current-input-character id=rawtext-end-tag-name-state:current-input-character-5>current input character</a>.</dl> 2645 2646 2647 <h5 id=script-data-less-than-sign-state>12.2.4.17 <dfn>Script data less-than sign state</dfn></h5> 2648 2649 <p>Consume the <a href=#next-input-character id=script-data-less-than-sign-state:next-input-character>next input character</a>:</p> 2650 2651 <dl class=switch><dt>U+002F SOLIDUS (/)<dd>Set the <var id=script-data-less-than-sign-state:temporary-buffer><a href=#temporary-buffer>temporary buffer</a></var> to the empty string. Switch to 2652 the <a href=#script-data-end-tag-open-state id=script-data-less-than-sign-state:script-data-end-tag-open-state>script data end tag open state</a>.<dt>U+0021 EXCLAMATION MARK (!)<dd>Switch to the <a href=#script-data-escape-start-state id=script-data-less-than-sign-state:script-data-escape-start-state>script data escape start state</a>. Emit a U+003C LESS-THAN SIGN 2653 character token and a U+0021 EXCLAMATION MARK character token.<dt>Anything else<dd>Switch to the <a href=#script-data-state id=script-data-less-than-sign-state:script-data-state>script data state</a>. Emit a U+003C LESS-THAN SIGN character token. 2654 Reconsume the <a href=#current-input-character id=script-data-less-than-sign-state:current-input-character>current input character</a>.</dl> 2655 2656 2657 <h5 id=script-data-end-tag-open-state>12.2.4.18 <dfn>Script data end tag open state</dfn></h5> 2658 2659 2660 <p>Consume the <a href=#next-input-character id=script-data-end-tag-open-state:next-input-character>next input character</a>:</p> 2661 2662 <dl class=switch><dt><a href=infrastructure.html#uppercase-ascii-letters id=script-data-end-tag-open-state:uppercase-ascii-letters>Uppercase ASCII letter</a><dd>Create a new end tag token, and set its tag name to the lowercase version of the 2663 <a href=#current-input-character id=script-data-end-tag-open-state:current-input-character>current input character</a> (add 0x0020 to the character's code point). Append the 2664 <a href=#current-input-character id=script-data-end-tag-open-state:current-input-character-2>current input character</a> to the <var id=script-data-end-tag-open-state:temporary-buffer><a href=#temporary-buffer>temporary 2665 buffer</a></var>. Finally, switch to the <a href=#script-data-end-tag-name-state id=script-data-end-tag-open-state:script-data-end-tag-name-state>script data end tag name state</a>. (Don't emit the 2666 token yet; further details will be filled in before it is emitted.)<dt><a href=infrastructure.html#lowercase-ascii-letters id=script-data-end-tag-open-state:lowercase-ascii-letters>Lowercase ASCII letter</a><dd>Create a new end tag token, and set its tag name to the <a href=#current-input-character id=script-data-end-tag-open-state:current-input-character-3>current input character</a>. 2667 Append the <a href=#current-input-character id=script-data-end-tag-open-state:current-input-character-4>current input character</a> to the <var id=script-data-end-tag-open-state:temporary-buffer-2><a href=#temporary-buffer>temporary 2668 buffer</a></var>. Finally, switch to the <a href=#script-data-end-tag-name-state id=script-data-end-tag-open-state:script-data-end-tag-name-state-2>script data end tag name state</a>. (Don't emit the 2669 token yet; further details will be filled in before it is emitted.)<dt>Anything else<dd>Switch to the <a href=#script-data-state id=script-data-end-tag-open-state:script-data-state>script data state</a>. Emit a U+003C LESS-THAN SIGN character token 2670 and a U+002F SOLIDUS character token. Reconsume the <a href=#current-input-character id=script-data-end-tag-open-state:current-input-character-5>current input character</a>.</dl> 2671 2672 2673 <h5 id=script-data-end-tag-name-state>12.2.4.19 <dfn>Script data end tag name state</dfn></h5> 2674 2675 2676 <p>Consume the <a href=#next-input-character id=script-data-end-tag-name-state:next-input-character>next input character</a>:</p> 2677 2678 <dl class=switch><dt>U+0009 CHARACTER TABULATION (tab)<dt>U+000A LINE FEED (LF)<dt>U+000C FORM FEED (FF)<dt>U+0020 SPACE<dd>If the current end tag token is an <a href=#appropriate-end-tag-token id=script-data-end-tag-name-state:appropriate-end-tag-token>appropriate end tag token</a>, then switch to the 2679 <a href=#before-attribute-name-state id=script-data-end-tag-name-state:before-attribute-name-state>before attribute name state</a>. Otherwise, treat it as per the "anything else" entry 2680 below.<dt>U+002F SOLIDUS (/)<dd>If the current end tag token is an <a href=#appropriate-end-tag-token id=script-data-end-tag-name-state:appropriate-end-tag-token-2>appropriate end tag token</a>, then switch to the 2681 <a href=#self-closing-start-tag-state id=script-data-end-tag-name-state:self-closing-start-tag-state>self-closing start tag state</a>. Otherwise, treat it as per the "anything else" entry 2682 below.<dt>U+003E GREATER-THAN SIGN (>)<dd>If the current end tag token is an <a href=#appropriate-end-tag-token id=script-data-end-tag-name-state:appropriate-end-tag-token-3>appropriate end tag token</a>, then switch to the 2683 <a href=#data-state id=script-data-end-tag-name-state:data-state>data state</a> and emit the current tag token. Otherwise, treat it as per the "anything 2684 else" entry below.<dt><a href=infrastructure.html#uppercase-ascii-letters id=script-data-end-tag-name-state:uppercase-ascii-letters>Uppercase ASCII letter</a><dd>Append the lowercase version of the <a href=#current-input-character id=script-data-end-tag-name-state:current-input-character>current input character</a> (add 0x0020 to the 2685 character's code point) to the current tag token's tag name. Append the <a href=#current-input-character id=script-data-end-tag-name-state:current-input-character-2>current input 2686 character</a> to the <var id=script-data-end-tag-name-state:temporary-buffer><a href=#temporary-buffer>temporary buffer</a></var>.<dt><a href=infrastructure.html#lowercase-ascii-letters id=script-data-end-tag-name-state:lowercase-ascii-letters>Lowercase ASCII letter</a><dd>Append the <a href=#current-input-character id=script-data-end-tag-name-state:current-input-character-3>current input character</a> to the current tag token's tag name. Append 2687 the <a href=#current-input-character id=script-data-end-tag-name-state:current-input-character-4>current input character</a> to the <var id=script-data-end-tag-name-state:temporary-buffer-2><a href=#temporary-buffer>temporary 2688 buffer</a></var>.<dt>Anything else<dd>Switch to the <a href=#script-data-state id=script-data-end-tag-name-state:script-data-state>script data state</a>. Emit a U+003C LESS-THAN SIGN character token, a 2689 U+002F SOLIDUS character token, and a character token for each of the characters in the <var id=script-data-end-tag-name-state:temporary-buffer-3><a href=#temporary-buffer>temporary buffer</a></var> (in the order they were added to the buffer). 2690 Reconsume the <a href=#current-input-character id=script-data-end-tag-name-state:current-input-character-5>current input character</a>.</dl> 2691 2692 2693 <h5 id=script-data-escape-start-state>12.2.4.20 <dfn>Script data escape start state</dfn></h5> 2694 2695 <p>Consume the <a href=#next-input-character id=script-data-escape-start-state:next-input-character>next input character</a>:</p> 2696 2697 <dl class=switch><dt>U+002D HYPHEN-MINUS (-)<dd>Switch to the <a href=#script-data-escape-start-dash-state id=script-data-escape-start-state:script-data-escape-start-dash-state>script data escape start dash state</a>. Emit a U+002D HYPHEN-MINUS 2698 character token.<dt>Anything else<dd>Switch to the <a href=#script-data-state id=script-data-escape-start-state:script-data-state>script data state</a>. Reconsume the <a href=#current-input-character id=script-data-escape-start-state:current-input-character>current input 2699 character</a>.</dl> 2700 2701 2702 <h5 id=script-data-escape-start-dash-state>12.2.4.21 <dfn>Script data escape start dash state</dfn></h5> 2703 2704 <p>Consume the <a href=#next-input-character id=script-data-escape-start-dash-state:next-input-character>next input character</a>:</p> 2705 2706 <dl class=switch><dt>U+002D HYPHEN-MINUS (-)<dd>Switch to the <a href=#script-data-escaped-dash-dash-state id=script-data-escape-start-dash-state:script-data-escaped-dash-dash-state>script data escaped dash dash state</a>. Emit a U+002D HYPHEN-MINUS 2707 character token.<dt>Anything else<dd>Switch to the <a href=#script-data-state id=script-data-escape-start-dash-state:script-data-state>script data state</a>. Reconsume the <a href=#current-input-character id=script-data-escape-start-dash-state:current-input-character>current input 2708 character</a>.</dl> 2709 2710 2711 <h5 id=script-data-escaped-state>12.2.4.22 <dfn>Script data escaped state</dfn></h5> 2712 2713 <p>Consume the <a href=#next-input-character id=script-data-escaped-state:next-input-character>next input character</a>:</p> 2714 2715 <dl class=switch><dt>U+002D HYPHEN-MINUS (-)<dd>Switch to the <a href=#script-data-escaped-dash-state id=script-data-escaped-state:script-data-escaped-dash-state>script data escaped dash state</a>. Emit a U+002D HYPHEN-MINUS 2716 character token.<dt>U+003C LESS-THAN SIGN (<)<dd>Switch to the <a href=#script-data-escaped-less-than-sign-state id=script-data-escaped-state:script-data-escaped-less-than-sign-state>script data escaped less-than sign state</a>.<dt>U+0000 NULL<dd><a href=#parse-error id=script-data-escaped-state:parse-error>Parse error</a>. Emit a U+FFFD REPLACEMENT CHARACTER character token.<dt>EOF<dd>Switch to the <a href=#data-state id=script-data-escaped-state:data-state>data state</a>. <a href=#parse-error id=script-data-escaped-state:parse-error-2>Parse error</a>. Reconsume the EOF 2717 character.<dt>Anything else<dd>Emit the <a href=#current-input-character id=script-data-escaped-state:current-input-character>current input character</a> as a character token.</dl> 2718 2719 2720 <h5 id=script-data-escaped-dash-state>12.2.4.23 <dfn>Script data escaped dash state</dfn></h5> 2721 2722 <p>Consume the <a href=#next-input-character id=script-data-escaped-dash-state:next-input-character>next input character</a>:</p> 2723 2724 <dl class=switch><dt>U+002D HYPHEN-MINUS (-)<dd>Switch to the <a href=#script-data-escaped-dash-dash-state id=script-data-escaped-dash-state:script-data-escaped-dash-dash-state>script data escaped dash dash state</a>. Emit a U+002D HYPHEN-MINUS 2725 character token.<dt>U+003C LESS-THAN SIGN (<)<dd>Switch to the <a href=#script-data-escaped-less-than-sign-state id=script-data-escaped-dash-state:script-data-escaped-less-than-sign-state>script data escaped less-than sign state</a>.<dt>U+0000 NULL<dd><a href=#parse-error id=script-data-escaped-dash-state:parse-error>Parse error</a>. Switch to the <a href=#script-data-escaped-state id=script-data-escaped-dash-state:script-data-escaped-state>script data escaped state</a>. Emit a U+FFFD 2726 REPLACEMENT CHARACTER character token.<dt>EOF<dd><a href=#parse-error id=script-data-escaped-dash-state:parse-error-2>Parse error</a>. Switch to the <a href=#data-state id=script-data-escaped-dash-state:data-state>data state</a>. Reconsume the EOF 2727 character.<dt>Anything else<dd>Switch to the <a href=#script-data-escaped-state id=script-data-escaped-dash-state:script-data-escaped-state-2>script data escaped state</a>. Emit the <a href=#current-input-character id=script-data-escaped-dash-state:current-input-character>current input 2728 character</a> as a character token.</dl> 2729 2730 2731 <h5 id=script-data-escaped-dash-dash-state>12.2.4.24 <dfn>Script data escaped dash dash state</dfn></h5> 2732 2733 <p>Consume the <a href=#next-input-character id=script-data-escaped-dash-dash-state:next-input-character>next input character</a>:</p> 2734 2735 <dl class=switch><dt>U+002D HYPHEN-MINUS (-)<dd>Emit a U+002D HYPHEN-MINUS character token.<dt>U+003C LESS-THAN SIGN (<)<dd>Switch to the <a href=#script-data-escaped-less-than-sign-state id=script-data-escaped-dash-dash-state:script-data-escaped-less-than-sign-state>script data escaped less-than sign state</a>.<dt>U+003E GREATER-THAN SIGN (>)<dd>Switch to the <a href=#script-data-state id=script-data-escaped-dash-dash-state:script-data-state>script data state</a>. Emit a U+003E GREATER-THAN SIGN character 2736 token.<dt>U+0000 NULL<dd><a href=#parse-error id=script-data-escaped-dash-dash-state:parse-error>Parse error</a>. Switch to the <a href=#script-data-escaped-state id=script-data-escaped-dash-dash-state:script-data-escaped-state>script data escaped state</a>. Emit a U+FFFD 2737 REPLACEMENT CHARACTER character token.<dt>EOF<dd><a href=#parse-error id=script-data-escaped-dash-dash-state:parse-error-2>Parse error</a>. Switch to the <a href=#data-state id=script-data-escaped-dash-dash-state:data-state>data state</a>. Reconsume the EOF 2738 character.<dt>Anything else<dd>Switch to the <a href=#script-data-escaped-state id=script-data-escaped-dash-dash-state:script-data-escaped-state-2>script data escaped state</a>. Emit the <a href=#current-input-character id=script-data-escaped-dash-dash-state:current-input-character>current input 2739 character</a> as a character token.</dl> 2740 2741 2742 <h5 id=script-data-escaped-less-than-sign-state>12.2.4.25 <dfn>Script data escaped less-than sign state</dfn></h5> 2743 2744 <p>Consume the <a href=#next-input-character id=script-data-escaped-less-than-sign-state:next-input-character>next input character</a>:</p> 2745 2746 <dl class=switch><dt>U+002F SOLIDUS (/)<dd>Set the <var id=script-data-escaped-less-than-sign-state:temporary-buffer><a href=#temporary-buffer>temporary buffer</a></var> to the empty string. Switch to 2747 the <a href=#script-data-escaped-end-tag-open-state id=script-data-escaped-less-than-sign-state:script-data-escaped-end-tag-open-state>script data escaped end tag open state</a>.<dt><a href=infrastructure.html#uppercase-ascii-letters id=script-data-escaped-less-than-sign-state:uppercase-ascii-letters>Uppercase ASCII letter</a><dd>Set the <var id=script-data-escaped-less-than-sign-state:temporary-buffer-2><a href=#temporary-buffer>temporary buffer</a></var> to the empty string. Append the 2748 lowercase version of the <a href=#current-input-character id=script-data-escaped-less-than-sign-state:current-input-character>current input character</a> (add 0x0020 to the character's code 2749 point) to the <var id=script-data-escaped-less-than-sign-state:temporary-buffer-3><a href=#temporary-buffer>temporary buffer</a></var>. Switch to the <a href=#script-data-double-escape-start-state id=script-data-escaped-less-than-sign-state:script-data-double-escape-start-state>script 2750 data double escape start state</a>. Emit a U+003C LESS-THAN SIGN character token and the 2751 <a href=#current-input-character id=script-data-escaped-less-than-sign-state:current-input-character-2>current input character</a> as a character token.<dt><a href=infrastructure.html#lowercase-ascii-letters id=script-data-escaped-less-than-sign-state:lowercase-ascii-letters>Lowercase ASCII letter</a><dd>Set the <var id=script-data-escaped-less-than-sign-state:temporary-buffer-4><a href=#temporary-buffer>temporary buffer</a></var> to the empty string. Append the 2752 <a href=#current-input-character id=script-data-escaped-less-than-sign-state:current-input-character-3>current input character</a> to the <var id=script-data-escaped-less-than-sign-state:temporary-buffer-5><a href=#temporary-buffer>temporary 2753 buffer</a></var>. Switch to the <a href=#script-data-double-escape-start-state id=script-data-escaped-less-than-sign-state:script-data-double-escape-start-state-2>script data double escape start state</a>. Emit a U+003C 2754 LESS-THAN SIGN character token and the <a href=#current-input-character id=script-data-escaped-less-than-sign-state:current-input-character-4>current input character</a> as a character 2755 token.<dt>Anything else<dd>Switch to the <a href=#script-data-escaped-state id=script-data-escaped-less-than-sign-state:script-data-escaped-state>script data escaped state</a>. Emit a U+003C LESS-THAN SIGN character 2756 token. Reconsume the <a href=#current-input-character id=script-data-escaped-less-than-sign-state:current-input-character-5>current input character</a>.</dl> 2757 2758 2759 <h5 id=script-data-escaped-end-tag-open-state>12.2.4.26 <dfn>Script data escaped end tag open state</dfn></h5> 2760 2761 <p>Consume the <a href=#next-input-character id=script-data-escaped-end-tag-open-state:next-input-character>next input character</a>:</p> 2762 2763 <dl class=switch><dt><a href=infrastructure.html#uppercase-ascii-letters id=script-data-escaped-end-tag-open-state:uppercase-ascii-letters>Uppercase ASCII letter</a><dd>Create a new end tag token, and set its tag name to the lowercase version of the 2764 <a href=#current-input-character id=script-data-escaped-end-tag-open-state:current-input-character>current input character</a> (add 0x0020 to the character's code point). Append the 2765 <a href=#current-input-character id=script-data-escaped-end-tag-open-state:current-input-character-2>current input character</a> to the <var id=script-data-escaped-end-tag-open-state:temporary-buffer><a href=#temporary-buffer>temporary 2766 buffer</a></var>. Finally, switch to the <a href=#script-data-escaped-end-tag-name-state id=script-data-escaped-end-tag-open-state:script-data-escaped-end-tag-name-state>script data escaped end tag name state</a>. (Don't 2767 emit the token yet; further details will be filled in before it is emitted.)<dt><a href=infrastructure.html#lowercase-ascii-letters id=script-data-escaped-end-tag-open-state:lowercase-ascii-letters>Lowercase ASCII letter</a><dd>Create a new end tag token, and set its tag name to the <a href=#current-input-character id=script-data-escaped-end-tag-open-state:current-input-character-3>current input character</a>. 2768 Append the <a href=#current-input-character id=script-data-escaped-end-tag-open-state:current-input-character-4>current input character</a> to the <var id=script-data-escaped-end-tag-open-state:temporary-buffer-2><a href=#temporary-buffer>temporary 2769 buffer</a></var>. Finally, switch to the <a href=#script-data-escaped-end-tag-name-state id=script-data-escaped-end-tag-open-state:script-data-escaped-end-tag-name-state-2>script data escaped end tag name state</a>. (Don't 2770 emit the token yet; further details will be filled in before it is emitted.)<dt>Anything else<dd>Switch to the <a href=#script-data-escaped-state id=script-data-escaped-end-tag-open-state:script-data-escaped-state>script data escaped state</a>. Emit a U+003C LESS-THAN SIGN character 2771 token and a U+002F SOLIDUS character token. Reconsume the <a href=#current-input-character id=script-data-escaped-end-tag-open-state:current-input-character-5>current input 2772 character</a>.</dl> 2773 2774 2775 <h5 id=script-data-escaped-end-tag-name-state>12.2.4.27 <dfn>Script data escaped end tag name state</dfn></h5> 2776 2777 <p>Consume the <a href=#next-input-character id=script-data-escaped-end-tag-name-state:next-input-character>next input character</a>:</p> 2778 2779 <dl class=switch><dt>U+0009 CHARACTER TABULATION (tab)<dt>U+000A LINE FEED (LF)<dt>U+000C FORM FEED (FF)<dt>U+0020 SPACE<dd>If the current end tag token is an <a href=#appropriate-end-tag-token id=script-data-escaped-end-tag-name-state:appropriate-end-tag-token>appropriate end tag token</a>, then switch to the 2780 <a href=#before-attribute-name-state id=script-data-escaped-end-tag-name-state:before-attribute-name-state>before attribute name state</a>. Otherwise, treat it as per the "anything else" entry 2781 below.<dt>U+002F SOLIDUS (/)<dd>If the current end tag token is an <a href=#appropriate-end-tag-token id=script-data-escaped-end-tag-name-state:appropriate-end-tag-token-2>appropriate end tag token</a>, then switch to the 2782 <a href=#self-closing-start-tag-state id=script-data-escaped-end-tag-name-state:self-closing-start-tag-state>self-closing start tag state</a>. Otherwise, treat it as per the "anything else" entry 2783 below.<dt>U+003E GREATER-THAN SIGN (>)<dd>If the current end tag token is an <a href=#appropriate-end-tag-token id=script-data-escaped-end-tag-name-state:appropriate-end-tag-token-3>appropriate end tag token</a>, then switch to the 2784 <a href=#data-state id=script-data-escaped-end-tag-name-state:data-state>data state</a> and emit the current tag token. Otherwise, treat it as per the "anything 2785 else" entry below.<dt><a href=infrastructure.html#uppercase-ascii-letters id=script-data-escaped-end-tag-name-state:uppercase-ascii-letters>Uppercase ASCII letter</a><dd>Append the lowercase version of the <a href=#current-input-character id=script-data-escaped-end-tag-name-state:current-input-character>current input character</a> (add 0x0020 to the 2786 character's code point) to the current tag token's tag name. Append the <a href=#current-input-character id=script-data-escaped-end-tag-name-state:current-input-character-2>current input 2787 character</a> to the <var id=script-data-escaped-end-tag-name-state:temporary-buffer><a href=#temporary-buffer>temporary buffer</a></var>.<dt><a href=infrastructure.html#lowercase-ascii-letters id=script-data-escaped-end-tag-name-state:lowercase-ascii-letters>Lowercase ASCII letter</a><dd>Append the <a href=#current-input-character id=script-data-escaped-end-tag-name-state:current-input-character-3>current input character</a> to the current tag token's tag name. Append 2788 the <a href=#current-input-character id=script-data-escaped-end-tag-name-state:current-input-character-4>current input character</a> to the <var id=script-data-escaped-end-tag-name-state:temporary-buffer-2><a href=#temporary-buffer>temporary 2789 buffer</a></var>.<dt>Anything else<dd>Switch to the <a href=#script-data-escaped-state id=script-data-escaped-end-tag-name-state:script-data-escaped-state>script data escaped state</a>. Emit a U+003C LESS-THAN SIGN character 2790 token, a U+002F SOLIDUS character token, and a character token for each of the characters in the 2791 <var id=script-data-escaped-end-tag-name-state:temporary-buffer-3><a href=#temporary-buffer>temporary buffer</a></var> (in the order they were added to the 2792 buffer). Reconsume the <a href=#current-input-character id=script-data-escaped-end-tag-name-state:current-input-character-5>current input character</a>.</dl> 2793 2794 2795 <h5 id=script-data-double-escape-start-state>12.2.4.28 <dfn>Script data double escape start state</dfn></h5> 2796 2797 <p>Consume the <a href=#next-input-character id=script-data-double-escape-start-state:next-input-character>next input character</a>:</p> 2798 2799 <dl class=switch><dt>U+0009 CHARACTER TABULATION (tab)<dt>U+000A LINE FEED (LF)<dt>U+000C FORM FEED (FF)<dt>U+0020 SPACE<dt>U+002F SOLIDUS (/)<dt>U+003E GREATER-THAN SIGN (>)<dd>If the <var id=script-data-double-escape-start-state:temporary-buffer><a href=#temporary-buffer>temporary buffer</a></var> is the string "<code>script</code>", then switch to the <a href=#script-data-double-escaped-state id=script-data-double-escape-start-state:script-data-double-escaped-state>script data double escaped state</a>. 2800 Otherwise, switch to the <a href=#script-data-escaped-state id=script-data-double-escape-start-state:script-data-escaped-state>script data escaped state</a>. Emit the <a href=#current-input-character id=script-data-double-escape-start-state:current-input-character>current input 2801 character</a> as a character token.<dt><a href=infrastructure.html#uppercase-ascii-letters id=script-data-double-escape-start-state:uppercase-ascii-letters>Uppercase ASCII letter</a><dd>Append the lowercase version of the <a href=#current-input-character id=script-data-double-escape-start-state:current-input-character-2>current input character</a> (add 0x0020 to the 2802 character's code point) to the <var id=script-data-double-escape-start-state:temporary-buffer-2><a href=#temporary-buffer>temporary buffer</a></var>. Emit the 2803 <a href=#current-input-character id=script-data-double-escape-start-state:current-input-character-3>current input character</a> as a character token.<dt><a href=infrastructure.html#lowercase-ascii-letters id=script-data-double-escape-start-state:lowercase-ascii-letters>Lowercase ASCII letter</a><dd>Append the <a href=#current-input-character id=script-data-double-escape-start-state:current-input-character-4>current input character</a> to the <var id=script-data-double-escape-start-state:temporary-buffer-3><a href=#temporary-buffer>temporary buffer</a></var>. Emit the <a href=#current-input-character id=script-data-double-escape-start-state:current-input-character-5>current input character</a> as a character 2804 token.<dt>Anything else<dd>Switch to the <a href=#script-data-escaped-state id=script-data-double-escape-start-state:script-data-escaped-state-2>script data escaped state</a>. Reconsume the <a href=#current-input-character id=script-data-double-escape-start-state:current-input-character-6>current input 2805 character</a>.</dl> 2806 2807 2808 <h5 id=script-data-double-escaped-state>12.2.4.29 <dfn>Script data double escaped state</dfn></h5> 2809 2810 <p>Consume the <a href=#next-input-character id=script-data-double-escaped-state:next-input-character>next input character</a>:</p> 2811 2812 <dl class=switch><dt>U+002D HYPHEN-MINUS (-)<dd>Switch to the <a href=#script-data-double-escaped-dash-state id=script-data-double-escaped-state:script-data-double-escaped-dash-state>script data double escaped dash state</a>. Emit a U+002D HYPHEN-MINUS 2813 character token.<dt>U+003C LESS-THAN SIGN (<)<dd>Switch to the <a href=#script-data-double-escaped-less-than-sign-state id=script-data-double-escaped-state:script-data-double-escaped-less-than-sign-state>script data double escaped less-than sign state</a>. Emit a U+003C 2814 LESS-THAN SIGN character token.<dt>U+0000 NULL<dd><a href=#parse-error id=script-data-double-escaped-state:parse-error>Parse error</a>. Emit a U+FFFD REPLACEMENT CHARACTER character token.<dt>EOF<dd><a href=#parse-error id=script-data-double-escaped-state:parse-error-2>Parse error</a>. Switch to the <a href=#data-state id=script-data-double-escaped-state:data-state>data state</a>. Reconsume the EOF 2815 character.<dt>Anything else<dd>Emit the <a href=#current-input-character id=script-data-double-escaped-state:current-input-character>current input character</a> as a character token.</dl> 2816 2817 2818 <h5 id=script-data-double-escaped-dash-state>12.2.4.30 <dfn>Script data double escaped dash state</dfn></h5> 2819 2820 <p>Consume the <a href=#next-input-character id=script-data-double-escaped-dash-state:next-input-character>next input character</a>:</p> 2821 2822 <dl class=switch><dt>U+002D HYPHEN-MINUS (-)<dd>Switch to the <a href=#script-data-double-escaped-dash-dash-state id=script-data-double-escaped-dash-state:script-data-double-escaped-dash-dash-state>script data double escaped dash dash state</a>. Emit a U+002D 2823 HYPHEN-MINUS character token.<dt>U+003C LESS-THAN SIGN (<)<dd>Switch to the <a href=#script-data-double-escaped-less-than-sign-state id=script-data-double-escaped-dash-state:script-data-double-escaped-less-than-sign-state>script data double escaped less-than sign state</a>. Emit a U+003C 2824 LESS-THAN SIGN character token.<dt>U+0000 NULL<dd><a href=#parse-error id=script-data-double-escaped-dash-state:parse-error>Parse error</a>. Switch to the <a href=#script-data-double-escaped-state id=script-data-double-escaped-dash-state:script-data-double-escaped-state>script data double escaped state</a>. Emit a 2825 U+FFFD REPLACEMENT CHARACTER character token.<dt>EOF<dd><a href=#parse-error id=script-data-double-escaped-dash-state:parse-error-2>Parse error</a>. Switch to the <a href=#data-state id=script-data-double-escaped-dash-state:data-state>data state</a>. Reconsume the EOF 2826 character.<dt>Anything else<dd>Switch to the <a href=#script-data-double-escaped-state id=script-data-double-escaped-dash-state:script-data-double-escaped-state-2>script data double escaped state</a>. Emit the <a href=#current-input-character id=script-data-double-escaped-dash-state:current-input-character>current input 2827 character</a> as a character token.</dl> 2828 2829 2830 <h5 id=script-data-double-escaped-dash-dash-state>12.2.4.31 <dfn>Script data double escaped dash dash state</dfn></h5> 2831 2832 <p>Consume the <a href=#next-input-character id=script-data-double-escaped-dash-dash-state:next-input-character>next input character</a>:</p> 2833 2834 <dl class=switch><dt>U+002D HYPHEN-MINUS (-)<dd>Emit a U+002D HYPHEN-MINUS character token.<dt>U+003C LESS-THAN SIGN (<)<dd>Switch to the <a href=#script-data-double-escaped-less-than-sign-state id=script-data-double-escaped-dash-dash-state:script-data-double-escaped-less-than-sign-state>script data double escaped less-than sign state</a>. Emit a U+003C 2835 LESS-THAN SIGN character token.<dt>U+003E GREATER-THAN SIGN (>)<dd>Switch to the <a href=#script-data-state id=script-data-double-escaped-dash-dash-state:script-data-state>script data state</a>. Emit a U+003E GREATER-THAN SIGN character 2836 token.<dt>U+0000 NULL<dd><a href=#parse-error id=script-data-double-escaped-dash-dash-state:parse-error>Parse error</a>. Switch to the <a href=#script-data-double-escaped-state id=script-data-double-escaped-dash-dash-state:script-data-double-escaped-state>script data double escaped state</a>. Emit a 2837 U+FFFD REPLACEMENT CHARACTER character token.<dt>EOF<dd><a href=#parse-error id=script-data-double-escaped-dash-dash-state:parse-error-2>Parse error</a>. Switch to the <a href=#data-state id=script-data-double-escaped-dash-dash-state:data-state>data state</a>. Reconsume the EOF 2838 character.<dt>Anything else<dd>Switch to the <a href=#script-data-double-escaped-state id=script-data-double-escaped-dash-dash-state:script-data-double-escaped-state-2>script data double escaped state</a>. Emit the <a href=#current-input-character id=script-data-double-escaped-dash-dash-state:current-input-character>current input 2839 character</a> as a character token.</dl> 2840 2841 2842 <h5 id=script-data-double-escaped-less-than-sign-state>12.2.4.32 <dfn>Script data double escaped less-than sign state</dfn></h5> 2843 2844 <p>Consume the <a href=#next-input-character id=script-data-double-escaped-less-than-sign-state:next-input-character>next input character</a>:</p> 2845 2846 <dl class=switch><dt>U+002F SOLIDUS (/)<dd>Set the <var id=script-data-double-escaped-less-than-sign-state:temporary-buffer><a href=#temporary-buffer>temporary buffer</a></var> to the empty string. Switch to 2847 the <a href=#script-data-double-escape-end-state id=script-data-double-escaped-less-than-sign-state:script-data-double-escape-end-state>script data double escape end state</a>. Emit a U+002F SOLIDUS character token.<dt>Anything else<dd>Switch to the <a href=#script-data-double-escaped-state id=script-data-double-escaped-less-than-sign-state:script-data-double-escaped-state>script data double escaped state</a>. Reconsume the <a href=#current-input-character id=script-data-double-escaped-less-than-sign-state:current-input-character>current 2848 input character</a>.</dl> 2849 2850 2851 <h5 id=script-data-double-escape-end-state>12.2.4.33 <dfn>Script data double escape end state</dfn></h5> 2852 2853 <p>Consume the <a href=#next-input-character id=script-data-double-escape-end-state:next-input-character>next input character</a>:</p> 2854 2855 <dl class=switch><dt>U+0009 CHARACTER TABULATION (tab)<dt>U+000A LINE FEED (LF)<dt>U+000C FORM FEED (FF)<dt>U+0020 SPACE<dt>U+002F SOLIDUS (/)<dt>U+003E GREATER-THAN SIGN (>)<dd>If the <var id=script-data-double-escape-end-state:temporary-buffer><a href=#temporary-buffer>temporary buffer</a></var> is the string "<code>script</code>", then switch to the <a href=#script-data-escaped-state id=script-data-double-escape-end-state:script-data-escaped-state>script data escaped state</a>. Otherwise, 2856 switch to the <a href=#script-data-double-escaped-state id=script-data-double-escape-end-state:script-data-double-escaped-state>script data double escaped state</a>. Emit the <a href=#current-input-character id=script-data-double-escape-end-state:current-input-character>current input 2857 character</a> as a character token.<dt><a href=infrastructure.html#uppercase-ascii-letters id=script-data-double-escape-end-state:uppercase-ascii-letters>Uppercase ASCII letter</a><dd>Append the lowercase version of the <a href=#current-input-character id=script-data-double-escape-end-state:current-input-character-2>current input character</a> (add 0x0020 to the 2858 character's code point) to the <var id=script-data-double-escape-end-state:temporary-buffer-2><a href=#temporary-buffer>temporary buffer</a></var>. Emit the 2859 <a href=#current-input-character id=script-data-double-escape-end-state:current-input-character-3>current input character</a> as a character token.<dt><a href=infrastructure.html#lowercase-ascii-letters id=script-data-double-escape-end-state:lowercase-ascii-letters>Lowercase ASCII letter</a><dd>Append the <a href=#current-input-character id=script-data-double-escape-end-state:current-input-character-4>current input character</a> to the <var id=script-data-double-escape-end-state:temporary-buffer-3><a href=#temporary-buffer>temporary buffer</a></var>. Emit the <a href=#current-input-character id=script-data-double-escape-end-state:current-input-character-5>current input character</a> as a character 2860 token.<dt>Anything else<dd>Switch to the <a href=#script-data-double-escaped-state id=script-data-double-escape-end-state:script-data-double-escaped-state-2>script data double escaped state</a>. Reconsume the <a href=#current-input-character id=script-data-double-escape-end-state:current-input-character-6>current 2861 input character</a>.</dl> 2862 2863 2864 <h5 id=before-attribute-name-state>12.2.4.34 <dfn>Before attribute name state</dfn></h5> 2865 2866 <p>Consume the <a href=#next-input-character id=before-attribute-name-state:next-input-character>next input character</a>:</p> 2867 2868 <dl class=switch><dt>U+0009 CHARACTER TABULATION (tab)<dt>U+000A LINE FEED (LF)<dt>U+000C FORM FEED (FF)<dt>U+0020 SPACE<dd>Ignore the character.<dt>U+002F SOLIDUS (/)<dd>Switch to the <a href=#self-closing-start-tag-state id=before-attribute-name-state:self-closing-start-tag-state>self-closing start tag state</a>.<dt>U+003E GREATER-THAN SIGN (>)<dd>Switch to the <a href=#data-state id=before-attribute-name-state:data-state>data state</a>. Emit the current tag token.<dt><a href=infrastructure.html#uppercase-ascii-letters id=before-attribute-name-state:uppercase-ascii-letters>Uppercase ASCII letter</a><dd>Start a new attribute in the current tag token. Set that attribute's name to the lowercase 2869 version of the <a href=#current-input-character id=before-attribute-name-state:current-input-character>current input character</a> (add 0x0020 to the character's code point), 2870 and its value to the empty string. Switch to the <a href=#attribute-name-state id=before-attribute-name-state:attribute-name-state>attribute name state</a>.<dt>U+0000 NULL<dd><a href=#parse-error id=before-attribute-name-state:parse-error>Parse error</a>. Start a new attribute in the current tag token. Set that 2871 attribute's name to a U+FFFD REPLACEMENT CHARACTER character, and its value to the empty string. 2872 Switch to the <a href=#attribute-name-state id=before-attribute-name-state:attribute-name-state-2>attribute name state</a>.<dt>U+0022 QUOTATION MARK (")<dt>U+0027 APOSTROPHE (')<dt>U+003C LESS-THAN SIGN (<)<dt>U+003D EQUALS SIGN (=)<dd><a href=#parse-error id=before-attribute-name-state:parse-error-2>Parse error</a>. Treat it as per the "anything else" entry below.<dt>EOF<dd><a href=#parse-error id=before-attribute-name-state:parse-error-3>Parse error</a>. Switch to the <a href=#data-state id=before-attribute-name-state:data-state-2>data state</a>. Reconsume the EOF 2873 character.<dt>Anything else<dd>Start a new attribute in the current tag token. Set that attribute's name to the 2874 <a href=#current-input-character id=before-attribute-name-state:current-input-character-2>current input character</a>, and its value to the empty string. Switch to the 2875 <a href=#attribute-name-state id=before-attribute-name-state:attribute-name-state-3>attribute name state</a>.</dl> 2876 2877 2878 <h5 id=attribute-name-state>12.2.4.35 <dfn>Attribute name state</dfn></h5> 2879 2880 <p>Consume the <a href=#next-input-character id=attribute-name-state:next-input-character>next input character</a>:</p> 2881 2882 <dl class=switch><dt>U+0009 CHARACTER TABULATION (tab)<dt>U+000A LINE FEED (LF)<dt>U+000C FORM FEED (FF)<dt>U+0020 SPACE<dd>Switch to the <a href=#after-attribute-name-state id=attribute-name-state:after-attribute-name-state>after attribute name state</a>.<dt>U+002F SOLIDUS (/)<dd>Switch to the <a href=#self-closing-start-tag-state id=attribute-name-state:self-closing-start-tag-state>self-closing start tag state</a>.<dt>U+003D EQUALS SIGN (=)<dd>Switch to the <a href=#before-attribute-value-state id=attribute-name-state:before-attribute-value-state>before attribute value state</a>.<dt>U+003E GREATER-THAN SIGN (>)<dd>Switch to the <a href=#data-state id=attribute-name-state:data-state>data state</a>. Emit the current tag token.<dt><a href=infrastructure.html#uppercase-ascii-letters id=attribute-name-state:uppercase-ascii-letters>Uppercase ASCII letter</a><dd>Append the lowercase version of the <a href=#current-input-character id=attribute-name-state:current-input-character>current input character</a> (add 0x0020 to the 2883 character's code point) to the current attribute's name.<dt>U+0000 NULL<dd><a href=#parse-error id=attribute-name-state:parse-error>Parse error</a>. Append a U+FFFD REPLACEMENT CHARACTER character to the current 2884 attribute's name.<dt>U+0022 QUOTATION MARK (")<dt>U+0027 APOSTROPHE (')<dt>U+003C LESS-THAN SIGN (<)<dd><a href=#parse-error id=attribute-name-state:parse-error-2>Parse error</a>. Treat it as per the "anything else" entry below.<dt>EOF<dd><a href=#parse-error id=attribute-name-state:parse-error-3>Parse error</a>. Switch to the <a href=#data-state id=attribute-name-state:data-state-2>data state</a>. Reconsume the EOF 2885 character.<dt>Anything else<dd>Append the <a href=#current-input-character id=attribute-name-state:current-input-character-2>current input character</a> to the current attribute's name.</dl> 2886 2887 <p>When the user agent leaves the attribute name state (and before emitting the tag token, if 2888 appropriate), the complete attribute's name must be compared to the other attributes on the same 2889 token; if there is already an attribute on the token with the exact same name, then this is a 2890 <a href=#parse-error id=attribute-name-state:parse-error-4>parse error</a> and the new attribute must be removed from the token.</p> 2891 2892 <p class=note>If an attribute is so removed from a token, it, and the value that gets associated 2893 with it, if any, are never subsequently used by the parser, and are therefore effectively 2894 discarded. Removing the attribute in this way does not change its status as the "current 2895 attribute" for the purposes of the tokenizer, however.</p> 2896 2897 2898 <h5 id=after-attribute-name-state>12.2.4.36 <dfn>After attribute name state</dfn></h5> 2899 2900 <p>Consume the <a href=#next-input-character id=after-attribute-name-state:next-input-character>next input character</a>:</p> 2901 2902 <dl class=switch><dt>U+0009 CHARACTER TABULATION (tab)<dt>U+000A LINE FEED (LF)<dt>U+000C FORM FEED (FF)<dt>U+0020 SPACE<dd>Ignore the character.<dt>U+002F SOLIDUS (/)<dd>Switch to the <a href=#self-closing-start-tag-state id=after-attribute-name-state:self-closing-start-tag-state>self-closing start tag state</a>.<dt>U+003D EQUALS SIGN (=)<dd>Switch to the <a href=#before-attribute-value-state id=after-attribute-name-state:before-attribute-value-state>before attribute value state</a>.<dt>U+003E GREATER-THAN SIGN (>)<dd>Switch to the <a href=#data-state id=after-attribute-name-state:data-state>data state</a>. Emit the current tag token.<dt><a href=infrastructure.html#uppercase-ascii-letters id=after-attribute-name-state:uppercase-ascii-letters>Uppercase ASCII letter</a><dd>Start a new attribute in the current tag token. Set that attribute's name to the lowercase 2903 version of the <a href=#current-input-character id=after-attribute-name-state:current-input-character>current input character</a> (add 0x0020 to the character's code point), 2904 and its value to the empty string. Switch to the <a href=#attribute-name-state id=after-attribute-name-state:attribute-name-state>attribute name state</a>.<dt>U+0000 NULL<dd><a href=#parse-error id=after-attribute-name-state:parse-error>Parse error</a>. Start a new attribute in the current tag token. Set that 2905 attribute's name to a U+FFFD REPLACEMENT CHARACTER character, and its value to the empty string. 2906 Switch to the <a href=#attribute-name-state id=after-attribute-name-state:attribute-name-state-2>attribute name state</a>.<dt>U+0022 QUOTATION MARK (")<dt>U+0027 APOSTROPHE (')<dt>U+003C LESS-THAN SIGN (<)<dd><a href=#parse-error id=after-attribute-name-state:parse-error-2>Parse error</a>. Treat it as per the "anything else" entry below.<dt>EOF<dd><a href=#parse-error id=after-attribute-name-state:parse-error-3>Parse error</a>. Switch to the <a href=#data-state id=after-attribute-name-state:data-state-2>data state</a>. Reconsume the EOF 2907 character.<dt>Anything else<dd>Start a new attribute in the current tag token. Set that attribute's name to the 2908 <a href=#current-input-character id=after-attribute-name-state:current-input-character-2>current input character</a>, and its value to the empty string. Switch to the 2909 <a href=#attribute-name-state id=after-attribute-name-state:attribute-name-state-3>attribute name state</a>.</dl> 2910 2911 2912 <h5 id=before-attribute-value-state>12.2.4.37 <dfn>Before attribute value state</dfn></h5> 2913 2914 <p>Consume the <a href=#next-input-character id=before-attribute-value-state:next-input-character>next input character</a>:</p> 2915 2916 <dl class=switch><dt>U+0009 CHARACTER TABULATION (tab)<dt>U+000A LINE FEED (LF)<dt>U+000C FORM FEED (FF)<dt>U+0020 SPACE<dd>Ignore the character.<dt>U+0022 QUOTATION MARK (")<dd>Switch to the <a href=#attribute-value-(double-quoted)-state id=before-attribute-value-state:attribute-value-(double-quoted)-state>attribute value (double-quoted) state</a>.<dt>U+0026 AMPERSAND (&)<dd>Switch to the <a href=#attribute-value-(unquoted)-state id=before-attribute-value-state:attribute-value-(unquoted)-state>attribute value (unquoted) state</a>. Reconsume the <a href=#current-input-character id=before-attribute-value-state:current-input-character>current 2917 input character</a>.<dt>U+0027 APOSTROPHE (')<dd>Switch to the <a href=#attribute-value-(single-quoted)-state id=before-attribute-value-state:attribute-value-(single-quoted)-state>attribute value (single-quoted) state</a>.<dt>U+0000 NULL<dd><a href=#parse-error id=before-attribute-value-state:parse-error>Parse error</a>. Append a U+FFFD REPLACEMENT CHARACTER character to the current 2918 attribute's value. Switch to the <a href=#attribute-value-(unquoted)-state id=before-attribute-value-state:attribute-value-(unquoted)-state-2>attribute value (unquoted) state</a>.<dt>U+003E GREATER-THAN SIGN (>)<dd><a href=#parse-error id=before-attribute-value-state:parse-error-2>Parse error</a>. Switch to the <a href=#data-state id=before-attribute-value-state:data-state>data state</a>. Emit the current tag 2919 token.<dt>U+003C LESS-THAN SIGN (<)<dt>U+003D EQUALS SIGN (=)<dt>U+0060 GRAVE ACCENT (`)<dd><a href=#parse-error id=before-attribute-value-state:parse-error-3>Parse error</a>. Treat it as per the "anything else" entry below.<dt>EOF<dd><a href=#parse-error id=before-attribute-value-state:parse-error-4>Parse error</a>. Switch to the <a href=#data-state id=before-attribute-value-state:data-state-2>data state</a>. Reconsume the EOF 2920 character.<dt>Anything else<dd>Append the <a href=#current-input-character id=before-attribute-value-state:current-input-character-2>current input character</a> to the current attribute's value. Switch to 2921 the <a href=#attribute-value-(unquoted)-state id=before-attribute-value-state:attribute-value-(unquoted)-state-3>attribute value (unquoted) state</a>.</dl> 2922 2923 2924 <h5 id=attribute-value-(double-quoted)-state>12.2.4.38 <dfn>Attribute value (double-quoted) state</dfn></h5> 2925 2926 <p>Consume the <a href=#next-input-character id=attribute-value-(double-quoted)-state:next-input-character>next input character</a>:</p> 2927 2928 <dl class=switch><dt>U+0022 QUOTATION MARK (")<dd>Switch to the <a href=#after-attribute-value-(quoted)-state id=attribute-value-(double-quoted)-state:after-attribute-value-(quoted)-state>after attribute value (quoted) state</a>.<dt>U+0026 AMPERSAND (&)<dd>Switch to the <a href=#character-reference-in-attribute-value-state id=attribute-value-(double-quoted)-state:character-reference-in-attribute-value-state>character reference in attribute value state</a>, with the 2929 <a href=#additional-allowed-character id=attribute-value-(double-quoted)-state:additional-allowed-character>additional allowed character</a> being U+0022 QUOTATION MARK (").<dt>U+0000 NULL<dd><a href=#parse-error id=attribute-value-(double-quoted)-state:parse-error>Parse error</a>. Append a U+FFFD REPLACEMENT CHARACTER character to the current 2930 attribute's value.<dt>EOF<dd><a href=#parse-error id=attribute-value-(double-quoted)-state:parse-error-2>Parse error</a>. Switch to the <a href=#data-state id=attribute-value-(double-quoted)-state:data-state>data state</a>. Reconsume the EOF 2931 character.<dt>Anything else<dd>Append the <a href=#current-input-character id=attribute-value-(double-quoted)-state:current-input-character>current input character</a> to the current attribute's value.</dl> 2932 2933 2934 <h5 id=attribute-value-(single-quoted)-state>12.2.4.39 <dfn>Attribute value (single-quoted) state</dfn></h5> 2935 2936 <p>Consume the <a href=#next-input-character id=attribute-value-(single-quoted)-state:next-input-character>next input character</a>:</p> 2937 2938 <dl class=switch><dt>U+0027 APOSTROPHE (')<dd>Switch to the <a href=#after-attribute-value-(quoted)-state id=attribute-value-(single-quoted)-state:after-attribute-value-(quoted)-state>after attribute value (quoted) state</a>.<dt>U+0026 AMPERSAND (&)<dd>Switch to the <a href=#character-reference-in-attribute-value-state id=attribute-value-(single-quoted)-state:character-reference-in-attribute-value-state>character reference in attribute value state</a>, with the 2939 <a href=#additional-allowed-character id=attribute-value-(single-quoted)-state:additional-allowed-character>additional allowed character</a> being U+0027 APOSTROPHE (').<dt>U+0000 NULL<dd><a href=#parse-error id=attribute-value-(single-quoted)-state:parse-error>Parse error</a>. Append a U+FFFD REPLACEMENT CHARACTER character to the current 2940 attribute's value.<dt>EOF<dd><a href=#parse-error id=attribute-value-(single-quoted)-state:parse-error-2>Parse error</a>. Switch to the <a href=#data-state id=attribute-value-(single-quoted)-state:data-state>data state</a>. Reconsume the EOF 2941 character.<dt>Anything else<dd>Append the <a href=#current-input-character id=attribute-value-(single-quoted)-state:current-input-character>current input character</a> to the current attribute's value.</dl> 2942 2943 2944 <h5 id=attribute-value-(unquoted)-state>12.2.4.40 <dfn>Attribute value (unquoted) state</dfn></h5> 2945 2946 <p>Consume the <a href=#next-input-character id=attribute-value-(unquoted)-state:next-input-character>next input character</a>:</p> 2947 2948 <dl class=switch><dt>U+0009 CHARACTER TABULATION (tab)<dt>U+000A LINE FEED (LF)<dt>U+000C FORM FEED (FF)<dt>U+0020 SPACE<dd>Switch to the <a href=#before-attribute-name-state id=attribute-value-(unquoted)-state:before-attribute-name-state>before attribute name state</a>.<dt>U+0026 AMPERSAND (&)<dd>Switch to the <a href=#character-reference-in-attribute-value-state id=attribute-value-(unquoted)-state:character-reference-in-attribute-value-state>character reference in attribute value state</a>, with the 2949 <a href=#additional-allowed-character id=attribute-value-(unquoted)-state:additional-allowed-character>additional allowed character</a> being U+003E GREATER-THAN SIGN (>).<dt>U+003E GREATER-THAN SIGN (>)<dd>Switch to the <a href=#data-state id=attribute-value-(unquoted)-state:data-state>data state</a>. Emit the current tag token.<dt>U+0000 NULL<dd><a href=#parse-error id=attribute-value-(unquoted)-state:parse-error>Parse error</a>. Append a U+FFFD REPLACEMENT CHARACTER character to the current 2950 attribute's value.<dt>U+0022 QUOTATION MARK (")<dt>U+0027 APOSTROPHE (')<dt>U+003C LESS-THAN SIGN (<)<dt>U+003D EQUALS SIGN (=)<dt>U+0060 GRAVE ACCENT (`)<dd><a href=#parse-error id=attribute-value-(unquoted)-state:parse-error-2>Parse error</a>. Treat it as per the "anything else" entry below.<dt>EOF<dd><a href=#parse-error id=attribute-value-(unquoted)-state:parse-error-3>Parse error</a>. Switch to the <a href=#data-state id=attribute-value-(unquoted)-state:data-state-2>data state</a>. Reconsume the EOF 2951 character.<dt>Anything else<dd>Append the <a href=#current-input-character id=attribute-value-(unquoted)-state:current-input-character>current input character</a> to the current attribute's value.</dl> 2952 2953 2954 <h5 id=character-reference-in-attribute-value-state>12.2.4.41 <dfn>Character reference in attribute value state</dfn></h5> 2955 2956 <p>Attempt to <a href=#consume-a-character-reference id=character-reference-in-attribute-value-state:consume-a-character-reference>consume a character reference</a>.</p> 2957 2958 <p>If nothing is returned, append a U+0026 AMPERSAND character (&) to the current attribute's 2959 value.</p> 2960 2961 <p>Otherwise, append the returned character tokens to the current attribute's value.</p> 2962 2963 <p>Finally, switch back to the attribute value state that switched into this state.</p> 2964 2965 2966 <h5 id=after-attribute-value-(quoted)-state>12.2.4.42 <dfn>After attribute value (quoted) state</dfn></h5> 2967 2968 <p>Consume the <a href=#next-input-character id=after-attribute-value-(quoted)-state:next-input-character>next input character</a>:</p> 2969 2970 <dl class=switch><dt>U+0009 CHARACTER TABULATION (tab)<dt>U+000A LINE FEED (LF)<dt>U+000C FORM FEED (FF)<dt>U+0020 SPACE<dd>Switch to the <a href=#before-attribute-name-state id=after-attribute-value-(quoted)-state:before-attribute-name-state>before attribute name state</a>.<dt>U+002F SOLIDUS (/)<dd>Switch to the <a href=#self-closing-start-tag-state id=after-attribute-value-(quoted)-state:self-closing-start-tag-state>self-closing start tag state</a>.<dt>U+003E GREATER-THAN SIGN (>)<dd>Switch to the <a href=#data-state id=after-attribute-value-(quoted)-state:data-state>data state</a>. Emit the current tag token.<dt>EOF<dd><a href=#parse-error id=after-attribute-value-(quoted)-state:parse-error>Parse error</a>. Switch to the <a href=#data-state id=after-attribute-value-(quoted)-state:data-state-2>data state</a>. Reconsume the EOF 2971 character.<dt>Anything else<dd><a href=#parse-error id=after-attribute-value-(quoted)-state:parse-error-2>Parse error</a>. Switch to the <a href=#before-attribute-name-state id=after-attribute-value-(quoted)-state:before-attribute-name-state-2>before attribute name state</a>. Reconsume 2972 the character.</dl> 2973 2974 2975 <h5 id=self-closing-start-tag-state>12.2.4.43 <dfn>Self-closing start tag state</dfn></h5> 2976 2977 <p>Consume the <a href=#next-input-character id=self-closing-start-tag-state:next-input-character>next input character</a>:</p> 2978 2979 <dl class=switch><dt>U+003E GREATER-THAN SIGN (>)<dd>Set the <i id=self-closing-start-tag-state:self-closing-flag><a href=#self-closing-flag>self-closing flag</a></i> of the current tag token. Switch to the <a href=#data-state id=self-closing-start-tag-state:data-state>data 2980 state</a>. Emit the current tag token.<dt>EOF<dd><a href=#parse-error id=self-closing-start-tag-state:parse-error>Parse error</a>. Switch to the <a href=#data-state id=self-closing-start-tag-state:data-state-2>data state</a>. Reconsume the EOF 2981 character.<dt>Anything else<dd><a href=#parse-error id=self-closing-start-tag-state:parse-error-2>Parse error</a>. Switch to the <a href=#before-attribute-name-state id=self-closing-start-tag-state:before-attribute-name-state>before attribute name state</a>. Reconsume 2982 the character.</dl> 2983 2984 2985 <h5 id=bogus-comment-state>12.2.4.44 <dfn>Bogus comment state</dfn></h5> 2986 2987 <p>Consume every character up to and including the first U+003E GREATER-THAN SIGN character (>) 2988 or the end of the file (EOF), whichever comes first. 2989 If more than one character was consumed, then emit a comment token whose data is the 2990 concatenation of all the characters starting from and including the character that caused the 2991 state machine to switch into the bogus comment state, up to and including the character 2992 immediately before the last consumed character (i.e. up to the character just before the U+003E or 2993 EOF character), but with any U+0000 NULL characters replaced by U+FFFD REPLACEMENT CHARACTER 2994 characters. (If the comment was started by the end of the file (EOF), the token is empty. 2995 Similarly, the token is empty if it was generated by the string "<code><!></code>".)</p> 2996 2997 <p>Switch to the <a href=#data-state id=bogus-comment-state:data-state>data state</a>.</p> 2998 2999 <p>If the end of the file was reached, reconsume the EOF character.</p> 3000 3001 3002 <h5 id=markup-declaration-open-state>12.2.4.45 <dfn>Markup declaration open state</dfn></h5> 3003 3004 <p>If the next two characters are both U+002D HYPHEN-MINUS characters (-), consume those two 3005 characters, create a comment token whose data is the empty string, and switch to the <a href=#comment-start-state id=markup-declaration-open-state:comment-start-state>comment 3006 start state</a>.</p> 3007 3008 <p>Otherwise, if the next seven characters are an <a id=markup-declaration-open-state:ascii-case-insensitive href=infrastructure.html#ascii-case-insensitive>ASCII case-insensitive</a> match for 3009 the word "DOCTYPE", then consume those characters and switch to the <a href=#doctype-state id=markup-declaration-open-state:doctype-state>DOCTYPE 3010 state</a>.</p> 3011 3012 <p>Otherwise, if there is an <a href=#adjusted-current-node id=markup-declaration-open-state:adjusted-current-node>adjusted current node</a> and it is not an element in the 3013 <a id=markup-declaration-open-state:html-namespace-2 href=infrastructure.html#html-namespace-2>HTML namespace</a> and the next seven characters are a <a id=markup-declaration-open-state:case-sensitive href=infrastructure.html#case-sensitive>case-sensitive</a> match 3014 for the string "[CDATA[" (the five uppercase letters "CDATA" with a U+005B LEFT SQUARE BRACKET 3015 character before and after), then consume those characters and switch to the <a href=#cdata-section-state id=markup-declaration-open-state:cdata-section-state>CDATA section 3016 state</a>.</p> 3017 3018 <p>Otherwise, this is a <a href=#parse-error id=markup-declaration-open-state:parse-error>parse error</a>. Switch to the <a href=#bogus-comment-state id=markup-declaration-open-state:bogus-comment-state>bogus comment state</a>. 3019 The next character that is consumed, if any, is the first character that will be in the 3020 comment.</p> 3021 3022 3023 <h5 id=comment-start-state>12.2.4.46 <dfn>Comment start state</dfn></h5> 3024 3025 <p>Consume the <a href=#next-input-character id=comment-start-state:next-input-character>next input character</a>:</p> 3026 3027 <dl class=switch><dt>U+002D HYPHEN-MINUS (-)<dd>Switch to the <a href=#comment-start-dash-state id=comment-start-state:comment-start-dash-state>comment start dash state</a>.<dt>U+0000 NULL<dd><a href=#parse-error id=comment-start-state:parse-error>Parse error</a>. Append a U+FFFD REPLACEMENT CHARACTER character to the comment 3028 token's data. Switch to the <a href=#comment-state id=comment-start-state:comment-state>comment state</a>.<dt>U+003E GREATER-THAN SIGN (>)<dd><a href=#parse-error id=comment-start-state:parse-error-2>Parse error</a>. Switch to the <a href=#data-state id=comment-start-state:data-state>data state</a>. Emit the comment token.<dt>EOF<dd><a href=#parse-error id=comment-start-state:parse-error-3>Parse error</a>. Switch to the <a href=#data-state id=comment-start-state:data-state-2>data state</a>. Emit the comment token. 3029 Reconsume the EOF character.<dt>Anything else<dd>Append the <a href=#current-input-character id=comment-start-state:current-input-character>current input character</a> to the comment token's data. Switch to the 3030 <a href=#comment-state id=comment-start-state:comment-state-2>comment state</a>.</dl> 3031 3032 3033 <h5 id=comment-start-dash-state>12.2.4.47 <dfn>Comment start dash state</dfn></h5> 3034 3035 <p>Consume the <a href=#next-input-character id=comment-start-dash-state:next-input-character>next input character</a>:</p> 3036 3037 <dl class=switch><dt>U+002D HYPHEN-MINUS (-)<dd>Switch to the <a href=#comment-end-state id=comment-start-dash-state:comment-end-state>comment end state</a><dt>U+0000 NULL<dd><a href=#parse-error id=comment-start-dash-state:parse-error>Parse error</a>. Append a U+002D HYPHEN-MINUS character (-) and a U+FFFD REPLACEMENT 3038 CHARACTER character to the comment token's data. Switch to the <a href=#comment-state id=comment-start-dash-state:comment-state>comment state</a>.<dt>U+003E GREATER-THAN SIGN (>)<dd><a href=#parse-error id=comment-start-dash-state:parse-error-2>Parse error</a>. Switch to the <a href=#data-state id=comment-start-dash-state:data-state>data state</a>. Emit the comment token.<dt>EOF<dd><a href=#parse-error id=comment-start-dash-state:parse-error-3>Parse error</a>. Switch to the <a href=#data-state id=comment-start-dash-state:data-state-2>data state</a>. Emit the comment token. 3039 Reconsume the EOF character.<dt>Anything else<dd>Append a U+002D HYPHEN-MINUS character (-) and the <a href=#current-input-character id=comment-start-dash-state:current-input-character>current input character</a> to 3040 the comment token's data. Switch to the <a href=#comment-state id=comment-start-dash-state:comment-state-2>comment state</a>.</dl> 3041 3042 3043 <h5 id=comment-state>12.2.4.48 <dfn id=comment>Comment state</dfn></h5> 3044 3045 <p>Consume the <a href=#next-input-character id=comment-state:next-input-character>next input character</a>:</p> 3046 3047 <dl class=switch><dt>U+002D HYPHEN-MINUS (-)<dd>Switch to the <a href=#comment-end-dash-state id=comment-state:comment-end-dash-state>comment end dash state</a><dt>U+0000 NULL<dd><a href=#parse-error id=comment-state:parse-error>Parse error</a>. Append a U+FFFD REPLACEMENT CHARACTER character to the comment 3048 token's data.<dt>EOF<dd><a href=#parse-error id=comment-state:parse-error-2>Parse error</a>. Switch to the <a href=#data-state id=comment-state:data-state>data state</a>. Emit the comment token. 3049 Reconsume the EOF character.<dt>Anything else<dd>Append the <a href=#current-input-character id=comment-state:current-input-character>current input character</a> to the comment token's data.</dl> 3050 3051 3052 <h5 id=comment-end-dash-state>12.2.4.49 <dfn>Comment end dash state</dfn></h5> 3053 3054 <p>Consume the <a href=#next-input-character id=comment-end-dash-state:next-input-character>next input character</a>:</p> 3055 3056 <dl class=switch><dt>U+002D HYPHEN-MINUS (-)<dd>Switch to the <a href=#comment-end-state id=comment-end-dash-state:comment-end-state>comment end state</a><dt>U+0000 NULL<dd><a href=#parse-error id=comment-end-dash-state:parse-error>Parse error</a>. Append a U+002D HYPHEN-MINUS character (-) and a U+FFFD REPLACEMENT 3057 CHARACTER character to the comment token's data. Switch to the <a href=#comment-state id=comment-end-dash-state:comment-state>comment state</a>.<dt>EOF<dd><a href=#parse-error id=comment-end-dash-state:parse-error-2>Parse error</a>. Switch to the <a href=#data-state id=comment-end-dash-state:data-state>data state</a>. Emit the comment token. 3058 Reconsume the EOF character.<dt>Anything else<dd>Append a U+002D HYPHEN-MINUS character (-) and the <a href=#current-input-character id=comment-end-dash-state:current-input-character>current input character</a> to 3059 the comment token's data. Switch to the <a href=#comment-state id=comment-end-dash-state:comment-state-2>comment state</a>.</dl> 3060 3061 3062 <h5 id=comment-end-state>12.2.4.50 <dfn>Comment end state</dfn></h5> 3063 3064 <p>Consume the <a href=#next-input-character id=comment-end-state:next-input-character>next input character</a>:</p> 3065 3066 <dl class=switch><dt>U+003E GREATER-THAN SIGN (>)<dd>Switch to the <a href=#data-state id=comment-end-state:data-state>data state</a>. Emit the comment token.<dt>U+0000 NULL<dd><a href=#parse-error id=comment-end-state:parse-error>Parse error</a>. Append two U+002D HYPHEN-MINUS characters (-) and a U+FFFD 3067 REPLACEMENT CHARACTER character to the comment token's data. Switch to the <a href=#comment-state id=comment-end-state:comment-state>comment 3068 state</a>.<dt>U+0021 EXCLAMATION MARK (!)<dd><a href=#parse-error id=comment-end-state:parse-error-2>Parse error</a>. Switch to the <a href=#comment-end-bang-state id=comment-end-state:comment-end-bang-state>comment end bang state</a>.<dt>U+002D HYPHEN-MINUS (-)<dd><a href=#parse-error id=comment-end-state:parse-error-3>Parse error</a>. Append a U+002D HYPHEN-MINUS character (-) to the comment token's 3069 data.<dt>EOF<dd><a href=#parse-error id=comment-end-state:parse-error-4>Parse error</a>. Switch to the <a href=#data-state id=comment-end-state:data-state-2>data state</a>. Emit the comment token. 3070 Reconsume the EOF character.<dt>Anything else<dd><a href=#parse-error id=comment-end-state:parse-error-5>Parse error</a>. Append two U+002D HYPHEN-MINUS characters (-) and the <a href=#current-input-character id=comment-end-state:current-input-character>current 3071 input character</a> to the comment token's data. Switch to the <a href=#comment-state id=comment-end-state:comment-state-2>comment 3072 state</a>.</dl> 3073 3074 3075 <h5 id=comment-end-bang-state>12.2.4.51 <dfn>Comment end bang state</dfn></h5> 3076 3077 <p>Consume the <a href=#next-input-character id=comment-end-bang-state:next-input-character>next input character</a>:</p> 3078 3079 <dl class=switch><dt>U+002D HYPHEN-MINUS (-)<dd>Append two U+002D HYPHEN-MINUS characters (-) and a U+0021 EXCLAMATION MARK character (!) to 3080 the comment token's data. Switch to the <a href=#comment-end-dash-state id=comment-end-bang-state:comment-end-dash-state>comment end dash state</a>.<dt>U+003E GREATER-THAN SIGN (>)<dd>Switch to the <a href=#data-state id=comment-end-bang-state:data-state>data state</a>. Emit the comment token.<dt>U+0000 NULL<dd><a href=#parse-error id=comment-end-bang-state:parse-error>Parse error</a>. Append two U+002D HYPHEN-MINUS characters (-), a U+0021 EXCLAMATION 3081 MARK character (!), and a U+FFFD REPLACEMENT CHARACTER character to the comment token's data. 3082 Switch to the <a href=#comment-state id=comment-end-bang-state:comment-state>comment state</a>.<dt>EOF<dd><a href=#parse-error id=comment-end-bang-state:parse-error-2>Parse error</a>. Switch to the <a href=#data-state id=comment-end-bang-state:data-state-2>data state</a>. Emit the comment token. 3083 Reconsume the EOF character.<dt>Anything else<dd>Append two U+002D HYPHEN-MINUS characters (-), a U+0021 EXCLAMATION MARK character (!), and 3084 the <a href=#current-input-character id=comment-end-bang-state:current-input-character>current input character</a> to the comment token's data. Switch to the <a href=#comment-state id=comment-end-bang-state:comment-state-2>comment 3085 state</a>.</dl> 3086 3087 3088 <h5 id=doctype-state>12.2.4.52 <dfn>DOCTYPE state</dfn></h5> 3089 3090 <p>Consume the <a href=#next-input-character id=doctype-state:next-input-character>next input character</a>:</p> 3091 3092 <dl class=switch><dt>U+0009 CHARACTER TABULATION (tab)<dt>U+000A LINE FEED (LF)<dt>U+000C FORM FEED (FF)<dt>U+0020 SPACE<dd>Switch to the <a href=#before-doctype-name-state id=doctype-state:before-doctype-name-state>before DOCTYPE name state</a>.<dt>EOF<dd><a href=#parse-error id=doctype-state:parse-error>Parse error</a>. Switch to the <a href=#data-state id=doctype-state:data-state>data state</a>. Create a new DOCTYPE token. 3093 Set its <i id=doctype-state:force-quirks-flag><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>. Emit the token. Reconsume the EOF character.<dt>Anything else<dd><a href=#parse-error id=doctype-state:parse-error-2>Parse error</a>. Switch to the <a href=#before-doctype-name-state id=doctype-state:before-doctype-name-state-2>before DOCTYPE name state</a>. Reconsume the 3094 character.</dl> 3095 3096 3097 <h5 id=before-doctype-name-state>12.2.4.53 <dfn>Before DOCTYPE name state</dfn></h5> 3098 3099 <p>Consume the <a href=#next-input-character id=before-doctype-name-state:next-input-character>next input character</a>:</p> 3100 3101 <dl class=switch><dt>U+0009 CHARACTER TABULATION (tab)<dt>U+000A LINE FEED (LF)<dt>U+000C FORM FEED (FF)<dt>U+0020 SPACE<dd>Ignore the character.<dt><a href=infrastructure.html#uppercase-ascii-letters id=before-doctype-name-state:uppercase-ascii-letters>Uppercase ASCII letter</a><dd>Create a new DOCTYPE token. Set the token's name to the lowercase version of the 3102 <a href=#current-input-character id=before-doctype-name-state:current-input-character>current input character</a> (add 0x0020 to the character's code point). Switch to the 3103 <a href=#doctype-name-state id=before-doctype-name-state:doctype-name-state>DOCTYPE name state</a>.<dt>U+0000 NULL<dd><a href=#parse-error id=before-doctype-name-state:parse-error>Parse error</a>. Create a new DOCTYPE token. Set the token's name to a U+FFFD 3104 REPLACEMENT CHARACTER character. Switch to the <a href=#doctype-name-state id=before-doctype-name-state:doctype-name-state-2>DOCTYPE name state</a>.<dt>U+003E GREATER-THAN SIGN (>)<dd><a href=#parse-error id=before-doctype-name-state:parse-error-2>Parse error</a>. Create a new DOCTYPE token. Set its <i id=before-doctype-name-state:force-quirks-flag><a href=#force-quirks-flag>force-quirks flag</a></i> to 3105 <i>on</i>. Switch to the <a href=#data-state id=before-doctype-name-state:data-state>data state</a>. Emit the token.<dt>EOF<dd><a href=#parse-error id=before-doctype-name-state:parse-error-3>Parse error</a>. Switch to the <a href=#data-state id=before-doctype-name-state:data-state-2>data state</a>. Create a new DOCTYPE token. 3106 Set its <i id=before-doctype-name-state:force-quirks-flag-2><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>. Emit the token. Reconsume the EOF character.<dt>Anything else<dd>Create a new DOCTYPE token. Set the token's name to the <a href=#current-input-character id=before-doctype-name-state:current-input-character-2>current input character</a>. 3107 Switch to the <a href=#doctype-name-state id=before-doctype-name-state:doctype-name-state-3>DOCTYPE name state</a>.</dl> 3108 3109 3110 <h5 id=doctype-name-state>12.2.4.54 <dfn>DOCTYPE name state</dfn></h5> 3111 3112 <p>Consume the <a href=#next-input-character id=doctype-name-state:next-input-character>next input character</a>:</p> 3113 3114 <dl class=switch><dt>U+0009 CHARACTER TABULATION (tab)<dt>U+000A LINE FEED (LF)<dt>U+000C FORM FEED (FF)<dt>U+0020 SPACE<dd>Switch to the <a href=#after-doctype-name-state id=doctype-name-state:after-doctype-name-state>after DOCTYPE name state</a>.<dt>U+003E GREATER-THAN SIGN (>)<dd>Switch to the <a href=#data-state id=doctype-name-state:data-state>data state</a>. Emit the current DOCTYPE token.<dt><a href=infrastructure.html#uppercase-ascii-letters id=doctype-name-state:uppercase-ascii-letters>Uppercase ASCII letter</a><dd>Append the lowercase version of the <a href=#current-input-character id=doctype-name-state:current-input-character>current input character</a> (add 0x0020 to the 3115 character's code point) to the current DOCTYPE token's name.<dt>U+0000 NULL<dd><a href=#parse-error id=doctype-name-state:parse-error>Parse error</a>. Append a U+FFFD REPLACEMENT CHARACTER character to the current 3116 DOCTYPE token's name.<dt>EOF<dd><a href=#parse-error id=doctype-name-state:parse-error-2>Parse error</a>. Switch to the <a href=#data-state id=doctype-name-state:data-state-2>data state</a>. Set the DOCTYPE token's 3117 <i id=doctype-name-state:force-quirks-flag><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>. Emit that DOCTYPE token. Reconsume the EOF character.<dt>Anything else<dd>Append the <a href=#current-input-character id=doctype-name-state:current-input-character-2>current input character</a> to the current DOCTYPE token's name.</dl> 3118 3119 3120 <h5 id=after-doctype-name-state>12.2.4.55 <dfn>After DOCTYPE name state</dfn></h5> 3121 3122 <p>Consume the <a href=#next-input-character id=after-doctype-name-state:next-input-character>next input character</a>:</p> 3123 3124 <dl class=switch><dt>U+0009 CHARACTER TABULATION (tab)<dt>U+000A LINE FEED (LF)<dt>U+000C FORM FEED (FF)<dt>U+0020 SPACE<dd>Ignore the character.<dt>U+003E GREATER-THAN SIGN (>)<dd>Switch to the <a href=#data-state id=after-doctype-name-state:data-state>data state</a>. Emit the current DOCTYPE token.<dt>EOF<dd><a href=#parse-error id=after-doctype-name-state:parse-error>Parse error</a>. Switch to the <a href=#data-state id=after-doctype-name-state:data-state-2>data state</a>. Set the DOCTYPE token's 3125 <i id=after-doctype-name-state:force-quirks-flag><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>. Emit that DOCTYPE token. Reconsume the EOF character.<dt>Anything else<dd> 3126 3127 <p>If the six characters starting from the <a href=#current-input-character id=after-doctype-name-state:current-input-character>current input character</a> are an 3128 <a id=after-doctype-name-state:ascii-case-insensitive href=infrastructure.html#ascii-case-insensitive>ASCII case-insensitive</a> match for the word "PUBLIC", then consume those characters 3129 and switch to the <a href=#after-doctype-public-keyword-state id=after-doctype-name-state:after-doctype-public-keyword-state>after DOCTYPE public keyword state</a>.</p> 3130 3131 <p>Otherwise, if the six characters starting from the <a href=#current-input-character id=after-doctype-name-state:current-input-character-2>current input character</a> are 3132 an <a id=after-doctype-name-state:ascii-case-insensitive-2 href=infrastructure.html#ascii-case-insensitive>ASCII case-insensitive</a> match for the word "SYSTEM", then consume those 3133 characters and switch to the <a href=#after-doctype-system-keyword-state id=after-doctype-name-state:after-doctype-system-keyword-state>after DOCTYPE system keyword state</a>.</p> 3134 3135 <p>Otherwise, this is a <a href=#parse-error id=after-doctype-name-state:parse-error-2>parse error</a>. Set the DOCTYPE token's <i id=after-doctype-name-state:force-quirks-flag-2><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>. Switch to the <a href=#bogus-doctype-state id=after-doctype-name-state:bogus-doctype-state>bogus DOCTYPE state</a>.</p> 3136 3137 </dl> 3138 3139 3140 <h5 id=after-doctype-public-keyword-state>12.2.4.56 <dfn>After DOCTYPE public keyword state</dfn></h5> 3141 3142 <p>Consume the <a href=#next-input-character id=after-doctype-public-keyword-state:next-input-character>next input character</a>:</p> 3143 3144 <dl class=switch><dt>U+0009 CHARACTER TABULATION (tab)<dt>U+000A LINE FEED (LF)<dt>U+000C FORM FEED (FF)<dt>U+0020 SPACE<dd>Switch to the <a href=#before-doctype-public-identifier-state id=after-doctype-public-keyword-state:before-doctype-public-identifier-state>before DOCTYPE public identifier state</a>.<dt>U+0022 QUOTATION MARK (")<dd><a href=#parse-error id=after-doctype-public-keyword-state:parse-error>Parse error</a>. Set the DOCTYPE token's public identifier to the empty string (not 3145 missing), then switch to the <a href=#doctype-public-identifier-(double-quoted)-state id=after-doctype-public-keyword-state:doctype-public-identifier-(double-quoted)-state>DOCTYPE public identifier (double-quoted) state</a>.<dt>U+0027 APOSTROPHE (')<dd><a href=#parse-error id=after-doctype-public-keyword-state:parse-error-2>Parse error</a>. Set the DOCTYPE token's public identifier to the empty string (not 3146 missing), then switch to the <a href=#doctype-public-identifier-(single-quoted)-state id=after-doctype-public-keyword-state:doctype-public-identifier-(single-quoted)-state>DOCTYPE public identifier (single-quoted) state</a>.<dt>U+003E GREATER-THAN SIGN (>)<dd><a href=#parse-error id=after-doctype-public-keyword-state:parse-error-3>Parse error</a>. Set the DOCTYPE token's <i id=after-doctype-public-keyword-state:force-quirks-flag><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>. 3147 Switch to the <a href=#data-state id=after-doctype-public-keyword-state:data-state>data state</a>. Emit that DOCTYPE token.<dt>EOF<dd><a href=#parse-error id=after-doctype-public-keyword-state:parse-error-4>Parse error</a>. Switch to the <a href=#data-state id=after-doctype-public-keyword-state:data-state-2>data state</a>. Set the DOCTYPE token's 3148 <i id=after-doctype-public-keyword-state:force-quirks-flag-2><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>. Emit that DOCTYPE token. Reconsume the EOF character.<dt>Anything else<dd><a href=#parse-error id=after-doctype-public-keyword-state:parse-error-5>Parse error</a>. Set the DOCTYPE token's <i id=after-doctype-public-keyword-state:force-quirks-flag-3><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>. 3149 Switch to the <a href=#bogus-doctype-state id=after-doctype-public-keyword-state:bogus-doctype-state>bogus DOCTYPE state</a>.</dl> 3150 3151 3152 <h5 id=before-doctype-public-identifier-state>12.2.4.57 <dfn>Before DOCTYPE public identifier state</dfn></h5> 3153 3154 <p>Consume the <a href=#next-input-character id=before-doctype-public-identifier-state:next-input-character>next input character</a>:</p> 3155 3156 <dl class=switch><dt>U+0009 CHARACTER TABULATION (tab)<dt>U+000A LINE FEED (LF)<dt>U+000C FORM FEED (FF)<dt>U+0020 SPACE<dd>Ignore the character.<dt>U+0022 QUOTATION MARK (")<dd>Set the DOCTYPE token's public identifier to the empty string (not missing), then switch to 3157 the <a href=#doctype-public-identifier-(double-quoted)-state id=before-doctype-public-identifier-state:doctype-public-identifier-(double-quoted)-state>DOCTYPE public identifier (double-quoted) state</a>.<dt>U+0027 APOSTROPHE (')<dd>Set the DOCTYPE token's public identifier to the empty string (not missing), then switch to 3158 the <a href=#doctype-public-identifier-(single-quoted)-state id=before-doctype-public-identifier-state:doctype-public-identifier-(single-quoted)-state>DOCTYPE public identifier (single-quoted) state</a>.<dt>U+003E GREATER-THAN SIGN (>)<dd><a href=#parse-error id=before-doctype-public-identifier-state:parse-error>Parse error</a>. Set the DOCTYPE token's <i id=before-doctype-public-identifier-state:force-quirks-flag><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>. 3159 Switch to the <a href=#data-state id=before-doctype-public-identifier-state:data-state>data state</a>. Emit that DOCTYPE token.<dt>EOF<dd><a href=#parse-error id=before-doctype-public-identifier-state:parse-error-2>Parse error</a>. Switch to the <a href=#data-state id=before-doctype-public-identifier-state:data-state-2>data state</a>. Set the DOCTYPE token's 3160 <i id=before-doctype-public-identifier-state:force-quirks-flag-2><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>. Emit that DOCTYPE token. Reconsume the EOF character.<dt>Anything else<dd><a href=#parse-error id=before-doctype-public-identifier-state:parse-error-3>Parse error</a>. Set the DOCTYPE token's <i id=before-doctype-public-identifier-state:force-quirks-flag-3><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>. 3161 Switch to the <a href=#bogus-doctype-state id=before-doctype-public-identifier-state:bogus-doctype-state>bogus DOCTYPE state</a>.</dl> 3162 3163 3164 <h5 id=doctype-public-identifier-(double-quoted)-state>12.2.4.58 <dfn>DOCTYPE public identifier (double-quoted) state</dfn></h5> 3165 3166 <p>Consume the <a href=#next-input-character id=doctype-public-identifier-(double-quoted)-state:next-input-character>next input character</a>:</p> 3167 3168 <dl class=switch><dt>U+0022 QUOTATION MARK (")<dd>Switch to the <a href=#after-doctype-public-identifier-state id=doctype-public-identifier-(double-quoted)-state:after-doctype-public-identifier-state>after DOCTYPE public identifier state</a>.<dt>U+0000 NULL<dd><a href=#parse-error id=doctype-public-identifier-(double-quoted)-state:parse-error>Parse error</a>. Append a U+FFFD REPLACEMENT CHARACTER character to the current 3169 DOCTYPE token's public identifier.<dt>U+003E GREATER-THAN SIGN (>)<dd><a href=#parse-error id=doctype-public-identifier-(double-quoted)-state:parse-error-2>Parse error</a>. Set the DOCTYPE token's <i id=doctype-public-identifier-(double-quoted)-state:force-quirks-flag><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>. 3170 Switch to the <a href=#data-state id=doctype-public-identifier-(double-quoted)-state:data-state>data state</a>. Emit that DOCTYPE token.<dt>EOF<dd><a href=#parse-error id=doctype-public-identifier-(double-quoted)-state:parse-error-3>Parse error</a>. Switch to the <a href=#data-state id=doctype-public-identifier-(double-quoted)-state:data-state-2>data state</a>. Set the DOCTYPE token's 3171 <i id=doctype-public-identifier-(double-quoted)-state:force-quirks-flag-2><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>. Emit that DOCTYPE token. Reconsume the EOF character.<dt>Anything else<dd>Append the <a href=#current-input-character id=doctype-public-identifier-(double-quoted)-state:current-input-character>current input character</a> to the current DOCTYPE token's public 3172 identifier.</dl> 3173 3174 3175 <h5 id=doctype-public-identifier-(single-quoted)-state>12.2.4.59 <dfn>DOCTYPE public identifier (single-quoted) state</dfn></h5> 3176 3177 <p>Consume the <a href=#next-input-character id=doctype-public-identifier-(single-quoted)-state:next-input-character>next input character</a>:</p> 3178 3179 <dl class=switch><dt>U+0027 APOSTROPHE (')<dd>Switch to the <a href=#after-doctype-public-identifier-state id=doctype-public-identifier-(single-quoted)-state:after-doctype-public-identifier-state>after DOCTYPE public identifier state</a>.<dt>U+0000 NULL<dd><a href=#parse-error id=doctype-public-identifier-(single-quoted)-state:parse-error>Parse error</a>. Append a U+FFFD REPLACEMENT CHARACTER character to the current 3180 DOCTYPE token's public identifier.<dt>U+003E GREATER-THAN SIGN (>)<dd><a href=#parse-error id=doctype-public-identifier-(single-quoted)-state:parse-error-2>Parse error</a>. Set the DOCTYPE token's <i id=doctype-public-identifier-(single-quoted)-state:force-quirks-flag><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>. 3181 Switch to the <a href=#data-state id=doctype-public-identifier-(single-quoted)-state:data-state>data state</a>. Emit that DOCTYPE token.<dt>EOF<dd><a href=#parse-error id=doctype-public-identifier-(single-quoted)-state:parse-error-3>Parse error</a>. Switch to the <a href=#data-state id=doctype-public-identifier-(single-quoted)-state:data-state-2>data state</a>. Set the DOCTYPE token's 3182 <i id=doctype-public-identifier-(single-quoted)-state:force-quirks-flag-2><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>. Emit that DOCTYPE token. Reconsume the EOF character.<dt>Anything else<dd>Append the <a href=#current-input-character id=doctype-public-identifier-(single-quoted)-state:current-input-character>current input character</a> to the current DOCTYPE token's public 3183 identifier.</dl> 3184 3185 3186 <h5 id=after-doctype-public-identifier-state>12.2.4.60 <dfn>After DOCTYPE public identifier state</dfn></h5> 3187 3188 <p>Consume the <a href=#next-input-character id=after-doctype-public-identifier-state:next-input-character>next input character</a>:</p> 3189 3190 <dl class=switch><dt>U+0009 CHARACTER TABULATION (tab)<dt>U+000A LINE FEED (LF)<dt>U+000C FORM FEED (FF)<dt>U+0020 SPACE<dd>Switch to the <a href=#between-doctype-public-and-system-identifiers-state id=after-doctype-public-identifier-state:between-doctype-public-and-system-identifiers-state>between DOCTYPE public and system identifiers state</a>.<dt>U+003E GREATER-THAN SIGN (>)<dd>Switch to the <a href=#data-state id=after-doctype-public-identifier-state:data-state>data state</a>. Emit the current DOCTYPE token.<dt>U+0022 QUOTATION MARK (")<dd><a href=#parse-error id=after-doctype-public-identifier-state:parse-error>Parse error</a>. Set the DOCTYPE token's system identifier to the empty string (not 3191 missing), then switch to the <a href=#doctype-system-identifier-(double-quoted)-state id=after-doctype-public-identifier-state:doctype-system-identifier-(double-quoted)-state>DOCTYPE system identifier (double-quoted) state</a>.<dt>U+0027 APOSTROPHE (')<dd><a href=#parse-error id=after-doctype-public-identifier-state:parse-error-2>Parse error</a>. Set the DOCTYPE token's system identifier to the empty string (not 3192 missing), then switch to the <a href=#doctype-system-identifier-(single-quoted)-state id=after-doctype-public-identifier-state:doctype-system-identifier-(single-quoted)-state>DOCTYPE system identifier (single-quoted) state</a>.<dt>EOF<dd><a href=#parse-error id=after-doctype-public-identifier-state:parse-error-3>Parse error</a>. Switch to the <a href=#data-state id=after-doctype-public-identifier-state:data-state-2>data state</a>. Set the DOCTYPE token's 3193 <i id=after-doctype-public-identifier-state:force-quirks-flag><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>. Emit that DOCTYPE token. Reconsume the EOF character.<dt>Anything else<dd><a href=#parse-error id=after-doctype-public-identifier-state:parse-error-4>Parse error</a>. Set the DOCTYPE token's <i id=after-doctype-public-identifier-state:force-quirks-flag-2><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>. 3194 Switch to the <a href=#bogus-doctype-state id=after-doctype-public-identifier-state:bogus-doctype-state>bogus DOCTYPE state</a>.</dl> 3195 3196 3197 <h5 id=between-doctype-public-and-system-identifiers-state>12.2.4.61 <dfn>Between DOCTYPE public and system identifiers state</dfn></h5> 3198 3199 <p>Consume the <a href=#next-input-character id=between-doctype-public-and-system-identifiers-state:next-input-character>next input character</a>:</p> 3200 3201 <dl class=switch><dt>U+0009 CHARACTER TABULATION (tab)<dt>U+000A LINE FEED (LF)<dt>U+000C FORM FEED (FF)<dt>U+0020 SPACE<dd>Ignore the character.<dt>U+003E GREATER-THAN SIGN (>)<dd>Switch to the <a href=#data-state id=between-doctype-public-and-system-identifiers-state:data-state>data state</a>. Emit the current DOCTYPE token.<dt>U+0022 QUOTATION MARK (")<dd>Set the DOCTYPE token's system identifier to the empty string (not missing), then switch to 3202 the <a href=#doctype-system-identifier-(double-quoted)-state id=between-doctype-public-and-system-identifiers-state:doctype-system-identifier-(double-quoted)-state>DOCTYPE system identifier (double-quoted) state</a>.<dt>U+0027 APOSTROPHE (')<dd>Set the DOCTYPE token's system identifier to the empty string (not missing), then switch to 3203 the <a href=#doctype-system-identifier-(single-quoted)-state id=between-doctype-public-and-system-identifiers-state:doctype-system-identifier-(single-quoted)-state>DOCTYPE system identifier (single-quoted) state</a>.<dt>EOF<dd><a href=#parse-error id=between-doctype-public-and-system-identifiers-state:parse-error>Parse error</a>. Switch to the <a href=#data-state id=between-doctype-public-and-system-identifiers-state:data-state-2>data state</a>. Set the DOCTYPE token's 3204 <i id=between-doctype-public-and-system-identifiers-state:force-quirks-flag><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>. Emit that DOCTYPE token. Reconsume the EOF character.<dt>Anything else<dd><a href=#parse-error id=between-doctype-public-and-system-identifiers-state:parse-error-2>Parse error</a>. Set the DOCTYPE token's <i id=between-doctype-public-and-system-identifiers-state:force-quirks-flag-2><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>. 3205 Switch to the <a href=#bogus-doctype-state id=between-doctype-public-and-system-identifiers-state:bogus-doctype-state>bogus DOCTYPE state</a>.</dl> 3206 3207 3208 <h5 id=after-doctype-system-keyword-state>12.2.4.62 <dfn>After DOCTYPE system keyword state</dfn></h5> 3209 3210 <p>Consume the <a href=#next-input-character id=after-doctype-system-keyword-state:next-input-character>next input character</a>:</p> 3211 3212 <dl class=switch><dt>U+0009 CHARACTER TABULATION (tab)<dt>U+000A LINE FEED (LF)<dt>U+000C FORM FEED (FF)<dt>U+0020 SPACE<dd>Switch to the <a href=#before-doctype-system-identifier-state id=after-doctype-system-keyword-state:before-doctype-system-identifier-state>before DOCTYPE system identifier state</a>.<dt>U+0022 QUOTATION MARK (")<dd><a href=#parse-error id=after-doctype-system-keyword-state:parse-error>Parse error</a>. Set the DOCTYPE token's system identifier to the empty string (not 3213 missing), then switch to the <a href=#doctype-system-identifier-(double-quoted)-state id=after-doctype-system-keyword-state:doctype-system-identifier-(double-quoted)-state>DOCTYPE system identifier (double-quoted) state</a>.<dt>U+0027 APOSTROPHE (')<dd><a href=#parse-error id=after-doctype-system-keyword-state:parse-error-2>Parse error</a>. Set the DOCTYPE token's system identifier to the empty string (not 3214 missing), then switch to the <a href=#doctype-system-identifier-(single-quoted)-state id=after-doctype-system-keyword-state:doctype-system-identifier-(single-quoted)-state>DOCTYPE system identifier (single-quoted) state</a>.<dt>U+003E GREATER-THAN SIGN (>)<dd><a href=#parse-error id=after-doctype-system-keyword-state:parse-error-3>Parse error</a>. Set the DOCTYPE token's <i id=after-doctype-system-keyword-state:force-quirks-flag><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>. 3215 Switch to the <a href=#data-state id=after-doctype-system-keyword-state:data-state>data state</a>. Emit that DOCTYPE token.<dt>EOF<dd><a href=#parse-error id=after-doctype-system-keyword-state:parse-error-4>Parse error</a>. Switch to the <a href=#data-state id=after-doctype-system-keyword-state:data-state-2>data state</a>. Set the DOCTYPE token's 3216 <i id=after-doctype-system-keyword-state:force-quirks-flag-2><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>. Emit that DOCTYPE token. Reconsume the EOF character.<dt>Anything else<dd><a href=#parse-error id=after-doctype-system-keyword-state:parse-error-5>Parse error</a>. Set the DOCTYPE token's <i id=after-doctype-system-keyword-state:force-quirks-flag-3><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>. 3217 Switch to the <a href=#bogus-doctype-state id=after-doctype-system-keyword-state:bogus-doctype-state>bogus DOCTYPE state</a>.</dl> 3218 3219 3220 <h5 id=before-doctype-system-identifier-state>12.2.4.63 <dfn>Before DOCTYPE system identifier state</dfn></h5> 3221 3222 <p>Consume the <a href=#next-input-character id=before-doctype-system-identifier-state:next-input-character>next input character</a>:</p> 3223 3224 <dl class=switch><dt>U+0009 CHARACTER TABULATION (tab)<dt>U+000A LINE FEED (LF)<dt>U+000C FORM FEED (FF)<dt>U+0020 SPACE<dd>Ignore the character.<dt>U+0022 QUOTATION MARK (")<dd>Set the DOCTYPE token's system identifier to the empty string (not missing), then switch to 3225 the <a href=#doctype-system-identifier-(double-quoted)-state id=before-doctype-system-identifier-state:doctype-system-identifier-(double-quoted)-state>DOCTYPE system identifier (double-quoted) state</a>.<dt>U+0027 APOSTROPHE (')<dd>Set the DOCTYPE token's system identifier to the empty string (not missing), then switch to 3226 the <a href=#doctype-system-identifier-(single-quoted)-state id=before-doctype-system-identifier-state:doctype-system-identifier-(single-quoted)-state>DOCTYPE system identifier (single-quoted) state</a>.<dt>U+003E GREATER-THAN SIGN (>)<dd><a href=#parse-error id=before-doctype-system-identifier-state:parse-error>Parse error</a>. Set the DOCTYPE token's <i id=before-doctype-system-identifier-state:force-quirks-flag><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>. 3227 Switch to the <a href=#data-state id=before-doctype-system-identifier-state:data-state>data state</a>. Emit that DOCTYPE token.<dt>EOF<dd><a href=#parse-error id=before-doctype-system-identifier-state:parse-error-2>Parse error</a>. Switch to the <a href=#data-state id=before-doctype-system-identifier-state:data-state-2>data state</a>. Set the DOCTYPE token's 3228 <i id=before-doctype-system-identifier-state:force-quirks-flag-2><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>. Emit that DOCTYPE token. Reconsume the EOF character.<dt>Anything else<dd><a href=#parse-error id=before-doctype-system-identifier-state:parse-error-3>Parse error</a>. Set the DOCTYPE token's <i id=before-doctype-system-identifier-state:force-quirks-flag-3><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>. 3229 Switch to the <a href=#bogus-doctype-state id=before-doctype-system-identifier-state:bogus-doctype-state>bogus DOCTYPE state</a>.</dl> 3230 3231 3232 <h5 id=doctype-system-identifier-(double-quoted)-state>12.2.4.64 <dfn>DOCTYPE system identifier (double-quoted) state</dfn></h5> 3233 3234 <p>Consume the <a href=#next-input-character id=doctype-system-identifier-(double-quoted)-state:next-input-character>next input character</a>:</p> 3235 3236 <dl class=switch><dt>U+0022 QUOTATION MARK (")<dd>Switch to the <a href=#after-doctype-system-identifier-state id=doctype-system-identifier-(double-quoted)-state:after-doctype-system-identifier-state>after DOCTYPE system identifier state</a>.<dt>U+0000 NULL<dd><a href=#parse-error id=doctype-system-identifier-(double-quoted)-state:parse-error>Parse error</a>. Append a U+FFFD REPLACEMENT CHARACTER character to the current 3237 DOCTYPE token's system identifier.<dt>U+003E GREATER-THAN SIGN (>)<dd><a href=#parse-error id=doctype-system-identifier-(double-quoted)-state:parse-error-2>Parse error</a>. Set the DOCTYPE token's <i id=doctype-system-identifier-(double-quoted)-state:force-quirks-flag><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>. 3238 Switch to the <a href=#data-state id=doctype-system-identifier-(double-quoted)-state:data-state>data state</a>. Emit that DOCTYPE token.<dt>EOF<dd><a href=#parse-error id=doctype-system-identifier-(double-quoted)-state:parse-error-3>Parse error</a>. Switch to the <a href=#data-state id=doctype-system-identifier-(double-quoted)-state:data-state-2>data state</a>. Set the DOCTYPE token's 3239 <i id=doctype-system-identifier-(double-quoted)-state:force-quirks-flag-2><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>. Emit that DOCTYPE token. Reconsume the EOF character.<dt>Anything else<dd>Append the <a href=#current-input-character id=doctype-system-identifier-(double-quoted)-state:current-input-character>current input character</a> to the current DOCTYPE token's system 3240 identifier.</dl> 3241 3242 3243 <h5 id=doctype-system-identifier-(single-quoted)-state>12.2.4.65 <dfn>DOCTYPE system identifier (single-quoted) state</dfn></h5> 3244 3245 <p>Consume the <a href=#next-input-character id=doctype-system-identifier-(single-quoted)-state:next-input-character>next input character</a>:</p> 3246 3247 <dl class=switch><dt>U+0027 APOSTROPHE (')<dd>Switch to the <a href=#after-doctype-system-identifier-state id=doctype-system-identifier-(single-quoted)-state:after-doctype-system-identifier-state>after DOCTYPE system identifier state</a>.<dt>U+0000 NULL<dd><a href=#parse-error id=doctype-system-identifier-(single-quoted)-state:parse-error>Parse error</a>. Append a U+FFFD REPLACEMENT CHARACTER character to the current 3248 DOCTYPE token's system identifier.<dt>U+003E GREATER-THAN SIGN (>)<dd><a href=#parse-error id=doctype-system-identifier-(single-quoted)-state:parse-error-2>Parse error</a>. Set the DOCTYPE token's <i id=doctype-system-identifier-(single-quoted)-state:force-quirks-flag><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>. 3249 Switch to the <a href=#data-state id=doctype-system-identifier-(single-quoted)-state:data-state>data state</a>. Emit that DOCTYPE token.<dt>EOF<dd><a href=#parse-error id=doctype-system-identifier-(single-quoted)-state:parse-error-3>Parse error</a>. Switch to the <a href=#data-state id=doctype-system-identifier-(single-quoted)-state:data-state-2>data state</a>. Set the DOCTYPE token's 3250 <i id=doctype-system-identifier-(single-quoted)-state:force-quirks-flag-2><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>. Emit that DOCTYPE token. Reconsume the EOF character.<dt>Anything else<dd>Append the <a href=#current-input-character id=doctype-system-identifier-(single-quoted)-state:current-input-character>current input character</a> to the current DOCTYPE token's system 3251 identifier.</dl> 3252 3253 3254 <h5 id=after-doctype-system-identifier-state>12.2.4.66 <dfn>After DOCTYPE system identifier state</dfn></h5> 3255 3256 <p>Consume the <a href=#next-input-character id=after-doctype-system-identifier-state:next-input-character>next input character</a>:</p> 3257 3258 <dl class=switch><dt>U+0009 CHARACTER TABULATION (tab)<dt>U+000A LINE FEED (LF)<dt>U+000C FORM FEED (FF)<dt>U+0020 SPACE<dd>Ignore the character.<dt>U+003E GREATER-THAN SIGN (>)<dd>Switch to the <a href=#data-state id=after-doctype-system-identifier-state:data-state>data state</a>. Emit the current DOCTYPE token.<dt>EOF<dd><a href=#parse-error id=after-doctype-system-identifier-state:parse-error>Parse error</a>. Switch to the <a href=#data-state id=after-doctype-system-identifier-state:data-state-2>data state</a>. Set the DOCTYPE token's 3259 <i id=after-doctype-system-identifier-state:force-quirks-flag><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>. Emit that DOCTYPE token. Reconsume the EOF character.<dt>Anything else<dd><a href=#parse-error id=after-doctype-system-identifier-state:parse-error-2>Parse error</a>. Switch to the <a href=#bogus-doctype-state id=after-doctype-system-identifier-state:bogus-doctype-state>bogus DOCTYPE state</a>. (This does 3260 <em>not</em> set the DOCTYPE token's <i id=after-doctype-system-identifier-state:force-quirks-flag-2><a href=#force-quirks-flag>force-quirks flag</a></i> to <i>on</i>.)</dl> 3261 3262 3263 <h5 id=bogus-doctype-state>12.2.4.67 <dfn>Bogus DOCTYPE state</dfn></h5> 3264 3265 <p>Consume the <a href=#next-input-character id=bogus-doctype-state:next-input-character>next input character</a>:</p> 3266 3267 <dl class=switch><dt>U+003E GREATER-THAN SIGN (>)<dd>Switch to the <a href=#data-state id=bogus-doctype-state:data-state>data state</a>. Emit the DOCTYPE token.<dt>EOF<dd>Switch to the <a href=#data-state id=bogus-doctype-state:data-state-2>data state</a>. Emit the DOCTYPE token. Reconsume the EOF 3268 character.<dt>Anything else<dd>Ignore the character.</dl> 3269 3270 3271 <h5 id=cdata-section-state>12.2.4.68 <dfn>CDATA section state</dfn></h5> 3272 3273 <p>Switch to the <a href=#data-state id=cdata-section-state:data-state>data state</a>.</p> 3274 3275 <p>Consume every character up to the next occurrence of the three character sequence U+005D RIGHT 3276 SQUARE BRACKET U+005D RIGHT SQUARE BRACKET U+003E GREATER-THAN SIGN (<code>]]></code>), 3277 or the end of the file (EOF), whichever comes first. Emit a series of character tokens consisting 3278 of all the characters consumed except the matching three character sequence at the end (if one was 3279 found before the end of the file).</p> 3280 3281 <p>If the end of the file was reached, reconsume the EOF character.</p> 3282 3283 3284 3285 <h5 id=tokenizing-character-references>12.2.4.69 Tokenizing character references</h5> 3286 3287 <p>This section defines how to <dfn id=consume-a-character-reference>consume a character reference</dfn>, optionally with an 3288 <dfn id=additional-allowed-character>additional allowed character</dfn>, which, if specified where the algorithm is invoked, adds 3289 a character to the list of characters that cause there to not be a character reference.</p> 3290 3291 <p>This definition is used when parsing character references <a href=#character-reference-in-data-state id=tokenizing-character-references:character-reference-in-data-state>in text</a> and <a href=#character-reference-in-attribute-value-state id=tokenizing-character-references:character-reference-in-attribute-value-state>in 3292 attributes</a>.</p> 3293 3294 <p>The behavior depends on the identity of the next character (the one immediately after the 3295 U+0026 AMPERSAND character), as follows:</p> 3296 3297 <dl class=switch><dt>U+0009 CHARACTER TABULATION (tab)<dt>U+000A LINE FEED (LF)<dt>U+000C FORM FEED (FF)<dt>U+0020 SPACE<dt>U+003C LESS-THAN SIGN<dt>U+0026 AMPERSAND<dt>EOF<dt>The <a href=#additional-allowed-character id=tokenizing-character-references:additional-allowed-character>additional allowed character</a>, if there is one<dd>Not a character reference. No characters are consumed, and nothing is returned. (This is not 3298 an error, either.)<dt>U+0023 NUMBER SIGN (#)<dd> 3299 3300 <p>Consume the U+0023 NUMBER SIGN.</p> 3301 3302 <p>The behavior further depends on the character after the U+0023 NUMBER SIGN:</p> 3303 3304 <dl class=switch><dt>U+0078 LATIN SMALL LETTER X<dt>U+0058 LATIN CAPITAL LETTER X<dd> 3305 3306 <p>Consume the X.</p> 3307 3308 <p>Follow the steps below, but using <a id=tokenizing-character-references:ascii-hex-digits href=infrastructure.html#ascii-hex-digits>ASCII hex digits</a>.</p> 3309 3310 <p>When it comes to interpreting the number, interpret it as a hexadecimal number.</p> 3311 3312 <dt>Anything else<dd> 3313 3314 <p>Follow the steps below, but using <a id=tokenizing-character-references:ascii-digits href=infrastructure.html#ascii-digits>ASCII digits</a>.</p> 3315 3316 <p>When it comes to interpreting the number, interpret it as a decimal number.</p> 3317 3318 </dl> 3319 3320 <p>Consume as many characters as match the range of characters given above (<a id=tokenizing-character-references:ascii-hex-digits-2 href=infrastructure.html#ascii-hex-digits>ASCII hex 3321 digits</a> or <a id=tokenizing-character-references:ascii-digits-2 href=infrastructure.html#ascii-digits>ASCII digits</a>).</p> 3322 3323 <p>If no characters match the range, then don't consume any characters (and unconsume the U+0023 3324 NUMBER SIGN character and, if appropriate, the X character). This is a <a href=#parse-error id=tokenizing-character-references:parse-error>parse error</a>; 3325 nothing is returned.</p> 3326 3327 <p>Otherwise, if the next character is a U+003B SEMICOLON, consume that too. If it isn't, there 3328 is a <a href=#parse-error id=tokenizing-character-references:parse-error-2>parse error</a>.</p> 3329 3330 <p>If one or more characters match the range, then take them all and interpret the string of 3331 characters as a number (either hexadecimal or decimal as appropriate).</p> 3332 3333 <p>If that number is one of the numbers in the first column of the following table, then this is 3334 a <a href=#parse-error id=tokenizing-character-references:parse-error-3>parse error</a>. Find the row with that number in the first column, and return a 3335 character token for the Unicode character given in the second column of that row.</p> 3336 3337 <table id=table-charref-overrides><thead><tr><th>Number <th colspan=2>Unicode character 3338 <tbody><tr><td>0x00 <td>U+FFFD <td>REPLACEMENT CHARACTER 3339 3340 <tr><td>0x80 <td>U+20AC <td>EURO SIGN () 3341 3342 <tr><td>0x82 <td>U+201A <td>SINGLE LOW-9 QUOTATION MARK () 3343 <tr><td>0x83 <td>U+0192 <td>LATIN SMALL LETTER F WITH HOOK () 3344 <tr><td>0x84 <td>U+201E <td>DOUBLE LOW-9 QUOTATION MARK () 3345 <tr><td>0x85 <td>U+2026 <td>HORIZONTAL ELLIPSIS () 3346 <tr><td>0x86 <td>U+2020 <td>DAGGER () 3347 <tr><td>0x87 <td>U+2021 <td>DOUBLE DAGGER () 3348 <tr><td>0x88 <td>U+02C6 <td>MODIFIER LETTER CIRCUMFLEX ACCENT () 3349 <tr><td>0x89 <td>U+2030 <td>PER MILLE SIGN () 3350 <tr><td>0x8A <td>U+0160 <td>LATIN CAPITAL LETTER S WITH CARON () 3351 <tr><td>0x8B <td>U+2039 <td>SINGLE LEFT-POINTING ANGLE QUOTATION MARK () 3352 <tr><td>0x8C <td>U+0152 <td>LATIN CAPITAL LIGATURE OE () 3353 3354 <tr><td>0x8E <td>U+017D <td>LATIN CAPITAL LETTER Z WITH CARON () 3355 3356 3357 <tr><td>0x91 <td>U+2018 <td>LEFT SINGLE QUOTATION MARK () 3358 <tr><td>0x92 <td>U+2019 <td>RIGHT SINGLE QUOTATION MARK () 3359 <tr><td>0x93 <td>U+201C <td>LEFT DOUBLE QUOTATION MARK () 3360 <tr><td>0x94 <td>U+201D <td>RIGHT DOUBLE QUOTATION MARK () 3361 <tr><td>0x95 <td>U+2022 <td>BULLET () 3362 <tr><td>0x96 <td>U+2013 <td>EN DASH () 3363 <tr><td>0x97 <td>U+2014 <td>EM DASH () 3364 <tr><td>0x98 <td>U+02DC <td>SMALL TILDE () 3365 <tr><td>0x99 <td>U+2122 <td>TRADE MARK SIGN () 3366 <tr><td>0x9A <td>U+0161 <td>LATIN SMALL LETTER S WITH CARON () 3367 <tr><td>0x9B <td>U+203A <td>SINGLE RIGHT-POINTING ANGLE QUOTATION MARK () 3368 <tr><td>0x9C <td>U+0153 <td>LATIN SMALL LIGATURE OE () 3369 3370 <tr><td>0x9E <td>U+017E <td>LATIN SMALL LETTER Z WITH CARON () 3371 <tr><td>0x9F <td>U+0178 <td>LATIN CAPITAL LETTER Y WITH DIAERESIS () 3372 </table> 3373 3374 <p>Otherwise, if the number is in the range 0xD800 to 0xDFFF or is greater 3375 than 0x10FFFF, then this is a <a href=#parse-error id=tokenizing-character-references:parse-error-4>parse error</a>. Return a U+FFFD REPLACEMENT CHARACTER 3376 character token.</p> 3377 3378 <p>Otherwise, return a character token for the Unicode character whose code point is that 3379 number. 3380 3381 Additionally, if the number is in the range 0x0001 to 0x0008, 0x000D to 0x001F, 0x007F to 0x009F, 0xFDD0 to 0xFDEF, or is 3382 one of 0x000B, 0xFFFE, 0xFFFF, 0x1FFFE, 0x1FFFF, 0x2FFFE, 0x2FFFF, 0x3FFFE, 0x3FFFF, 0x4FFFE, 3383 0x4FFFF, 0x5FFFE, 0x5FFFF, 0x6FFFE, 0x6FFFF, 0x7FFFE, 0x7FFFF, 0x8FFFE, 0x8FFFF, 0x9FFFE, 3384 0x9FFFF, 0xAFFFE, 0xAFFFF, 0xBFFFE, 0xBFFFF, 0xCFFFE, 0xCFFFF, 0xDFFFE, 0xDFFFF, 0xEFFFE, 3385 0xEFFFF, 0xFFFFE, 0xFFFFF, 0x10FFFE, or 0x10FFFF, then this is a <a href=#parse-error id=tokenizing-character-references:parse-error-5>parse error</a>.</p> 3386 3387 <dt>Anything else<dd> 3388 3389 <p>Consume the maximum number of characters possible, with the consumed characters matching one 3390 of the identifiers in the first column of the <a href=#named-character-references id=tokenizing-character-references:named-character-references>named character references</a> table (in 3391 a <a id=tokenizing-character-references:case-sensitive href=infrastructure.html#case-sensitive>case-sensitive</a> manner).</p> 3392 3393 <p>If no match can be made, then no characters are consumed, and nothing is returned. In this 3394 case, if the characters after the U+0026 AMPERSAND character (&) consist of a sequence of 3395 one or more <a id=tokenizing-character-references:alphanumeric-ascii-characters href=infrastructure.html#alphanumeric-ascii-characters>alphanumeric ASCII characters</a> followed by a U+003B SEMICOLON character 3396 (;), then this is a <a href=#parse-error id=tokenizing-character-references:parse-error-6>parse error</a>.</p> 3397 3398 <p>If the character reference is being consumed <a href=#character-reference-in-attribute-value-state id=tokenizing-character-references:character-reference-in-attribute-value-state-2>as part of an attribute</a>, and the last character matched is not a U+003B 3399 SEMICOLON character (;), and the next character is either a U+003D EQUALS SIGN character (=) or 3400 an <a href=infrastructure.html#alphanumeric-ascii-characters id=tokenizing-character-references:alphanumeric-ascii-characters-2>alphanumeric ASCII character</a>, then, for 3401 historical reasons, all the characters that were matched after the U+0026 AMPERSAND character 3402 (&) must be unconsumed, and nothing is returned. 3403 3404 However, if this next character is in fact a U+003D EQUALS SIGN character (=), then this is a 3405 <a href=#parse-error id=tokenizing-character-references:parse-error-7>parse error</a>, because some legacy user agents will 3406 misinterpret the markup in those cases.</p> 3407 3408 <p>Otherwise, a character reference is parsed. If the last character matched is not a U+003B 3409 SEMICOLON character (;), there is a <a href=#parse-error id=tokenizing-character-references:parse-error-8>parse error</a>.</p> 3410 3411 <p>Return one or two character tokens for the character(s) corresponding to the character 3412 reference name (as given by the second column of the <a href=#named-character-references id=tokenizing-character-references:named-character-references-2>named character references</a> 3413 table).</p> 3414 3415 <div class=example> 3416 3417 <p>If the markup contains (not in an attribute) the string <code>I'm &notit; I 3418 tell you</code>, the character reference is parsed as "not", as in, <code>I'm it; 3419 I tell you</code> (and this is a parse error). But if the markup was <code>I'm 3420 &notin; I tell you</code>, the character reference would be parsed as "notin;", resulting 3421 in <code>I'm I tell you</code> (and no parse error).</p> 3422 3423 </div> 3424 3425 </dl> 3426 3427 3428 3429 3430 3431 3432 3433 3434 <h4 id=tree-construction>12.2.5 <dfn>Tree construction</dfn></h4> 3435 3436 <p>The input to the tree construction stage is a sequence of tokens from the 3437 <a href=#tokenization id=tree-construction:tokenization>tokenization</a> stage. The tree construction stage is associated with a DOM 3438 <code id=tree-construction:document><a href=dom.html#document>Document</a></code> object when a parser is created. The "output" of this stage consists of 3439 dynamically modifying or extending that document's DOM tree.</p> 3440 3441 <p>This specification does not define when an interactive user agent has to render the 3442 <code id=tree-construction:document-2><a href=dom.html#document>Document</a></code> so that it is available to the user, or when it has to begin accepting user 3443 input.</p> 3444 3445 <hr> 3446 3447 <p>As each token is emitted from the tokenizer, the user agent must follow the appropriate steps 3448 from the following list, known as the <dfn id=tree-construction-dispatcher>tree construction dispatcher</dfn>:</p> 3449 3450 <dl class=switch><dt>If the <a href=#stack-of-open-elements id=tree-construction:stack-of-open-elements>stack of open elements</a> is empty<dt>If the <a href=#adjusted-current-node id=tree-construction:adjusted-current-node>adjusted current node</a> is an element in the <a id=tree-construction:html-namespace-2 href=infrastructure.html#html-namespace-2>HTML namespace</a><dt>If the <a href=#adjusted-current-node id=tree-construction:adjusted-current-node-2>adjusted current node</a> is a <a href=#mathml-text-integration-point id=tree-construction:mathml-text-integration-point>MathML text integration point</a> and the token is a start tag whose tag name is neither "mglyph" nor "malignmark"<dt>If the <a href=#adjusted-current-node id=tree-construction:adjusted-current-node-3>adjusted current node</a> is a <a href=#mathml-text-integration-point id=tree-construction:mathml-text-integration-point-2>MathML text integration point</a> and the token is a character token<dt>If the <a href=#adjusted-current-node id=tree-construction:adjusted-current-node-4>adjusted current node</a> is an <code id=tree-construction:math:annotation-xml><a href=embedded-content.html#math:annotation-xml>annotation-xml</a></code> element in the <a id=tree-construction:mathml-namespace href=infrastructure.html#mathml-namespace>MathML namespace</a> and the token is a start tag whose tag name is "svg"<dt>If the <a href=#adjusted-current-node id=tree-construction:adjusted-current-node-5>adjusted current node</a> is an <a href=#html-integration-point id=tree-construction:html-integration-point>HTML integration point</a> and the token is a start tag<dt>If the <a href=#adjusted-current-node id=tree-construction:adjusted-current-node-6>adjusted current node</a> is an <a href=#html-integration-point id=tree-construction:html-integration-point-2>HTML integration point</a> and the token is a character token<dt>If the token is an end-of-file token<dd>Process the token according to the rules given in the section corresponding to the current 3451 <a href=#insertion-mode id=tree-construction:insertion-mode>insertion mode</a> in HTML content.<dt>Otherwise<dd>Process the token according to the rules given in the section for parsing tokens <a href=#parsing-main-inforeign id=tree-construction:parsing-main-inforeign>in foreign content</a>.</dl> 3452 3453 <p>The <dfn id=next-token>next token</dfn> is the token that is about to be processed by the <a href=#tree-construction-dispatcher id=tree-construction:tree-construction-dispatcher>tree 3454 construction dispatcher</a> (even if the token is subsequently just ignored).</p> 3455 3456 <p>A node is a <dfn id=mathml-text-integration-point>MathML text integration point</dfn> if it is one of the following 3457 elements:</p> 3458 3459 <ul class=brief><li>An <code id=tree-construction:math:mi><a href=embedded-content.html#math:mi>mi</a></code> element in the <a id=tree-construction:mathml-namespace-2 href=infrastructure.html#mathml-namespace>MathML namespace</a><li>An <code id=tree-construction:math:mo><a href=embedded-content.html#math:mo>mo</a></code> element in the <a id=tree-construction:mathml-namespace-3 href=infrastructure.html#mathml-namespace>MathML namespace</a><li>An <code id=tree-construction:math:mn><a href=embedded-content.html#math:mn>mn</a></code> element in the <a id=tree-construction:mathml-namespace-4 href=infrastructure.html#mathml-namespace>MathML namespace</a><li>An <code id=tree-construction:math:ms><a href=embedded-content.html#math:ms>ms</a></code> element in the <a id=tree-construction:mathml-namespace-5 href=infrastructure.html#mathml-namespace>MathML namespace</a><li>An <code id=tree-construction:math:mtext><a href=embedded-content.html#math:mtext>mtext</a></code> element in the <a id=tree-construction:mathml-namespace-6 href=infrastructure.html#mathml-namespace>MathML namespace</a></ul> 3460 3461 <p>A node is an <dfn id=html-integration-point>HTML integration point</dfn> if it is one of the following elements:</p> 3462 3463 <ul class=brief><li>An <code id=tree-construction:math:annotation-xml-2><a href=embedded-content.html#math:annotation-xml>annotation-xml</a></code> element in the <a id=tree-construction:mathml-namespace-7 href=infrastructure.html#mathml-namespace>MathML 3464 namespace</a> whose start tag token had an attribute with the name "encoding" whose value was 3465 an <a id=tree-construction:ascii-case-insensitive href=infrastructure.html#ascii-case-insensitive>ASCII case-insensitive</a> match for the string "<code>text/html</code>"<li>An <code id=tree-construction:math:annotation-xml-3><a href=embedded-content.html#math:annotation-xml>annotation-xml</a></code> element in the <a id=tree-construction:mathml-namespace-8 href=infrastructure.html#mathml-namespace>MathML 3466 namespace</a> whose start tag token had an attribute with the name "encoding" whose value was 3467 an <a id=tree-construction:ascii-case-insensitive-2 href=infrastructure.html#ascii-case-insensitive>ASCII case-insensitive</a> match for the string "<code>application/xhtml+xml</code>"<li>A <code>foreignObject</code> element in the <a id=tree-construction:svg-namespace href=infrastructure.html#svg-namespace>SVG namespace</a><li>A <code>desc</code> element in the <a id=tree-construction:svg-namespace-2 href=infrastructure.html#svg-namespace>SVG namespace</a><li>A <code>title</code> element in the <a id=tree-construction:svg-namespace-3 href=infrastructure.html#svg-namespace>SVG namespace</a></ul> 3468 3469 <p class=note>Not all of the tag names mentioned below are conformant tag names in this 3470 specification; many are included to handle legacy content. They still form part of the algorithm 3471 that implementations are required to implement to claim conformance.</p> 3472 3473 <p class=note>The algorithm described below places no limit on the depth of the DOM tree 3474 generated, or on the length of tag names, attribute names, attribute values, <code id=tree-construction:text><a href=infrastructure.html#text>Text</a></code> 3475 nodes, etc. While implementors are encouraged to avoid arbitrary limits, it is recognised that <a href=infrastructure.html#hardwareLimitations>practical concerns</a> will likely force user agents to impose nesting 3476 depth constraints.</p> 3477 3478 3479 <h5 id=creating-and-inserting-nodes>12.2.5.1 Creating and inserting nodes</h5> 3480 3481 <p>While the parser is processing a token, it can enable or disable <dfn id=foster-parent>foster parenting</dfn>. This affects the following algorithm.</p> 3482 3483 <p>The <dfn id=appropriate-place-for-inserting-a-node>appropriate place for inserting a node</dfn>, optionally using a particular 3484 <i>override target</i>, is the position in an element returned by running the following steps:</p> 3485 3486 <ol><li> 3487 3488 <p>If there was an <i>override target</i> specified, then let <var>target</var> be the 3489 <i>override target</i>.</p> 3490 3491 <p>Otherwise, let <var>target</var> be the <a href=#current-node id=creating-and-inserting-nodes:current-node>current node</a>.</p> 3492 3493 <li> 3494 3495 <p>Determine the <var>adjusted insertion location</var> using the first matching steps 3496 from the following list:</p> 3497 3498 <dl class=switch><dt>If <a href=#foster-parent id=creating-and-inserting-nodes:foster-parent>foster parenting</a> is enabled and <var>target</var> is a <code id=creating-and-inserting-nodes:the-table-element><a href=tables.html#the-table-element>table</a></code>, <code id=creating-and-inserting-nodes:the-tbody-element><a href=tables.html#the-tbody-element>tbody</a></code>, <code id=creating-and-inserting-nodes:the-tfoot-element><a href=tables.html#the-tfoot-element>tfoot</a></code>, 3499 <code id=creating-and-inserting-nodes:the-thead-element><a href=tables.html#the-thead-element>thead</a></code>, or <code id=creating-and-inserting-nodes:the-tr-element><a href=tables.html#the-tr-element>tr</a></code> element<dd> 3500 3501 <p class=note>Foster parenting happens when content is misnested in tables.</p> 3502 3503 <p>Run these substeps:</p> 3504 3505 <ol><li><p>Let <var>last template</var> be the last <code id=creating-and-inserting-nodes:the-template-element><a href=scripting.html#the-template-element>template</a></code> element in the 3506 <a href=#stack-of-open-elements id=creating-and-inserting-nodes:stack-of-open-elements>stack of open elements</a>, if any.</p> 3507 3508 <li><p>Let <var>last table</var> be the last <code id=creating-and-inserting-nodes:the-table-element-2><a href=tables.html#the-table-element>table</a></code> element in the 3509 <a href=#stack-of-open-elements id=creating-and-inserting-nodes:stack-of-open-elements-2>stack of open elements</a>, if any.</p> 3510 3511 <li><p>If there is a <var>last template</var> and either there is no <var>last table</var>, or there is one, but <var>last template</var> is lower 3512 (more recently added) than <var>last table</var> in the <a href=#stack-of-open-elements id=creating-and-inserting-nodes:stack-of-open-elements-3>stack of open 3513 elements</a>, then: let <var>adjusted insertion location</var> be inside <var>last template</var>'s <a id=creating-and-inserting-nodes:template-contents href=scripting.html#template-contents>template contents</a>, after its last child (if any), 3514 and abort these substeps.<li><p>If there is no <var>last table</var>, then let <var>adjusted insertion 3515 location</var> be inside the first element in the <a href=#stack-of-open-elements id=creating-and-inserting-nodes:stack-of-open-elements-4>stack of open elements</a> (the 3516 <code id=creating-and-inserting-nodes:the-html-element><a href=semantics.html#the-html-element>html</a></code> element), after its last child (if any), and abort these substeps. 3517 (<a href=#fragment-case id=creating-and-inserting-nodes:fragment-case>fragment case</a>)</p> 3518 3519 3520 3521 <li><p>If <var>last table</var> has a parent node, then let <var>adjusted insertion location</var> be inside <var>last table</var>'s parent 3522 node, immediately before <var>last table</var>, and abort these 3523 substeps.<li><p>Let <var>previous element</var> be the element immediately above <var>last table</var> in the <a href=#stack-of-open-elements id=creating-and-inserting-nodes:stack-of-open-elements-5>stack of open elements</a>.<li><p>Let <var>adjusted insertion location</var> be inside <var>previous 3524 element</var>, after its last child (if any).</ol> 3525 3526 <p class=note>These steps are involved in part because it's possible for elements, the 3527 <code id=creating-and-inserting-nodes:the-table-element-3><a href=tables.html#the-table-element>table</a></code> element in this case in particular, to have been moved by a script around 3528 in the DOM, or indeed removed from the DOM entirely, after the element was inserted by the 3529 parser.</p> 3530 3531 <dt>Otherwise<dd> 3532 3533 <p>Let <var>adjusted insertion location</var> be inside <var>target</var>, 3534 after its last child (if any).</p> 3535 3536 </dl> 3537 3538 <li> 3539 3540 <p>If the <var>adjusted insertion location</var> is inside a <code id=creating-and-inserting-nodes:the-template-element-2><a href=scripting.html#the-template-element>template</a></code> 3541 element, let it instead be inside the <code id=creating-and-inserting-nodes:the-template-element-3><a href=scripting.html#the-template-element>template</a></code> element's <a id=creating-and-inserting-nodes:template-contents-2 href=scripting.html#template-contents>template 3542 contents</a>, after its last child (if any).</p> 3543 3544 <li> 3545 3546 <p>Return the <var>adjusted insertion location</var>.</p> 3547 3548 </ol> 3549 3550 <hr> 3551 3552 <p>When the steps below require the UA to <dfn id=create-an-element-for-the-token>create an 3553 element for a token</dfn> in a particular <var>given namespace</var> and with a 3554 particular <var>intended parent</var>, the UA must run the following steps:</p> 3555 3556 <ol><li> 3557 3558 <p>Create a node implementing the interface appropriate for the element type corresponding to 3559 the tag name of the token in <var>given namespace</var> (as given in the specification 3560 that defines that element, e.g. for an <code id=creating-and-inserting-nodes:the-a-element><a href=semantics.html#the-a-element>a</a></code> element in the <a id=creating-and-inserting-nodes:html-namespace-2 href=infrastructure.html#html-namespace-2>HTML 3561 namespace</a>, this specification defines it to be the <code id=creating-and-inserting-nodes:htmlanchorelement><a href=semantics.html#htmlanchorelement>HTMLAnchorElement</a></code> 3562 interface), with the tag name being the name of that element, with the node being in the given 3563 namespace, and with the attributes on the node being those given in the given token.</p> 3564 3565 <p>The interface appropriate for an element in the <a id=creating-and-inserting-nodes:html-namespace-2-2 href=infrastructure.html#html-namespace-2>HTML namespace</a> that is not 3566 defined in this specification (or <a id=creating-and-inserting-nodes:other-applicable-specifications href=infrastructure.html#other-applicable-specifications>other applicable specifications</a>) is 3567 <code id=creating-and-inserting-nodes:htmlunknownelement><a href=dom.html#htmlunknownelement>HTMLUnknownElement</a></code>. Elements in other namespaces whose interface is not defined by 3568 that namespace's specification must use the interface <code id=creating-and-inserting-nodes:element><a href=infrastructure.html#element>Element</a></code>.</p> 3569 3570 <p>The <a id=creating-and-inserting-nodes:node-document href=https://dom.spec.whatwg.org/#concept-node-document data-x-internal=node-document>node document</a> of the newly created element 3571 must be the <a id=creating-and-inserting-nodes:node-document-2 href=https://dom.spec.whatwg.org/#concept-node-document data-x-internal=node-document>node document</a> of the <var>intended parent</var>.</p> 3572 3573 <li><p>If the newly created element has an <code>xmlns</code> attribute <em>in the 3574 <a id=creating-and-inserting-nodes:xmlns-namespace href=infrastructure.html#xmlns-namespace>XMLNS namespace</a></em> whose value is not exactly the same as the element's namespace, 3575 that is a <a href=#parse-error id=creating-and-inserting-nodes:parse-error>parse error</a>. Similarly, if the newly created element has an <code>xmlns:xlink</code> attribute in the <a id=creating-and-inserting-nodes:xmlns-namespace-2 href=infrastructure.html#xmlns-namespace>XMLNS namespace</a> whose value is not the 3576 <a id=creating-and-inserting-nodes:xlink-namespace href=infrastructure.html#xlink-namespace>XLink Namespace</a>, that is a <a href=#parse-error id=creating-and-inserting-nodes:parse-error-2>parse error</a>.<li><p>If the newly created element is a <a href=forms.html#category-reset id=creating-and-inserting-nodes:category-reset>resettable element</a>, 3577 invoke its <a href=forms.html#concept-form-reset-control id=creating-and-inserting-nodes:concept-form-reset-control>reset algorithm</a>. (This initialises the 3578 element's <a href=forms.html#concept-fe-value id=creating-and-inserting-nodes:concept-fe-value>value</a> and <a href=forms.html#concept-fe-checked id=creating-and-inserting-nodes:concept-fe-checked>checkedness</a> based on the element's attributes.)<li><p>If the element is a <a id=creating-and-inserting-nodes:form-associated-element href=forms.html#form-associated-element>form-associated element</a>, and the <a href=#form-element-pointer id=creating-and-inserting-nodes:form-element-pointer><code>form</code> element pointer</a> is not null, and there is no <code id=creating-and-inserting-nodes:the-template-element-4><a href=scripting.html#the-template-element>template</a></code> 3579 element on the <a href=#stack-of-open-elements id=creating-and-inserting-nodes:stack-of-open-elements-6>stack of open elements</a>, and the newly created element is either not 3580 <a href=forms.html#category-form-attr id=creating-and-inserting-nodes:category-form-attr>reassociateable</a> or doesn't have a <code id=creating-and-inserting-nodes:attr-fae-form><a href=forms.html#attr-fae-form>form</a></code> attribute, and the <var>intended parent</var> is in 3581 the same <a id=creating-and-inserting-nodes:home-subtree href=infrastructure.html#home-subtree>home subtree</a> as the element pointed to by the <a href=#form-element-pointer id=creating-and-inserting-nodes:form-element-pointer-2><code>form</code> element pointer</a>, <a href=forms.html#concept-form-association id=creating-and-inserting-nodes:concept-form-association>associate</a> the newly created element with the 3582 <code id=creating-and-inserting-nodes:the-form-element><a href=forms.html#the-form-element>form</a></code> element pointed to by the <a href=#form-element-pointer id=creating-and-inserting-nodes:form-element-pointer-3><code>form</code> element 3583 pointer</a>, and suppress the running of the <a id=creating-and-inserting-nodes:reset-the-form-owner href=forms.html#reset-the-form-owner>reset the form owner</a> algorithm when 3584 the parser subsequently attempts to insert the element.<li><p>Return the newly created element.</ol> 3585 3586 <hr> 3587 3588 3589 3590 <p>When the steps below require the user agent to <dfn id=insert-a-foreign-element>insert a foreign element</dfn> for a token 3591 in a given namespace, the user agent must run these steps:</p> 3592 3593 <ol><li><p>Let the <var>adjusted insertion location</var> be the <a href=#appropriate-place-for-inserting-a-node id=creating-and-inserting-nodes:appropriate-place-for-inserting-a-node>appropriate place for 3594 inserting a node</a>.<li><p><a href=#create-an-element-for-the-token id=creating-and-inserting-nodes:create-an-element-for-the-token>Create an element for the token</a> in the given namespace, with the intended 3595 parent being the element in which the <var>adjusted insertion location</var> finds 3596 itself.<li> 3597 3598 <p>If it is possible to insert an element at the <var>adjusted insertion 3599 location</var>, then insert the newly created element at the <var>adjusted insertion 3600 location</var>.</p> 3601 3602 <p class=note>If the <var>adjusted insertion location</var> cannot accept more 3603 elements, e.g. because it's a <code id=creating-and-inserting-nodes:document><a href=dom.html#document>Document</a></code> that already has an element child, then the 3604 newly created element is dropped on the floor.</p> 3605 3606 <li><p>Push the element onto the <a href=#stack-of-open-elements id=creating-and-inserting-nodes:stack-of-open-elements-7>stack of open elements</a> so that it is the new 3607 <a href=#current-node id=creating-and-inserting-nodes:current-node-2>current node</a>.<li><p>Return the newly created element.</ol> 3608 3609 <p>When the steps below require the user agent to <dfn id=insert-an-html-element>insert an HTML element</dfn> for a token, 3610 the user agent must <a href=#insert-a-foreign-element id=creating-and-inserting-nodes:insert-a-foreign-element>insert a foreign element</a> for the token, in the <a id=creating-and-inserting-nodes:html-namespace-2-3 href=infrastructure.html#html-namespace-2>HTML 3611 namespace</a>.</p> 3612 3613 <hr> 3614 3615 <p>When the steps below require the user agent to <dfn id=adjust-mathml-attributes>adjust MathML attributes</dfn> for a token, 3616 then, if the token has an attribute named <code>definitionurl</code>, change its name to 3617 <code>definitionURL</code> (note the case difference).</p> 3618 3619 <p>When the steps below require the user agent to <dfn id=adjust-svg-attributes>adjust SVG attributes</dfn> for a token, 3620 then, for each attribute on the token whose attribute name is one of the ones in the first column 3621 of the following table, change the attribute's name to the name given in the corresponding cell in 3622 the second column. (This fixes the case of SVG attributes that are not all lowercase.)</p> 3623 3624 <table><thead><tr><th> Attribute name on token <th> Attribute name on element 3625 <tbody><tr><td> <code>attributename</code> <td> <code>attributeName</code> 3626 <tr><td> <code>attributetype</code> <td> <code>attributeType</code> 3627 <tr><td> <code>basefrequency</code> <td> <code>baseFrequency</code> 3628 <tr><td> <code>baseprofile</code> <td> <code>baseProfile</code> 3629 <tr><td> <code>calcmode</code> <td> <code>calcMode</code> 3630 <tr><td> <code>clippathunits</code> <td> <code>clipPathUnits</code> 3631 <tr><td> <code>diffuseconstant</code> <td> <code>diffuseConstant</code> 3632 <tr><td> <code>edgemode</code> <td> <code>edgeMode</code> 3633 <tr><td> <code>filterunits</code> <td> <code>filterUnits</code> 3634 <tr><td> <code>glyphref</code> <td> <code>glyphRef</code> 3635 <tr><td> <code>gradienttransform</code> <td> <code>gradientTransform</code> 3636 <tr><td> <code>gradientunits</code> <td> <code>gradientUnits</code> 3637 <tr><td> <code>kernelmatrix</code> <td> <code>kernelMatrix</code> 3638 <tr><td> <code>kernelunitlength</code> <td> <code>kernelUnitLength</code> 3639 <tr><td> <code>keypoints</code> <td> <code>keyPoints</code> 3640 <tr><td> <code>keysplines</code> <td> <code>keySplines</code> 3641 <tr><td> <code>keytimes</code> <td> <code>keyTimes</code> 3642 <tr><td> <code>lengthadjust</code> <td> <code>lengthAdjust</code> 3643 <tr><td> <code>limitingconeangle</code> <td> <code>limitingConeAngle</code> 3644 <tr><td> <code>markerheight</code> <td> <code>markerHeight</code> 3645 <tr><td> <code>markerunits</code> <td> <code>markerUnits</code> 3646 <tr><td> <code>markerwidth</code> <td> <code>markerWidth</code> 3647 <tr><td> <code>maskcontentunits</code> <td> <code>maskContentUnits</code> 3648 <tr><td> <code>maskunits</code> <td> <code>maskUnits</code> 3649 <tr><td> <code>numoctaves</code> <td> <code>numOctaves</code> 3650 <tr><td> <code>pathlength</code> <td> <code>pathLength</code> 3651 <tr><td> <code>patterncontentunits</code> <td> <code>patternContentUnits</code> 3652 <tr><td> <code>patterntransform</code> <td> <code>patternTransform</code> 3653 <tr><td> <code>patternunits</code> <td> <code>patternUnits</code> 3654 <tr><td> <code>pointsatx</code> <td> <code>pointsAtX</code> 3655 <tr><td> <code>pointsaty</code> <td> <code>pointsAtY</code> 3656 <tr><td> <code>pointsatz</code> <td> <code>pointsAtZ</code> 3657 <tr><td> <code>preservealpha</code> <td> <code>preserveAlpha</code> 3658 <tr><td> <code>preserveaspectratio</code> <td> <code>preserveAspectRatio</code> 3659 <tr><td> <code>primitiveunits</code> <td> <code>primitiveUnits</code> 3660 <tr><td> <code>refx</code> <td> <code>refX</code> 3661 <tr><td> <code>refy</code> <td> <code>refY</code> 3662 <tr><td> <code>repeatcount</code> <td> <code>repeatCount</code> 3663 <tr><td> <code>repeatdur</code> <td> <code>repeatDur</code> 3664 <tr><td> <code>requiredextensions</code> <td> <code>requiredExtensions</code> 3665 <tr><td> <code>requiredfeatures</code> <td> <code>requiredFeatures</code> 3666 <tr><td> <code>specularconstant</code> <td> <code>specularConstant</code> 3667 <tr><td> <code>specularexponent</code> <td> <code>specularExponent</code> 3668 <tr><td> <code>spreadmethod</code> <td> <code>spreadMethod</code> 3669 <tr><td> <code>startoffset</code> <td> <code>startOffset</code> 3670 <tr><td> <code>stddeviation</code> <td> <code>stdDeviation</code> 3671 <tr><td> <code>stitchtiles</code> <td> <code>stitchTiles</code> 3672 <tr><td> <code>surfacescale</code> <td> <code>surfaceScale</code> 3673 <tr><td> <code>systemlanguage</code> <td> <code>systemLanguage</code> 3674 <tr><td> <code>tablevalues</code> <td> <code>tableValues</code> 3675 <tr><td> <code>targetx</code> <td> <code>targetX</code> 3676 <tr><td> <code>targety</code> <td> <code>targetY</code> 3677 <tr><td> <code>textlength</code> <td> <code>textLength</code> 3678 <tr><td> <code>viewbox</code> <td> <code>viewBox</code> 3679 <tr><td> <code>viewtarget</code> <td> <code>viewTarget</code> 3680 <tr><td> <code>xchannelselector</code> <td> <code>xChannelSelector</code> 3681 <tr><td> <code>ychannelselector</code> <td> <code>yChannelSelector</code> 3682 <tr><td> <code>zoomandpan</code> <td> <code>zoomAndPan</code> 3683 </table> 3684 3685 <p>When the steps below require the user agent to <dfn id=adjust-foreign-attributes>adjust foreign attributes</dfn> for a 3686 token, then, if any of the attributes on the token match the strings given in the first column of 3687 the following table, let the attribute be a namespaced attribute, with the prefix being the string 3688 given in the corresponding cell in the second column, the local name being the string given in the 3689 corresponding cell in the third column, and the namespace being the namespace given in the 3690 corresponding cell in the fourth column. (This fixes the use of namespaced attributes, in 3691 particular <a href=dom.html#attr-xml-lang id=creating-and-inserting-nodes:attr-xml-lang><code>lang</code> attributes in the <span>XML 3692 namespace</span></a>.)</p> 3693 3694 <table><thead><tr><th> Attribute name <th> Prefix <th> Local name <th> Namespace 3695 <tbody><tr><td> <code>xlink:actuate</code> <td> <code>xlink</code> <td> <code>actuate</code> <td> <a id=creating-and-inserting-nodes:xlink-namespace-2 href=infrastructure.html#xlink-namespace>XLink namespace</a> 3696 <tr><td> <code>xlink:arcrole</code> <td> <code>xlink</code> <td> <code>arcrole</code> <td> <a id=creating-and-inserting-nodes:xlink-namespace-3 href=infrastructure.html#xlink-namespace>XLink namespace</a> 3697 <tr><td> <code>xlink:href</code> <td> <code>xlink</code> <td> <code>href</code> <td> <a id=creating-and-inserting-nodes:xlink-namespace-4 href=infrastructure.html#xlink-namespace>XLink namespace</a> 3698 <tr><td> <code>xlink:role</code> <td> <code>xlink</code> <td> <code>role</code> <td> <a id=creating-and-inserting-nodes:xlink-namespace-5 href=infrastructure.html#xlink-namespace>XLink namespace</a> 3699 <tr><td> <code>xlink:show</code> <td> <code>xlink</code> <td> <code>show</code> <td> <a id=creating-and-inserting-nodes:xlink-namespace-6 href=infrastructure.html#xlink-namespace>XLink namespace</a> 3700 <tr><td> <code>xlink:title</code> <td> <code>xlink</code> <td> <code>title</code> <td> <a id=creating-and-inserting-nodes:xlink-namespace-7 href=infrastructure.html#xlink-namespace>XLink namespace</a> 3701 <tr><td> <code>xlink:type</code> <td> <code>xlink</code> <td> <code>type</code> <td> <a id=creating-and-inserting-nodes:xlink-namespace-8 href=infrastructure.html#xlink-namespace>XLink namespace</a> 3702 <tr><td> <code>xml:base</code> <td> <code>xml</code> <td> <code>base</code> <td> <a id=creating-and-inserting-nodes:xml-namespace href=infrastructure.html#xml-namespace>XML namespace</a> 3703 <tr><td> <code>xml:lang</code> <td> <code>xml</code> <td> <code>lang</code> <td> <a id=creating-and-inserting-nodes:xml-namespace-2 href=infrastructure.html#xml-namespace>XML namespace</a> 3704 <tr><td> <code>xml:space</code> <td> <code>xml</code> <td> <code>space</code> <td> <a id=creating-and-inserting-nodes:xml-namespace-3 href=infrastructure.html#xml-namespace>XML namespace</a> 3705 <tr><td> <code>xmlns</code> <td> (none) <td> <code>xmlns</code> <td> <a id=creating-and-inserting-nodes:xmlns-namespace-3 href=infrastructure.html#xmlns-namespace>XMLNS namespace</a> 3706 <tr><td> <code>xmlns:xlink</code> <td> <code>xmlns</code> <td> <code>xlink</code> <td> <a id=creating-and-inserting-nodes:xmlns-namespace-4 href=infrastructure.html#xmlns-namespace>XMLNS namespace</a> 3707 </table> 3708 3709 <hr> 3710 3711 <p>When the steps below require the user agent to <dfn id=insert-a-character>insert a character</dfn> while processing a 3712 token, the user agent must run the following steps:</p> 3713 3714 <ol><li><p>Let <var>data</var> be the characters passed to the algorithm, or, if no 3715 characters were explicitly specified, the character of the character token being 3716 processed.<li><p>Let the <var>adjusted insertion location</var> be the <a href=#appropriate-place-for-inserting-a-node id=creating-and-inserting-nodes:appropriate-place-for-inserting-a-node-2>appropriate 3717 place for inserting a node</a>.<li> 3718 3719 <p>If the <var>adjusted insertion location</var> is in a <code id=creating-and-inserting-nodes:document-2><a href=dom.html#document>Document</a></code> node, 3720 then abort these steps. 3721 3722 <p class=note>The DOM will not let <code id=creating-and-inserting-nodes:document-3><a href=dom.html#document>Document</a></code> nodes have <code id=creating-and-inserting-nodes:text><a href=infrastructure.html#text>Text</a></code> node 3723 children, so they are dropped on the floor.</p> 3724 3725 <li> 3726 3727 <p>If there is a <code id=creating-and-inserting-nodes:text-2><a href=infrastructure.html#text>Text</a></code> node immediately before the <var>adjusted insertion 3728 location</var>, then append <var>data</var> to that <code id=creating-and-inserting-nodes:text-3><a href=infrastructure.html#text>Text</a></code> node's data.</p> 3729 3730 <p>Otherwise, create a new <code id=creating-and-inserting-nodes:text-4><a href=infrastructure.html#text>Text</a></code> node whose data is <var>data</var> and 3731 whose <a id=creating-and-inserting-nodes:node-document-3 href=https://dom.spec.whatwg.org/#concept-node-document data-x-internal=node-document>node document</a> is the same as that of the 3732 element in which the <var>adjusted insertion location</var> finds itself, and insert 3733 the newly created node at the <var>adjusted insertion location</var>.</p> 3734 3735 </ol> 3736 3737 <div class=example> 3738 3739 <p>Here are some sample inputs to the parser and the corresponding number of <code id=creating-and-inserting-nodes:text-5><a href=infrastructure.html#text>Text</a></code> 3740 nodes that they result in, assuming a user agent that executes scripts.</p> 3741 3742 <table><thead><tr><th>Input <th>Number of <code id=creating-and-inserting-nodes:text-6><a href=infrastructure.html#text>Text</a></code> nodes 3743 <tbody><tr><td><pre>A<script> 3744 var script = document.getElementsByTagName('script')[0]; 3745 document.body.removeChild(script); 3746 </script>B</pre> 3747 <td>One <code id=creating-and-inserting-nodes:text-7><a href=infrastructure.html#text>Text</a></code> node in the document, containing "AB". 3748 <tr><td><pre>A<script> 3749 var text = document.createTextNode('B'); 3750 document.body.appendChild(text); 3751 </script>C</pre> 3752 <td>Three <code id=creating-and-inserting-nodes:text-8><a href=infrastructure.html#text>Text</a></code> nodes; "A" before the script, the script's contents, and "BC" after the script (the parser appends to the <code id=creating-and-inserting-nodes:text-9><a href=infrastructure.html#text>Text</a></code> node created by the script). 3753 <tr><td><pre>A<script> 3754 var text = document.getElementsByTagName('script')[0].firstChild; 3755 text.data = 'B'; 3756 document.body.appendChild(text); 3757 </script>C</pre> 3758 <td>Two adjacent <code id=creating-and-inserting-nodes:text-10><a href=infrastructure.html#text>Text</a></code> nodes in the document, containing "A" and "BC". 3759 <tr><td><pre>A<table>B<tr>C</tr>D</table></pre> 3760 <td>One <code id=creating-and-inserting-nodes:text-11><a href=infrastructure.html#text>Text</a></code> node before the table, containing "ABCD". (This is caused by <a href=#foster-parent id=creating-and-inserting-nodes:foster-parent-2>foster parenting</a>.) 3761 <tr><td><pre>A<table><tr> B</tr> C</table></pre> 3762 <td>One <code id=creating-and-inserting-nodes:text-12><a href=infrastructure.html#text>Text</a></code> node before the table, containing "A B C" (A-space-B-space-C). (This is caused by <a href=#foster-parent id=creating-and-inserting-nodes:foster-parent-3>foster parenting</a>.) 3763 <tr><td><pre>A<table><tr> B</tr> </em>C</table></pre> 3764 <td>One <code id=creating-and-inserting-nodes:text-13><a href=infrastructure.html#text>Text</a></code> node before the table, containing "A BC" (A-space-B-C), and one <code id=creating-and-inserting-nodes:text-14><a href=infrastructure.html#text>Text</a></code> node inside the table (as a child of a <code id=creating-and-inserting-nodes:the-tbody-element-2><a href=tables.html#the-tbody-element>tbody</a></code>) with a single space character. (Space characters separated from non-space characters by non-character tokens are not affected by <a href=#foster-parent id=creating-and-inserting-nodes:foster-parent-4>foster parenting</a>, even if those other tokens then get ignored.) 3765 </table> 3766 3767 </div> 3768 3769 <hr> 3770 3771 <p>When the steps below require the user agent to <dfn id=insert-a-comment>insert a comment</dfn> while processing a 3772 comment token, optionally with an explicitly insertion position <var>position</var>, the 3773 user agent must run the following steps:</p> 3774 3775 <ol><li><p>Let <var>data</var> be the data given in the comment token being 3776 processed.<li><p>If <var>position</var> was specified, then let the <var>adjusted 3777 insertion location</var> be <var>position</var>. Otherwise, let <var>adjusted 3778 insertion location</var> be the <a href=#appropriate-place-for-inserting-a-node id=creating-and-inserting-nodes:appropriate-place-for-inserting-a-node-3>appropriate place for inserting a node</a>.<li><p>Create a <code id=creating-and-inserting-nodes:comment-2><a href=infrastructure.html#comment-2>Comment</a></code> node whose <code>data</code> attribute is set to 3779 <var>data</var> and whose <a id=creating-and-inserting-nodes:node-document-4 href=https://dom.spec.whatwg.org/#concept-node-document data-x-internal=node-document>node document</a> is 3780 the same as that of the node in which the <var>adjusted insertion location</var> finds 3781 itself.</p> 3782 3783 <li><p>Insert the newly created node at the <var>adjusted insertion 3784 location</var>.</ol> 3785 3786 <hr> 3787 3788 <p id=mutation-during-parsing>DOM mutation events must not fire for changes caused by the UA 3789 parsing the document. This includes the parsing of any content inserted using <code id=creating-and-inserting-nodes:dom-document-write><a href=webappapis.html#dom-document-write>document.write()</a></code> and <code id=creating-and-inserting-nodes:dom-document-writeln><a href=webappapis.html#dom-document-writeln>document.writeln()</a></code> calls. <a href=references.html#refsDOMEVENTS>[DOMEVENTS]</a></p> 3790 3791 <p>However, <a id=creating-and-inserting-nodes:mutation-observers href=https://dom.spec.whatwg.org/#mutation-observers data-x-internal=mutation-observers>mutation observers</a> <em>do</em> fire, as required by the DOM specification.</p> 3792 3793 3794 3795 <h5 id=parsing-elements-that-contain-only-text>12.2.5.2 Parsing elements that contain only text</h5> 3796 3797 <p>The <dfn id=generic-raw-text-element-parsing-algorithm>generic raw text element parsing algorithm</dfn> and the <dfn id=generic-rcdata-element-parsing-algorithm>generic RCDATA element 3798 parsing algorithm</dfn> consist of the following steps. These algorithms are always invoked in 3799 response to a start tag token.</p> 3800 3801 <ol><li><p><a href=#insert-an-html-element id=parsing-elements-that-contain-only-text:insert-an-html-element>Insert an HTML element</a> for the token.<li><p>If the algorithm that was invoked is the <a href=#generic-raw-text-element-parsing-algorithm id=parsing-elements-that-contain-only-text:generic-raw-text-element-parsing-algorithm>generic raw text element parsing 3802 algorithm</a>, switch the tokenizer to the <a href=#rawtext-state id=parsing-elements-that-contain-only-text:rawtext-state>RAWTEXT state</a>; otherwise the algorithm 3803 invoked was the <a href=#generic-rcdata-element-parsing-algorithm id=parsing-elements-that-contain-only-text:generic-rcdata-element-parsing-algorithm>generic RCDATA element parsing algorithm</a>, switch the tokenizer to 3804 the <a href=#rcdata-state id=parsing-elements-that-contain-only-text:rcdata-state>RCDATA state</a>.<li><p>Let the <a href=#original-insertion-mode id=parsing-elements-that-contain-only-text:original-insertion-mode>original insertion mode</a> be the current <a href=#insertion-mode id=parsing-elements-that-contain-only-text:insertion-mode>insertion 3805 mode</a>.</p> 3806 3807 <li><p>Then, switch the <a href=#insertion-mode id=parsing-elements-that-contain-only-text:insertion-mode-2>insertion mode</a> to "<a href=#parsing-main-incdata id=parsing-elements-that-contain-only-text:parsing-main-incdata>text</a>".</ol> 3808 3809 3810 <h5 id=closing-elements-that-have-implied-end-tags>12.2.5.3 Closing elements that have implied end tags</h5> 3811 3812 <p>When the steps below require the UA to <dfn id=generate-implied-end-tags>generate implied end tags</dfn>, then, while the 3813 <a href=#current-node id=closing-elements-that-have-implied-end-tags:current-node>current node</a> is a <code id=closing-elements-that-have-implied-end-tags:the-dd-element><a href=semantics.html#the-dd-element>dd</a></code> element, a <code id=closing-elements-that-have-implied-end-tags:the-dt-element><a href=semantics.html#the-dt-element>dt</a></code> element, an 3814 <code id=closing-elements-that-have-implied-end-tags:the-li-element><a href=semantics.html#the-li-element>li</a></code> element, an <code id=closing-elements-that-have-implied-end-tags:the-option-element><a href=forms.html#the-option-element>option</a></code> element, an <code id=closing-elements-that-have-implied-end-tags:the-optgroup-element><a href=forms.html#the-optgroup-element>optgroup</a></code> element, a 3815 <code id=closing-elements-that-have-implied-end-tags:the-p-element><a href=semantics.html#the-p-element>p</a></code> element, an <code id=closing-elements-that-have-implied-end-tags:the-rp-element><a href=semantics.html#the-rp-element>rp</a></code> element, or an <code id=closing-elements-that-have-implied-end-tags:the-rt-element><a href=semantics.html#the-rt-element>rt</a></code> element, the UA must pop 3816 the <a href=#current-node id=closing-elements-that-have-implied-end-tags:current-node-2>current node</a> off the <a href=#stack-of-open-elements id=closing-elements-that-have-implied-end-tags:stack-of-open-elements>stack of open elements</a>.</p> 3817 3818 <p>If a step requires the UA to generate implied end tags but lists an element to exclude from the 3819 process, then the UA must perform the above steps as if that element was not in the above 3820 list.</p> 3821 3822 <p>When the steps below require the UA to <dfn id=generate-all-implied-end-tags-thoroughly>generate all implied end tags thoroughly</dfn>, 3823 then, while the <a href=#current-node id=closing-elements-that-have-implied-end-tags:current-node-3>current node</a> is a <code id=closing-elements-that-have-implied-end-tags:the-caption-element><a href=tables.html#the-caption-element>caption</a></code> element, a 3824 <code id=closing-elements-that-have-implied-end-tags:the-colgroup-element><a href=tables.html#the-colgroup-element>colgroup</a></code> element, a <code id=closing-elements-that-have-implied-end-tags:the-dd-element-2><a href=semantics.html#the-dd-element>dd</a></code> element, a <code id=closing-elements-that-have-implied-end-tags:the-dt-element-2><a href=semantics.html#the-dt-element>dt</a></code> element, an 3825 <code id=closing-elements-that-have-implied-end-tags:the-li-element-2><a href=semantics.html#the-li-element>li</a></code> element, an <code id=closing-elements-that-have-implied-end-tags:the-option-element-2><a href=forms.html#the-option-element>option</a></code> element, an <code id=closing-elements-that-have-implied-end-tags:the-optgroup-element-2><a href=forms.html#the-optgroup-element>optgroup</a></code> element, a 3826 <code id=closing-elements-that-have-implied-end-tags:the-p-element-2><a href=semantics.html#the-p-element>p</a></code> element, an <code id=closing-elements-that-have-implied-end-tags:the-rp-element-2><a href=semantics.html#the-rp-element>rp</a></code> element, an <code id=closing-elements-that-have-implied-end-tags:the-rt-element-2><a href=semantics.html#the-rt-element>rt</a></code> element, a 3827 <code id=closing-elements-that-have-implied-end-tags:the-tbody-element><a href=tables.html#the-tbody-element>tbody</a></code> element, a <code id=closing-elements-that-have-implied-end-tags:the-td-element><a href=tables.html#the-td-element>td</a></code> element, a <code id=closing-elements-that-have-implied-end-tags:the-tfoot-element><a href=tables.html#the-tfoot-element>tfoot</a></code> element, a 3828 <code id=closing-elements-that-have-implied-end-tags:the-th-element><a href=tables.html#the-th-element>th</a></code> element, a <code id=closing-elements-that-have-implied-end-tags:the-thead-element><a href=tables.html#the-thead-element>thead</a></code> element, or a <code id=closing-elements-that-have-implied-end-tags:the-tr-element><a href=tables.html#the-tr-element>tr</a></code> element, the UA must 3829 pop the <a href=#current-node id=closing-elements-that-have-implied-end-tags:current-node-4>current node</a> off the <a href=#stack-of-open-elements id=closing-elements-that-have-implied-end-tags:stack-of-open-elements-2>stack of open elements</a>.</p> 3830 3831 3832 3833 <h5 id=parsing-main-inhtml>12.2.5.4 The rules for parsing tokens in HTML content</h5> 3834 3835 3836 <h6 id=the-initial-insertion-mode>12.2.5.4.1 The "<dfn>initial</dfn>" insertion mode</h6> 3837 3838 <p>When the user agent is to apply the rules for the "<a href=#the-initial-insertion-mode id=the-initial-insertion-mode:the-initial-insertion-mode>initial</a>" <a href=#insertion-mode id=the-initial-insertion-mode:insertion-mode>insertion mode</a>, the user agent must handle the token as 3839 follows:</p> 3840 3841 <dl class=switch><dt>A character token that is one of U+0009 CHARACTER 3842 TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF), 3843 U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dd> 3844 <p>Ignore the token.</p> 3845 <dt>A comment token<dd> 3846 <p><a href=#insert-a-comment id=the-initial-insertion-mode:insert-a-comment>Insert a comment</a> as the last child of the <code id=the-initial-insertion-mode:document><a href=dom.html#document>Document</a></code> object.</p> 3847 <dt>A DOCTYPE token<dd> 3848 3849 <p>If the DOCTYPE token's name is not a <a id=the-initial-insertion-mode:case-sensitive href=infrastructure.html#case-sensitive>case-sensitive</a> match for the string "<code>html</code>", or the token's public identifier is not missing, or the token's system 3850 identifier is neither missing nor a <a id=the-initial-insertion-mode:case-sensitive-2 href=infrastructure.html#case-sensitive>case-sensitive</a> match for the string 3851 "<code id=the-initial-insertion-mode:about:legacy-compat><a href=infrastructure.html#about:legacy-compat>about:legacy-compat</a></code>", and none of the sets of conditions in the following list are 3852 matched, then there is a <a href=#parse-error id=the-initial-insertion-mode:parse-error>parse error</a>.</p> 3853 3854 <ul><li>The DOCTYPE token's name is a <a id=the-initial-insertion-mode:case-sensitive-3 href=infrastructure.html#case-sensitive>case-sensitive</a> match for the string "<code>html</code>", the token's public identifier is the <a id=the-initial-insertion-mode:case-sensitive-4 href=infrastructure.html#case-sensitive>case-sensitive</a> string 3855 "<code>-//W3C//DTD HTML 4.0//EN</code>", and the token's system identifier 3856 is either missing or the <a id=the-initial-insertion-mode:case-sensitive-5 href=infrastructure.html#case-sensitive>case-sensitive</a> string "<code>http://www.w3.org/TR/REC-html40/strict.dtd</code>".<li>The DOCTYPE token's name is a <a id=the-initial-insertion-mode:case-sensitive-6 href=infrastructure.html#case-sensitive>case-sensitive</a> match for the string "<code>html</code>", the token's public identifier is the <a id=the-initial-insertion-mode:case-sensitive-7 href=infrastructure.html#case-sensitive>case-sensitive</a> string 3857 "<code>-//W3C//DTD HTML 4.01//EN</code>", and the token's system identifier 3858 is either missing or the <a id=the-initial-insertion-mode:case-sensitive-8 href=infrastructure.html#case-sensitive>case-sensitive</a> string "<code>http://www.w3.org/TR/html4/strict.dtd</code>".<li>The DOCTYPE token's name is a <a id=the-initial-insertion-mode:case-sensitive-9 href=infrastructure.html#case-sensitive>case-sensitive</a> match for the string "<code>html</code>", the token's public identifier is the <a id=the-initial-insertion-mode:case-sensitive-10 href=infrastructure.html#case-sensitive>case-sensitive</a> string 3859 "<code>-//W3C//DTD XHTML 1.0 Strict//EN</code>", and the token's system 3860 identifier is the <a id=the-initial-insertion-mode:case-sensitive-11 href=infrastructure.html#case-sensitive>case-sensitive</a> string "<code>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</code>".<li>The DOCTYPE token's name is a <a id=the-initial-insertion-mode:case-sensitive-12 href=infrastructure.html#case-sensitive>case-sensitive</a> match for the string "<code>html</code>", the token's public identifier is the <a id=the-initial-insertion-mode:case-sensitive-13 href=infrastructure.html#case-sensitive>case-sensitive</a> string 3861 "<code>-//W3C//DTD XHTML 1.1//EN</code>", and the token's system identifier 3862 is the <a id=the-initial-insertion-mode:case-sensitive-14 href=infrastructure.html#case-sensitive>case-sensitive</a> string "<code>http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd</code>".</ul> 3863 3864 <p>Conformance checkers may, based on the values (including presence or lack thereof) of the 3865 DOCTYPE token's name, public identifier, or system identifier, switch to a conformance checking 3866 mode for another language (e.g. based on the DOCTYPE token a conformance checker could recognise 3867 that the document is an HTML4-era document, and defer to an HTML4 conformance checker.)</p> 3868 3869 <p>Append a <code id=the-initial-insertion-mode:documenttype><a href=infrastructure.html#documenttype>DocumentType</a></code> node to the <code id=the-initial-insertion-mode:document-2><a href=dom.html#document>Document</a></code> node, with the <code>name</code> attribute set to the name given in the DOCTYPE token, or the empty string 3870 if the name was missing; the <code>publicId</code> attribute set to the public 3871 identifier given in the DOCTYPE token, or the empty string if the public identifier was missing; 3872 the <code>systemId</code> attribute set to the system identifier given in the DOCTYPE 3873 token, or the empty string if the system identifier was missing; and the other attributes 3874 specific to <code id=the-initial-insertion-mode:documenttype-2><a href=infrastructure.html#documenttype>DocumentType</a></code> objects set to null and empty lists as appropriate. 3875 Associate the <code id=the-initial-insertion-mode:documenttype-3><a href=infrastructure.html#documenttype>DocumentType</a></code> node with the <code id=the-initial-insertion-mode:document-3><a href=dom.html#document>Document</a></code> object so that it is 3876 returned as the value of the <code>doctype</code> attribute of the 3877 <code id=the-initial-insertion-mode:document-4><a href=dom.html#document>Document</a></code> object.</p> 3878 3879 <p id=quirks-mode-doctypes>Then, if the document is <em>not</em> <a id=the-initial-insertion-mode:an-iframe-srcdoc-document href=embedded-content.html#an-iframe-srcdoc-document>an <code>iframe</code> 3880 <code>srcdoc</code> document</a>, and the DOCTYPE token matches 3881 one of the conditions in the following list, then set the <code id=the-initial-insertion-mode:document-5><a href=dom.html#document>Document</a></code> to <a id=the-initial-insertion-mode:quirks-mode href=infrastructure.html#quirks-mode>quirks 3882 mode</a>:</p> 3883 3884 <ul class=brief><li> The <i id=the-initial-insertion-mode:force-quirks-flag><a href=#force-quirks-flag>force-quirks flag</a></i> is set to <i>on</i>. <li> The name is set to anything other than "<code>html</code>" (compared <a href=infrastructure.html#case-sensitive id=the-initial-insertion-mode:case-sensitive-15>case-sensitively</a>). <li> The public identifier is set to: "<code>-//W3O//DTD W3 HTML Strict 3.0//EN//</code>" <li> The public identifier is set to: "<code>-/W3C/DTD HTML 4.0 Transitional/EN</code>" <li> The public identifier is set to: "<code>HTML</code>" <li> The system identifier is set to: "<code>http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd</code>" <li> The public identifier starts with: "<code>+//Silmaril//dtd html Pro v0r11 19970101//</code>" <li> The public identifier starts with: "<code>-//AS//DTD HTML 3.0 asWedit + extensions//</code>" <li> The public identifier starts with: "<code>-//AdvaSoft Ltd//DTD HTML 3.0 asWedit + extensions//</code>" <li> The public identifier starts with: "<code>-//IETF//DTD HTML 2.0 Level 1//</code>" <li> The public identifier starts with: "<code>-//IETF//DTD HTML 2.0 Level 2//</code>" <li> The public identifier starts with: "<code>-//IETF//DTD HTML 2.0 Strict Level 1//</code>" <li> The public identifier starts with: "<code>-//IETF//DTD HTML 2.0 Strict Level 2//</code>" <li> The public identifier starts with: "<code>-//IETF//DTD HTML 2.0 Strict//</code>" <li> The public identifier starts with: "<code>-//IETF//DTD HTML 2.0//</code>" <li> The public identifier starts with: "<code>-//IETF//DTD HTML 2.1E//</code>" <li> The public identifier starts with: "<code>-//IETF//DTD HTML 3.0//</code>" <li> The public identifier starts with: "<code>-//IETF//DTD HTML 3.2 Final//</code>" <li> The public identifier starts with: "<code>-//IETF//DTD HTML 3.2//</code>" <li> The public identifier starts with: "<code>-//IETF//DTD HTML 3//</code>" <li> The public identifier starts with: "<code>-//IETF//DTD HTML Level 0//</code>" <li> The public identifier starts with: "<code>-//IETF//DTD HTML Level 1//</code>" <li> The public identifier starts with: "<code>-//IETF//DTD HTML Level 2//</code>" <li> The public identifier starts with: "<code>-//IETF//DTD HTML Level 3//</code>" <li> The public identifier starts with: "<code>-//IETF//DTD HTML Strict Level 0//</code>" <li> The public identifier starts with: "<code>-//IETF//DTD HTML Strict Level 1//</code>" <li> The public identifier starts with: "<code>-//IETF//DTD HTML Strict Level 2//</code>" <li> The public identifier starts with: "<code>-//IETF//DTD HTML Strict Level 3//</code>" <li> The public identifier starts with: "<code>-//IETF//DTD HTML Strict//</code>" <li> The public identifier starts with: "<code>-//IETF//DTD HTML//</code>" <li> The public identifier starts with: "<code>-//Metrius//DTD Metrius Presentational//</code>" <li> The public identifier starts with: "<code>-//Microsoft//DTD Internet Explorer 2.0 HTML Strict//</code>" <li> The public identifier starts with: "<code>-//Microsoft//DTD Internet Explorer 2.0 HTML//</code>" <li> The public identifier starts with: "<code>-//Microsoft//DTD Internet Explorer 2.0 Tables//</code>" <li> The public identifier starts with: "<code>-//Microsoft//DTD Internet Explorer 3.0 HTML Strict//</code>" <li> The public identifier starts with: "<code>-//Microsoft//DTD Internet Explorer 3.0 HTML//</code>" <li> The public identifier starts with: "<code>-//Microsoft//DTD Internet Explorer 3.0 Tables//</code>" <li> The public identifier starts with: "<code>-//Netscape Comm. Corp.//DTD HTML//</code>" <li> The public identifier starts with: "<code>-//Netscape Comm. Corp.//DTD Strict HTML//</code>" <li> The public identifier starts with: "<code>-//O'Reilly and Associates//DTD HTML 2.0//</code>" <li> The public identifier starts with: "<code>-//O'Reilly and Associates//DTD HTML Extended 1.0//</code>" <li> The public identifier starts with: "<code>-//O'Reilly and Associates//DTD HTML Extended Relaxed 1.0//</code>" <li> The public identifier starts with: "<code>-//SQ//DTD HTML 2.0 HoTMetaL + extensions//</code>" <li> The public identifier starts with: "<code>-//SoftQuad Software//DTD HoTMetaL PRO 6.0::19990601::extensions to HTML 4.0//</code>" <li> The public identifier starts with: "<code>-//SoftQuad//DTD HoTMetaL PRO 4.0::19971010::extensions to HTML 4.0//</code>" <li> The public identifier starts with: "<code>-//Spyglass//DTD HTML 2.0 Extended//</code>" <li> The public identifier starts with: "<code>-//Sun Microsystems Corp.//DTD HotJava HTML//</code>" <li> The public identifier starts with: "<code>-//Sun Microsystems Corp.//DTD HotJava Strict HTML//</code>" <li> The public identifier starts with: "<code>-//W3C//DTD HTML 3 1995-03-24//</code>" <li> The public identifier starts with: "<code>-//W3C//DTD HTML 3.2 Draft//</code>" <li> The public identifier starts with: "<code>-//W3C//DTD HTML 3.2 Final//</code>" <li> The public identifier starts with: "<code>-//W3C//DTD HTML 3.2//</code>" <li> The public identifier starts with: "<code>-//W3C//DTD HTML 3.2S Draft//</code>" <li> The public identifier starts with: "<code>-//W3C//DTD HTML 4.0 Frameset//</code>" <li> The public identifier starts with: "<code>-//W3C//DTD HTML 4.0 Transitional//</code>" <li> The public identifier starts with: "<code>-//W3C//DTD HTML Experimental 19960712//</code>" <li> The public identifier starts with: "<code>-//W3C//DTD HTML Experimental 970421//</code>" <li> The public identifier starts with: "<code>-//W3C//DTD W3 HTML//</code>" <li> The public identifier starts with: "<code>-//W3O//DTD W3 HTML 3.0//</code>" <li> The public identifier starts with: "<code>-//WebTechs//DTD Mozilla HTML 2.0//</code>" <li> The public identifier starts with: "<code>-//WebTechs//DTD Mozilla HTML//</code>" <li> The system identifier is missing and the public identifier starts with: "<code>-//W3C//DTD HTML 4.01 Frameset//</code>" <li> The system identifier is missing and the public identifier starts with: "<code>-//W3C//DTD HTML 4.01 Transitional//</code>" </ul> 3885 3886 <p>Otherwise, if the document is <em>not</em> <a id=the-initial-insertion-mode:an-iframe-srcdoc-document-2 href=embedded-content.html#an-iframe-srcdoc-document>an <code>iframe</code> <code>srcdoc</code> document</a>, and the DOCTYPE token matches one of 3887 the conditions in the following list, then set the <code id=the-initial-insertion-mode:document-6><a href=dom.html#document>Document</a></code> to <a id=the-initial-insertion-mode:limited-quirks-mode href=infrastructure.html#limited-quirks-mode>limited-quirks 3888 mode</a>:</p> 3889 3890 <ul class=brief><li> The public identifier starts with: "<code>-//W3C//DTD XHTML 1.0 Frameset//</code>" <li> The public identifier starts with: "<code>-//W3C//DTD XHTML 1.0 Transitional//</code>" <li> The system identifier is not missing and the public identifier starts with: "<code>-//W3C//DTD HTML 4.01 Frameset//</code>" <li> The system identifier is not missing and the public identifier starts with: "<code>-//W3C//DTD HTML 4.01 Transitional//</code>" </ul> 3891 3892 <p>The system identifier and public identifier strings must be compared to the values given in 3893 the lists above in an <a id=the-initial-insertion-mode:ascii-case-insensitive href=infrastructure.html#ascii-case-insensitive>ASCII case-insensitive</a> manner. A system identifier whose 3894 value is the empty string is not considered missing for the purposes of the conditions 3895 above.</p> 3896 3897 <p>Then, switch the <a href=#insertion-mode id=the-initial-insertion-mode:insertion-mode-2>insertion mode</a> to "<a href=#the-before-html-insertion-mode id=the-initial-insertion-mode:the-before-html-insertion-mode>before html</a>".</p> 3898 3899 <dt>Anything else<dd> 3900 3901 <p>If the document is <em>not</em> <a id=the-initial-insertion-mode:an-iframe-srcdoc-document-3 href=embedded-content.html#an-iframe-srcdoc-document>an <code>iframe</code> <code>srcdoc</code> document</a>, then this is a <a href=#parse-error id=the-initial-insertion-mode:parse-error-2>parse 3902 error</a>; set the <code id=the-initial-insertion-mode:document-7><a href=dom.html#document>Document</a></code> to <a id=the-initial-insertion-mode:quirks-mode-2 href=infrastructure.html#quirks-mode>quirks mode</a>.</p> 3903 3904 <p>In any case, switch the <a href=#insertion-mode id=the-initial-insertion-mode:insertion-mode-3>insertion mode</a> to "<a href=#the-before-html-insertion-mode id=the-initial-insertion-mode:the-before-html-insertion-mode-2>before html</a>", then reprocess the token.</p> 3905 3906 </dl> 3907 3908 3909 <h6 id=the-before-html-insertion-mode>12.2.5.4.2 The "<dfn>before html</dfn>" insertion mode</h6> 3910 3911 <p>When the user agent is to apply the rules for the "<a href=#the-before-html-insertion-mode id=the-before-html-insertion-mode:the-before-html-insertion-mode>before html</a>" <a href=#insertion-mode id=the-before-html-insertion-mode:insertion-mode>insertion mode</a>, the user agent must handle the token as 3912 follows:</p> 3913 3914 <dl class=switch><dt>A DOCTYPE token<dd> 3915 <p><a href=#parse-error id=the-before-html-insertion-mode:parse-error>Parse error</a>. Ignore the token.</p> 3916 <dt>A comment token<dd> 3917 <p><a href=#insert-a-comment id=the-before-html-insertion-mode:insert-a-comment>Insert a comment</a> as the last child of the <code id=the-before-html-insertion-mode:document><a href=dom.html#document>Document</a></code> object.</p> 3918 <dt>A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C 3919 FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dd> 3920 <p>Ignore the token.</p> 3921 <dt>A start tag whose tag name is "html"<dd> 3922 3923 <p><a href=#create-an-element-for-the-token id=the-before-html-insertion-mode:create-an-element-for-the-token>Create an element for the token</a> in the <a id=the-before-html-insertion-mode:html-namespace-2 href=infrastructure.html#html-namespace-2>HTML namespace</a>, with the 3924 <code id=the-before-html-insertion-mode:document-2><a href=dom.html#document>Document</a></code> as the intended parent. Append it to the <code id=the-before-html-insertion-mode:document-3><a href=dom.html#document>Document</a></code> object. Put 3925 this element in the <a href=#stack-of-open-elements id=the-before-html-insertion-mode:stack-of-open-elements>stack of open elements</a>.</p> 3926 3927 <p id=parser-appcache>If the <code id=the-before-html-insertion-mode:document-4><a href=dom.html#document>Document</a></code> is being loaded as part of <a href=browsers.html#navigate id=the-before-html-insertion-mode:navigate>navigation</a> of a <a id=the-before-html-insertion-mode:browsing-context href=browsers.html#browsing-context>browsing context</a>, then: if the newly 3928 created element has a <code id=the-before-html-insertion-mode:attr-html-manifest><a href=semantics.html#attr-html-manifest>manifest</a></code> attribute whose value is 3929 not the empty string, then <a href=infrastructure.html#resolve-a-url id=the-before-html-insertion-mode:resolve-a-url>resolve</a> the value of that 3930 attribute to an <a id=the-before-html-insertion-mode:absolute-url href=infrastructure.html#absolute-url>absolute URL</a>, relative to the newly created element, and if that is 3931 successful, run the <a href=browsers.html#concept-appcache-init id=the-before-html-insertion-mode:concept-appcache-init>application cache selection 3932 algorithm</a> with the result of applying the <a href=infrastructure.html#concept-url-serialiser id=the-before-html-insertion-mode:concept-url-serialiser>URL 3933 serialiser</a> algorithm to the resulting <a id=the-before-html-insertion-mode:parsed-url href=infrastructure.html#parsed-url>parsed URL</a> with the <i>exclude 3934 fragment flag</i> set; otherwise, if there is no such attribute, or its value is the empty 3935 string, or resolving its value fails, run the <a href=browsers.html#concept-appcache-init id=the-before-html-insertion-mode:concept-appcache-init-2>application 3936 cache selection algorithm</a> with no manifest. The algorithm must be passed the 3937 <code id=the-before-html-insertion-mode:document-5><a href=dom.html#document>Document</a></code> object.</p> 3938 3939 <p>Switch the <a href=#insertion-mode id=the-before-html-insertion-mode:insertion-mode-2>insertion mode</a> to "<a href=#the-before-head-insertion-mode id=the-before-html-insertion-mode:the-before-head-insertion-mode>before 3940 head</a>".</p> 3941 3942 <dt>An end tag whose tag name is one of: "head", "body", "html", "br"<dd> 3943 <p>Act as described in the "anything else" entry below.</p> 3944 <dt>Any other end tag<dd> 3945 <p><a href=#parse-error id=the-before-html-insertion-mode:parse-error-2>Parse error</a>. Ignore the token.</p> 3946 <dt>Anything else<dd> 3947 3948 <p>Create an <code id=the-before-html-insertion-mode:the-html-element><a href=semantics.html#the-html-element>html</a></code> element whose <a id=the-before-html-insertion-mode:node-document href=https://dom.spec.whatwg.org/#concept-node-document data-x-internal=node-document>node document</a> is the <code id=the-before-html-insertion-mode:document-6><a href=dom.html#document>Document</a></code> object. Append 3949 it to the <code id=the-before-html-insertion-mode:document-7><a href=dom.html#document>Document</a></code> object. Put this element in the <a href=#stack-of-open-elements id=the-before-html-insertion-mode:stack-of-open-elements-2>stack of open 3950 elements</a>.</p> 3951 3952 <p>If the <code id=the-before-html-insertion-mode:document-8><a href=dom.html#document>Document</a></code> is being loaded as part of <a href=browsers.html#navigate id=the-before-html-insertion-mode:navigate-2>navigation</a> of a <a id=the-before-html-insertion-mode:browsing-context-2 href=browsers.html#browsing-context>browsing context</a>, then: run the <a href=browsers.html#concept-appcache-init id=the-before-html-insertion-mode:concept-appcache-init-3>application cache selection algorithm</a> with no manifest, 3953 passing it the <code id=the-before-html-insertion-mode:document-9><a href=dom.html#document>Document</a></code> object.</p> 3954 3955 <p>Switch the <a href=#insertion-mode id=the-before-html-insertion-mode:insertion-mode-3>insertion mode</a> to "<a href=#the-before-head-insertion-mode id=the-before-html-insertion-mode:the-before-head-insertion-mode-2>before 3956 head</a>", then reprocess the token.</p> 3957 3958 </dl> 3959 3960 <p>The root element can end up being removed from the <code id=the-before-html-insertion-mode:document-10><a href=dom.html#document>Document</a></code> object, e.g. by 3961 scripts; nothing in particular happens in such cases, content continues being appended to the 3962 nodes as described in the next section.</p> 3963 3964 3965 <h6 id=the-before-head-insertion-mode>12.2.5.4.3 The "<dfn>before head</dfn>" insertion mode</h6> 3966 3967 <p>When the user agent is to apply the rules for the "<a href=#the-before-head-insertion-mode id=the-before-head-insertion-mode:the-before-head-insertion-mode>before head</a>" <a href=#insertion-mode id=the-before-head-insertion-mode:insertion-mode>insertion mode</a>, the user agent must handle the token as 3968 follows:</p> 3969 3970 <dl class=switch><dt>A character token that is one of U+0009 CHARACTER 3971 TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF), 3972 U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dd> 3973 <p>Ignore the token.</p> 3974 <dt>A comment token<dd> 3975 <p><a href=#insert-a-comment id=the-before-head-insertion-mode:insert-a-comment>Insert a comment</a>.</p> 3976 <dt>A DOCTYPE token<dd> 3977 <p><a href=#parse-error id=the-before-head-insertion-mode:parse-error>Parse error</a>. Ignore the token.</p> 3978 <dt>A start tag whose tag name is "html"<dd> 3979 <p>Process the token <a href=#using-the-rules-for id=the-before-head-insertion-mode:using-the-rules-for>using the rules for</a> the "<a href=#parsing-main-inbody id=the-before-head-insertion-mode:parsing-main-inbody>in body</a>" <a href=#insertion-mode id=the-before-head-insertion-mode:insertion-mode-2>insertion mode</a>.</p> 3980 <dt>A start tag whose tag name is "head"<dd> 3981 3982 <p><a href=#insert-an-html-element id=the-before-head-insertion-mode:insert-an-html-element>Insert an HTML element</a> for the token.</p> 3983 3984 <p>Set the <a href=#head-element-pointer id=the-before-head-insertion-mode:head-element-pointer><code>head</code> element pointer</a> to the newly created 3985 <code id=the-before-head-insertion-mode:the-head-element><a href=semantics.html#the-head-element>head</a></code> element.</p> 3986 3987 <p>Switch the <a href=#insertion-mode id=the-before-head-insertion-mode:insertion-mode-3>insertion mode</a> to "<a href=#parsing-main-inhead id=the-before-head-insertion-mode:parsing-main-inhead>in 3988 head</a>".</p> 3989 3990 <dt>An end tag whose tag name is one of: "head", "body", "html", "br"<dd> 3991 3992 <p>Act as described in the "anything else" entry below.</p> 3993 3994 <dt>Any other end tag<dd> 3995 3996 <p><a href=#parse-error id=the-before-head-insertion-mode:parse-error-2>Parse error</a>. Ignore the token.</p> 3997 3998 <dt>Anything else<dd> 3999 4000 4001 4002 <p><a href=#insert-an-html-element id=the-before-head-insertion-mode:insert-an-html-element-2>Insert an HTML element</a> for a "head" start tag token with no attributes.</p> 4003 4004 <p>Set the <a href=#head-element-pointer id=the-before-head-insertion-mode:head-element-pointer-2><code>head</code> element pointer</a> to the newly created 4005 <code id=the-before-head-insertion-mode:the-head-element-2><a href=semantics.html#the-head-element>head</a></code> element.</p> 4006 4007 <p>Switch the <a href=#insertion-mode id=the-before-head-insertion-mode:insertion-mode-4>insertion mode</a> to "<a href=#parsing-main-inhead id=the-before-head-insertion-mode:parsing-main-inhead-2>in 4008 head</a>".</p> 4009 4010 4011 4012 <p>Reprocess the current token.</p> 4013 4014 </dl> 4015 4016 4017 <h6 id=parsing-main-inhead>12.2.5.4.4 The "<dfn>in head</dfn>" insertion mode</h6> 4018 4019 <p>When the user agent is to apply the rules for the "<a href=#parsing-main-inhead id=parsing-main-inhead:parsing-main-inhead>in 4020 head</a>" <a href=#insertion-mode id=parsing-main-inhead:insertion-mode>insertion mode</a>, the user agent must handle the token as follows:</p> 4021 4022 <dl class=switch><dt>A character token that is one of U+0009 CHARACTER 4023 TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF), 4024 U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dd> 4025 <p><a href=#insert-a-character id=parsing-main-inhead:insert-a-character>Insert the character</a>.</p> 4026 <dt>A comment token<dd> 4027 <p><a href=#insert-a-comment id=parsing-main-inhead:insert-a-comment>Insert a comment</a>.</p> 4028 <dt>A DOCTYPE token<dd> 4029 <p><a href=#parse-error id=parsing-main-inhead:parse-error>Parse error</a>. Ignore the token.</p> 4030 <dt>A start tag whose tag name is "html"<dd> 4031 <p>Process the token <a href=#using-the-rules-for id=parsing-main-inhead:using-the-rules-for>using the rules for</a> the "<a href=#parsing-main-inbody id=parsing-main-inhead:parsing-main-inbody>in body</a>" <a href=#insertion-mode id=parsing-main-inhead:insertion-mode-2>insertion mode</a>.</p> 4032 <dt>A start tag whose tag name is one of: "base", "basefont", 4033 "bgsound", "link"<dd> 4034 4035 <p><a href=#insert-an-html-element id=parsing-main-inhead:insert-an-html-element>Insert an HTML element</a> for the token. Immediately pop the <a href=#current-node id=parsing-main-inhead:current-node>current 4036 node</a> off the <a href=#stack-of-open-elements id=parsing-main-inhead:stack-of-open-elements>stack of open elements</a>.</p> 4037 4038 <p><a href=#acknowledge-self-closing-flag id=parsing-main-inhead:acknowledge-self-closing-flag>Acknowledge the token's <i>self-closing 4039 flag</i></a>, if it is set.</p> 4040 4041 <dt>A start tag whose tag name is "meta"<dd> 4042 4043 <p><a href=#insert-an-html-element id=parsing-main-inhead:insert-an-html-element-2>Insert an HTML element</a> for the token. Immediately pop the <a href=#current-node id=parsing-main-inhead:current-node-2>current 4044 node</a> off the <a href=#stack-of-open-elements id=parsing-main-inhead:stack-of-open-elements-2>stack of open elements</a>.</p> 4045 4046 <p><a href=#acknowledge-self-closing-flag id=parsing-main-inhead:acknowledge-self-closing-flag-2>Acknowledge the token's <i>self-closing 4047 flag</i></a>, if it is set.</p> 4048 4049 <p id=meta-charset-during-parse>If the element has a <code id=parsing-main-inhead:attr-meta-charset><a href=semantics.html#attr-meta-charset>charset</a></code> attribute, and <a id=parsing-main-inhead:getting-an-encoding href=https://encoding.spec.whatwg.org/#concept-encoding-get data-x-internal=getting-an-encoding>getting an encoding</a> from 4050 its value results in a supported <a id=parsing-main-inhead:ascii-compatible-character-encoding href=infrastructure.html#ascii-compatible-character-encoding>ASCII-compatible character encoding</a> or <a id=parsing-main-inhead:a-utf-16-encoding href=infrastructure.html#a-utf-16-encoding>a 4051 UTF-16 encoding</a>, and the <a href=#concept-encoding-confidence id=parsing-main-inhead:concept-encoding-confidence>confidence</a> is 4052 currently <i>tentative</i>, then <a href=#change-the-encoding id=parsing-main-inhead:change-the-encoding>change the encoding</a> to the resulting encoding.</p> 4053 4054 <p>Otherwise, if the element has an <code id=parsing-main-inhead:attr-meta-http-equiv><a href=semantics.html#attr-meta-http-equiv>http-equiv</a></code> 4055 attribute whose value is an <a id=parsing-main-inhead:ascii-case-insensitive href=infrastructure.html#ascii-case-insensitive>ASCII case-insensitive</a> match for the string "<code>Content-Type</code>", and the element has a <code id=parsing-main-inhead:attr-meta-content><a href=semantics.html#attr-meta-content>content</a></code> attribute, and applying the <a id=parsing-main-inhead:algorithm-for-extracting-a-character-encoding-from-a-meta-element href=infrastructure.html#algorithm-for-extracting-a-character-encoding-from-a-meta-element>algorithm for 4056 extracting a character encoding from a <code>meta</code> element</a> to that attribute's 4057 value returns a supported <a id=parsing-main-inhead:ascii-compatible-character-encoding-2 href=infrastructure.html#ascii-compatible-character-encoding>ASCII-compatible character encoding</a> or <a id=parsing-main-inhead:a-utf-16-encoding-2 href=infrastructure.html#a-utf-16-encoding>a UTF-16 4058 encoding</a>, and the <a href=#concept-encoding-confidence id=parsing-main-inhead:concept-encoding-confidence-2>confidence</a> is 4059 currently <i>tentative</i>, then <a href=#change-the-encoding id=parsing-main-inhead:change-the-encoding-2>change the encoding</a> to the extracted encoding.</p> 4060 4061 <dt>A start tag whose tag name is "title"<dd> 4062 <p>Follow the <a href=#generic-rcdata-element-parsing-algorithm id=parsing-main-inhead:generic-rcdata-element-parsing-algorithm>generic RCDATA element parsing algorithm</a>.</p> 4063 <dt>A start tag whose tag name is "noscript", if the <a href=#scripting-flag id=parsing-main-inhead:scripting-flag>scripting flag</a> is enabled<dt>A start tag whose tag name is one of: "noframes", "style"<dd> 4064 <p>Follow the <a href=#generic-raw-text-element-parsing-algorithm id=parsing-main-inhead:generic-raw-text-element-parsing-algorithm>generic raw text element parsing algorithm</a>.</p> 4065 <dt>A start tag whose tag name is "noscript", if the <a href=#scripting-flag id=parsing-main-inhead:scripting-flag-2>scripting flag</a> is disabled<dd> 4066 4067 <p><a href=#insert-an-html-element id=parsing-main-inhead:insert-an-html-element-3>Insert an HTML element</a> for the token.</p> 4068 4069 <p>Switch the <a href=#insertion-mode id=parsing-main-inhead:insertion-mode-3>insertion mode</a> to "<a href=#parsing-main-inheadnoscript id=parsing-main-inhead:parsing-main-inheadnoscript>in 4070 head noscript</a>".</p> 4071 4072 <dt id=scriptTag>A start tag whose tag name is "script"<dd> 4073 4074 <p>Run these steps:</p> 4075 4076 <ol><li><p>Let the <var>adjusted insertion location</var> be the <a href=#appropriate-place-for-inserting-a-node id=parsing-main-inhead:appropriate-place-for-inserting-a-node>appropriate place 4077 for inserting a node</a>.<li><p><a href=#create-an-element-for-the-token id=parsing-main-inhead:create-an-element-for-the-token>Create an element for the token</a> in the <a id=parsing-main-inhead:html-namespace-2 href=infrastructure.html#html-namespace-2>HTML namespace</a>, with 4078 the intended parent being the element in which the <var>adjusted insertion 4079 location</var> finds itself.<li> 4080 4081 <p>Mark the element as being <a id=parsing-main-inhead:parser-inserted href=scripting.html#parser-inserted>"parser-inserted"</a> and unset the element's 4082 <a id=parsing-main-inhead:non-blocking href=scripting.html#non-blocking>"non-blocking"</a> flag.</p> 4083 4084 <p class=note>This ensures that, if the script is external, any <code id=parsing-main-inhead:dom-document-write><a href=webappapis.html#dom-document-write>document.write()</a></code> calls in the script will execute in-line, 4085 instead of blowing the document away, as would happen in most other cases. It also prevents 4086 the script from executing until the end tag is seen.</p> 4087 4088 <li><p>If the parser was originally created for the <a href=#html-fragment-parsing-algorithm id=parsing-main-inhead:html-fragment-parsing-algorithm>HTML fragment parsing 4089 algorithm</a>, then mark the <code id=parsing-main-inhead:the-script-element><a href=scripting.html#the-script-element>script</a></code> element as <a id=parsing-main-inhead:already-started href=scripting.html#already-started>"already started"</a>. 4090 (<a href=#fragment-case id=parsing-main-inhead:fragment-case>fragment case</a>)<li><p>Insert the newly created element at the <var>adjusted insertion 4091 location</var>.<li><p>Push the element onto the <a href=#stack-of-open-elements id=parsing-main-inhead:stack-of-open-elements-3>stack of open elements</a> so that it is the new 4092 <a href=#current-node id=parsing-main-inhead:current-node-3>current node</a>.<li><p>Switch the tokenizer to the <a href=#script-data-state id=parsing-main-inhead:script-data-state>script data state</a>.<li><p>Let the <a href=#original-insertion-mode id=parsing-main-inhead:original-insertion-mode>original insertion mode</a> be the current <a href=#insertion-mode id=parsing-main-inhead:insertion-mode-4>insertion 4093 mode</a>.</p> 4094 4095 <li><p>Switch the <a href=#insertion-mode id=parsing-main-inhead:insertion-mode-5>insertion mode</a> to "<a href=#parsing-main-incdata id=parsing-main-inhead:parsing-main-incdata>text</a>".</ol> 4096 4097 <dt>An end tag whose tag name is "head"<dd> 4098 4099 <p>Pop the <a href=#current-node id=parsing-main-inhead:current-node-4>current node</a> (which will be the <code id=parsing-main-inhead:the-head-element><a href=semantics.html#the-head-element>head</a></code> element) off the 4100 <a href=#stack-of-open-elements id=parsing-main-inhead:stack-of-open-elements-4>stack of open elements</a>.</p> 4101 4102 <p>Switch the <a href=#insertion-mode id=parsing-main-inhead:insertion-mode-6>insertion mode</a> to "<a href=#the-after-head-insertion-mode id=parsing-main-inhead:the-after-head-insertion-mode>after 4103 head</a>".</p> 4104 4105 <dt>An end tag whose tag name is one of: "body", "html", "br"<dd> 4106 <p>Act as described in the "anything else" entry below.</p> 4107 <dt>A start tag whose tag name is "template"<dd> 4108 4109 <p><a href=#insert-an-html-element id=parsing-main-inhead:insert-an-html-element-4>Insert an HTML element</a> for the token.</p> 4110 4111 <p>Insert a <a href=#concept-parser-marker id=parsing-main-inhead:concept-parser-marker>marker</a> at the end of the <a href=#list-of-active-formatting-elements id=parsing-main-inhead:list-of-active-formatting-elements>list of 4112 active formatting elements</a>.</p> 4113 4114 <p>Set the <a href=#frameset-ok-flag id=parsing-main-inhead:frameset-ok-flag>frameset-ok flag</a> to "not ok".</p> 4115 4116 <p>Switch the <a href=#insertion-mode id=parsing-main-inhead:insertion-mode-7>insertion mode</a> to "<a href=#parsing-main-intemplate id=parsing-main-inhead:parsing-main-intemplate>in 4117 template</a>".</p> 4118 4119 <p>Push "<a href=#parsing-main-intemplate id=parsing-main-inhead:parsing-main-intemplate-2>in template</a>" onto the <a href=#stack-of-template-insertion-modes id=parsing-main-inhead:stack-of-template-insertion-modes>stack of 4120 template insertion modes</a> so that it is the new <a href=#current-template-insertion-mode id=parsing-main-inhead:current-template-insertion-mode>current template insertion 4121 mode</a>.</p> 4122 4123 <dt>An end tag whose tag name is "template"<dd> 4124 4125 <p>If there is no <code id=parsing-main-inhead:the-template-element><a href=scripting.html#the-template-element>template</a></code> element on the <a href=#stack-of-open-elements id=parsing-main-inhead:stack-of-open-elements-5>stack of open elements</a>, then 4126 this is a <a href=#parse-error id=parsing-main-inhead:parse-error-2>parse error</a>; ignore the token.</p> 4127 4128 <p>Otherwise, run these steps:</p> 4129 4130 <ol><li><p><a href=#generate-all-implied-end-tags-thoroughly id=parsing-main-inhead:generate-all-implied-end-tags-thoroughly>Generate all implied end tags thoroughly</a>.<li><p>If the <a href=#current-node id=parsing-main-inhead:current-node-5>current node</a> is not a <code id=parsing-main-inhead:the-template-element-2><a href=scripting.html#the-template-element>template</a></code> element, then this is a 4131 <a href=#parse-error id=parsing-main-inhead:parse-error-3>parse error</a>.<li><p>Pop elements from the <a href=#stack-of-open-elements id=parsing-main-inhead:stack-of-open-elements-6>stack of open elements</a> until a <code id=parsing-main-inhead:the-template-element-3><a href=scripting.html#the-template-element>template</a></code> 4132 element has been popped from the stack.<li><a href=#clear-the-list-of-active-formatting-elements-up-to-the-last-marker id=parsing-main-inhead:clear-the-list-of-active-formatting-elements-up-to-the-last-marker>Clear the list of active formatting elements up to the last marker</a>.<li><p>Pop the <a href=#current-template-insertion-mode id=parsing-main-inhead:current-template-insertion-mode-2>current template insertion mode</a> off the <a href=#stack-of-template-insertion-modes id=parsing-main-inhead:stack-of-template-insertion-modes-2>stack of template 4133 insertion modes</a>.</p> 4134 4135 <li><p><a href=#reset-the-insertion-mode-appropriately id=parsing-main-inhead:reset-the-insertion-mode-appropriately>Reset the insertion mode appropriately</a>.</ol> 4136 4137 <dt>A start tag whose tag name is "head"<dt>Any other end tag<dd> 4138 <p><a href=#parse-error id=parsing-main-inhead:parse-error-4>Parse error</a>. Ignore the token.</p> 4139 <dt>Anything else<dd> 4140 4141 4142 4143 4144 <p>Pop the <a href=#current-node id=parsing-main-inhead:current-node-6>current node</a> (which will be the <code id=parsing-main-inhead:the-head-element-2><a href=semantics.html#the-head-element>head</a></code> element) off the 4145 <a href=#stack-of-open-elements id=parsing-main-inhead:stack-of-open-elements-7>stack of open elements</a>.</p> 4146 4147 <p>Switch the <a href=#insertion-mode id=parsing-main-inhead:insertion-mode-8>insertion mode</a> to "<a href=#the-after-head-insertion-mode id=parsing-main-inhead:the-after-head-insertion-mode-2>after 4148 head</a>".</p> 4149 4150 4151 <p>Reprocess the token.</p> 4152 4153 </dl> 4154 4155 4156 <h6 id=parsing-main-inheadnoscript>12.2.5.4.5 The "<dfn>in head noscript</dfn>" insertion mode</h6> 4157 4158 <p>When the user agent is to apply the rules for the "<a href=#parsing-main-inheadnoscript id=parsing-main-inheadnoscript:parsing-main-inheadnoscript>in head noscript</a>" <a href=#insertion-mode id=parsing-main-inheadnoscript:insertion-mode>insertion mode</a>, the user agent must handle the 4159 token as follows:</p> 4160 4161 <dl class=switch><dt>A DOCTYPE token<dd> 4162 <p><a href=#parse-error id=parsing-main-inheadnoscript:parse-error>Parse error</a>. Ignore the token.</p> 4163 <dt>A start tag whose tag name is "html"<dd> 4164 4165 <p>Process the token <a href=#using-the-rules-for id=parsing-main-inheadnoscript:using-the-rules-for>using the rules for</a> the "<a href=#parsing-main-inbody id=parsing-main-inheadnoscript:parsing-main-inbody>in body</a>" <a href=#insertion-mode id=parsing-main-inheadnoscript:insertion-mode-2>insertion mode</a>.</p> 4166 4167 <dt>An end tag whose tag name is "noscript"<dd> 4168 4169 <p>Pop the <a href=#current-node id=parsing-main-inheadnoscript:current-node>current node</a> (which will be a <code id=parsing-main-inheadnoscript:the-noscript-element><a href=scripting.html#the-noscript-element>noscript</a></code> element) from the 4170 <a href=#stack-of-open-elements id=parsing-main-inheadnoscript:stack-of-open-elements>stack of open elements</a>; the new <a href=#current-node id=parsing-main-inheadnoscript:current-node-2>current node</a> will be a 4171 <code id=parsing-main-inheadnoscript:the-head-element><a href=semantics.html#the-head-element>head</a></code> element.</p> 4172 4173 <p>Switch the <a href=#insertion-mode id=parsing-main-inheadnoscript:insertion-mode-3>insertion mode</a> to "<a href=#parsing-main-inhead id=parsing-main-inheadnoscript:parsing-main-inhead>in 4174 head</a>".</p> 4175 4176 <dt>A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C 4177 FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dt>A comment token<dt>A start tag whose tag name is one of: "basefont", "bgsound", "link", "meta", "noframes", 4178 "style"<dd> 4179 4180 <p>Process the token <a href=#using-the-rules-for id=parsing-main-inheadnoscript:using-the-rules-for-2>using the rules for</a> the "<a href=#parsing-main-inhead id=parsing-main-inheadnoscript:parsing-main-inhead-2>in head</a>" <a href=#insertion-mode id=parsing-main-inheadnoscript:insertion-mode-4>insertion mode</a>.</p> 4181 4182 <dt>An end tag whose tag name is "br"<dd> 4183 <p>Act as described in the "anything else" entry below.</p> 4184 <dt>A start tag whose tag name is one of: "head", "noscript"<dt>Any other end tag<dd> 4185 <p><a href=#parse-error id=parsing-main-inheadnoscript:parse-error-2>Parse error</a>. Ignore the token.</p> 4186 <dt>Anything else<dd> 4187 4188 4189 4190 <p><a href=#parse-error id=parsing-main-inheadnoscript:parse-error-3>Parse error</a>.</p> 4191 4192 4193 <p>Pop the <a href=#current-node id=parsing-main-inheadnoscript:current-node-3>current node</a> (which will be a <code id=parsing-main-inheadnoscript:the-noscript-element-2><a href=scripting.html#the-noscript-element>noscript</a></code> element) from the 4194 <a href=#stack-of-open-elements id=parsing-main-inheadnoscript:stack-of-open-elements-2>stack of open elements</a>; the new <a href=#current-node id=parsing-main-inheadnoscript:current-node-4>current node</a> will be a 4195 <code id=parsing-main-inheadnoscript:the-head-element-2><a href=semantics.html#the-head-element>head</a></code> element.</p> 4196 4197 <p>Switch the <a href=#insertion-mode id=parsing-main-inheadnoscript:insertion-mode-5>insertion mode</a> to "<a href=#parsing-main-inhead id=parsing-main-inheadnoscript:parsing-main-inhead-3>in 4198 head</a>".</p> 4199 4200 4201 <p>Reprocess the token.</p> 4202 4203 </dl> 4204 4205 4206 <h6 id=the-after-head-insertion-mode>12.2.5.4.6 The "<dfn>after head</dfn>" insertion mode</h6> 4207 4208 <p>When the user agent is to apply the rules for the "<a href=#the-after-head-insertion-mode id=the-after-head-insertion-mode:the-after-head-insertion-mode>after head</a>" <a href=#insertion-mode id=the-after-head-insertion-mode:insertion-mode>insertion mode</a>, the user agent must handle the token as 4209 follows:</p> 4210 4211 <dl class=switch><dt>A character token that is one of U+0009 CHARACTER 4212 TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF), 4213 U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dd> 4214 <p><a href=#insert-a-character id=the-after-head-insertion-mode:insert-a-character>Insert the character</a>.</p> 4215 <dt>A comment token<dd> 4216 <p><a href=#insert-a-comment id=the-after-head-insertion-mode:insert-a-comment>Insert a comment</a>.</p> 4217 <dt>A DOCTYPE token<dd> 4218 <p><a href=#parse-error id=the-after-head-insertion-mode:parse-error>Parse error</a>. Ignore the token.</p> 4219 <dt>A start tag whose tag name is "html"<dd> 4220 4221 <p>Process the token <a href=#using-the-rules-for id=the-after-head-insertion-mode:using-the-rules-for>using the rules for</a> the "<a href=#parsing-main-inbody id=the-after-head-insertion-mode:parsing-main-inbody>in body</a>" <a href=#insertion-mode id=the-after-head-insertion-mode:insertion-mode-2>insertion mode</a>.</p> 4222 4223 <dt>A start tag whose tag name is "body"<dd> 4224 4225 <p><a href=#insert-an-html-element id=the-after-head-insertion-mode:insert-an-html-element>Insert an HTML element</a> for the token.</p> 4226 4227 <p>Set the <a href=#frameset-ok-flag id=the-after-head-insertion-mode:frameset-ok-flag>frameset-ok flag</a> to "not ok".</p> 4228 4229 <p>Switch the <a href=#insertion-mode id=the-after-head-insertion-mode:insertion-mode-3>insertion mode</a> to "<a href=#parsing-main-inbody id=the-after-head-insertion-mode:parsing-main-inbody-2>in 4230 body</a>".</p> 4231 4232 <dt>A start tag whose tag name is "frameset"<dd> 4233 4234 <p><a href=#insert-an-html-element id=the-after-head-insertion-mode:insert-an-html-element-2>Insert an HTML element</a> for the token.</p> 4235 4236 <p>Switch the <a href=#insertion-mode id=the-after-head-insertion-mode:insertion-mode-4>insertion mode</a> to "<a href=#parsing-main-inframeset id=the-after-head-insertion-mode:parsing-main-inframeset>in 4237 frameset</a>".</p> 4238 4239 <dt>A start tag whose tag name is one of: "base", "basefont", "bgsound", "link", "meta", 4240 "noframes", "script", "style", "template", "title"<dd> 4241 4242 <p><a href=#parse-error id=the-after-head-insertion-mode:parse-error-2>Parse error</a>.</p> 4243 4244 <p>Push the node pointed to by the <a href=#head-element-pointer id=the-after-head-insertion-mode:head-element-pointer><code>head</code> element pointer</a> onto 4245 the <a href=#stack-of-open-elements id=the-after-head-insertion-mode:stack-of-open-elements>stack of open elements</a>.</p> 4246 4247 <p>Process the token <a href=#using-the-rules-for id=the-after-head-insertion-mode:using-the-rules-for-2>using the rules for</a> the "<a href=#parsing-main-inhead id=the-after-head-insertion-mode:parsing-main-inhead>in head</a>" <a href=#insertion-mode id=the-after-head-insertion-mode:insertion-mode-5>insertion mode</a>.</p> 4248 4249 <p>Remove the node pointed to by the <a href=#head-element-pointer id=the-after-head-insertion-mode:head-element-pointer-2><code>head</code> element pointer</a> 4250 from the <a href=#stack-of-open-elements id=the-after-head-insertion-mode:stack-of-open-elements-2>stack of open elements</a>. (It might not be the <a href=#current-node id=the-after-head-insertion-mode:current-node>current node</a> at 4251 this point.)</p> 4252 4253 <p class=note>The <a href=#head-element-pointer id=the-after-head-insertion-mode:head-element-pointer-3><code>head</code> element pointer</a> cannot be null at 4254 this point.</p> 4255 4256 <dt>An end tag whose tag name is "template"<dd> 4257 <p>Process the token <a href=#using-the-rules-for id=the-after-head-insertion-mode:using-the-rules-for-3>using the rules for</a> the "<a href=#parsing-main-inhead id=the-after-head-insertion-mode:parsing-main-inhead-2>in head</a>" <a href=#insertion-mode id=the-after-head-insertion-mode:insertion-mode-6>insertion mode</a>.</p> 4258 <dt>An end tag whose tag name is one of: "body", "html", "br"<dd> 4259 <p>Act as described in the "anything else" entry below.</p> 4260 <dt>A start tag whose tag name is "head"<dt>Any other end tag<dd> 4261 <p><a href=#parse-error id=the-after-head-insertion-mode:parse-error-3>Parse error</a>. Ignore the token.</p> 4262 <dt>Anything else<dd> 4263 4264 4265 <p><a href=#insert-an-html-element id=the-after-head-insertion-mode:insert-an-html-element-3>Insert an HTML element</a> for a "body" start tag token with no attributes.</p> 4266 4267 <p>Switch the <a href=#insertion-mode id=the-after-head-insertion-mode:insertion-mode-7>insertion mode</a> to "<a href=#parsing-main-inbody id=the-after-head-insertion-mode:parsing-main-inbody-3>in 4268 body</a>".</p> 4269 4270 4271 <p>Reprocess the current token.</p> 4272 4273 </dl> 4274 4275 4276 <h6 id=parsing-main-inbody>12.2.5.4.7 The "<dfn>in body</dfn>" insertion mode</h6> 4277 4278 <p>When the user agent is to apply the rules for the "<a href=#parsing-main-inbody id=parsing-main-inbody:parsing-main-inbody>in 4279 body</a>" <a href=#insertion-mode id=parsing-main-inbody:insertion-mode>insertion mode</a>, the user agent must handle the token as follows:</p> 4280 4281 <dl class=switch><dt>A character token that is U+0000 NULL<dd> 4282 4283 <p><a href=#parse-error id=parsing-main-inbody:parse-error>Parse error</a>. Ignore the token.</p> 4284 4285 4286 4287 <dt>A character token that is one of U+0009 CHARACTER TABULATION, 4288 U+000A LINE FEED (LF), U+000C FORM FEED (FF), U+000D CARRIAGE 4289 RETURN (CR), or U+0020 SPACE<dd> 4290 4291 <p><a href=#reconstruct-the-active-formatting-elements id=parsing-main-inbody:reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if any.</p> 4292 4293 <p><a href=#insert-a-character id=parsing-main-inbody:insert-a-character>Insert the token's character</a>.</p> 4294 4295 <dt>Any other character token<dd> 4296 4297 <p><a href=#reconstruct-the-active-formatting-elements id=parsing-main-inbody:reconstruct-the-active-formatting-elements-2>Reconstruct the active formatting elements</a>, if any.</p> 4298 4299 <p><a href=#insert-a-character id=parsing-main-inbody:insert-a-character-2>Insert the token's character</a>.</p> 4300 4301 <p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag>frameset-ok flag</a> to "not ok".</p> 4302 4303 <dt>A comment token<dd> 4304 <p><a href=#insert-a-comment id=parsing-main-inbody:insert-a-comment>Insert a comment</a>.</p> 4305 <dt>A DOCTYPE token<dd> 4306 <p><a href=#parse-error id=parsing-main-inbody:parse-error-2>Parse error</a>. Ignore the token.</p> 4307 <dt>A start tag whose tag name is "html"<dd> 4308 4309 <p><a href=#parse-error id=parsing-main-inbody:parse-error-3>Parse error</a>.</p> 4310 4311 <p>If there is a <code id=parsing-main-inbody:the-template-element><a href=scripting.html#the-template-element>template</a></code> element on the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements>stack of open elements</a>, then 4312 ignore the token.</p> 4313 4314 <p>Otherwise, for each attribute on the token, check to see if the attribute is already present 4315 on the top element of the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-2>stack of open elements</a>. If it is not, add the attribute 4316 and its corresponding value to that element.</p> 4317 4318 <dt>A start tag whose tag name is one of: "base", "basefont", "bgsound", "link", "meta", 4319 "noframes", "script", "style", "template", "title"<dt>An end tag whose tag name is "template"<dd> 4320 <p>Process the token <a href=#using-the-rules-for id=parsing-main-inbody:using-the-rules-for>using the rules for</a> the "<a href=#parsing-main-inhead id=parsing-main-inbody:parsing-main-inhead>in head</a>" <a href=#insertion-mode id=parsing-main-inbody:insertion-mode-2>insertion mode</a>.</p> 4321 <dt>A start tag whose tag name is "body"<dd> 4322 4323 <p><a href=#parse-error id=parsing-main-inbody:parse-error-4>Parse error</a>.</p> 4324 4325 <p>If the second element on the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-3>stack of open elements</a> is not a <code id=parsing-main-inbody:the-body-element><a href=semantics.html#the-body-element>body</a></code> 4326 element, if the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-4>stack of open elements</a> has only one node on it, or if there is a 4327 <code id=parsing-main-inbody:the-template-element-2><a href=scripting.html#the-template-element>template</a></code> element on the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-5>stack of open elements</a>, then ignore the token. 4328 (<a href=#fragment-case id=parsing-main-inbody:fragment-case>fragment case</a>)</p> 4329 4330 <p>Otherwise, set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-2>frameset-ok flag</a> to "not ok"; then, for each attribute on the 4331 token, check to see if the attribute is already present on the <code id=parsing-main-inbody:the-body-element-2><a href=semantics.html#the-body-element>body</a></code> element (the 4332 second element) on the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-6>stack of open elements</a>, and if it is not, add the attribute 4333 and its corresponding value to that element.</p> 4334 4335 <dt>A start tag whose tag name is "frameset"<dd> 4336 4337 <p><a href=#parse-error id=parsing-main-inbody:parse-error-5>Parse error</a>.</p> 4338 4339 <p>If the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-7>stack of open elements</a> has only one node on it, or if the second element 4340 on the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-8>stack of open elements</a> is not a <code id=parsing-main-inbody:the-body-element-3><a href=semantics.html#the-body-element>body</a></code> element, then ignore the 4341 token. (<a href=#fragment-case id=parsing-main-inbody:fragment-case-2>fragment case</a>)</p> 4342 4343 <p>If the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-3>frameset-ok flag</a> is set to "not ok", ignore the token.</p> 4344 4345 <p>Otherwise, run the following steps:</p> 4346 4347 <ol><li><p>Remove the second element on the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-9>stack of open elements</a> from its parent 4348 node, if it has one.<li><p>Pop all the nodes from the bottom of the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-10>stack of open elements</a>, from the 4349 <a href=#current-node id=parsing-main-inbody:current-node>current node</a> up to, but not including, the root <code id=parsing-main-inbody:the-html-element><a href=semantics.html#the-html-element>html</a></code> element.</p> 4350 4351 <li><p><a href=#insert-an-html-element id=parsing-main-inbody:insert-an-html-element>Insert an HTML element</a> for the token.<li><p>Switch the <a href=#insertion-mode id=parsing-main-inbody:insertion-mode-3>insertion mode</a> to "<a href=#parsing-main-inframeset id=parsing-main-inbody:parsing-main-inframeset>in 4352 frameset</a>".</p> 4353 4354 </ol> 4355 4356 <dt>An end-of-file token<dd> 4357 4358 <p>If the <a href=#stack-of-template-insertion-modes id=parsing-main-inbody:stack-of-template-insertion-modes>stack of template insertion modes</a> is not empty, then process the token 4359 <a href=#using-the-rules-for id=parsing-main-inbody:using-the-rules-for-2>using the rules for</a> the "<a href=#parsing-main-intemplate id=parsing-main-inbody:parsing-main-intemplate>in 4360 template</a>" <a href=#insertion-mode id=parsing-main-inbody:insertion-mode-4>insertion mode</a>.</p> 4361 4362 4363 <p>Otherwise, follow these steps:</p> 4364 4365 <ol><li><p>If there is a node in the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-11>stack of open elements</a> that is not either a 4366 <code id=parsing-main-inbody:the-dd-element><a href=semantics.html#the-dd-element>dd</a></code> element, a <code id=parsing-main-inbody:the-dt-element><a href=semantics.html#the-dt-element>dt</a></code> element, an <code id=parsing-main-inbody:the-li-element><a href=semantics.html#the-li-element>li</a></code> element, an 4367 <code id=parsing-main-inbody:the-optgroup-element><a href=forms.html#the-optgroup-element>optgroup</a></code> element, an <code id=parsing-main-inbody:the-option-element><a href=forms.html#the-option-element>option</a></code> element, a <code id=parsing-main-inbody:the-p-element><a href=semantics.html#the-p-element>p</a></code> element, an 4368 <code id=parsing-main-inbody:the-rp-element><a href=semantics.html#the-rp-element>rp</a></code> element, an <code id=parsing-main-inbody:the-rt-element><a href=semantics.html#the-rt-element>rt</a></code> element, a <code id=parsing-main-inbody:the-tbody-element><a href=tables.html#the-tbody-element>tbody</a></code> element, a 4369 <code id=parsing-main-inbody:the-td-element><a href=tables.html#the-td-element>td</a></code> element, a <code id=parsing-main-inbody:the-tfoot-element><a href=tables.html#the-tfoot-element>tfoot</a></code> element, a <code id=parsing-main-inbody:the-th-element><a href=tables.html#the-th-element>th</a></code> element, a 4370 <code id=parsing-main-inbody:the-thead-element><a href=tables.html#the-thead-element>thead</a></code> element, a <code id=parsing-main-inbody:the-tr-element><a href=tables.html#the-tr-element>tr</a></code> element, the <code id=parsing-main-inbody:the-body-element-4><a href=semantics.html#the-body-element>body</a></code> element, or the 4371 <code id=parsing-main-inbody:the-html-element-2><a href=semantics.html#the-html-element>html</a></code> element, then this is a <a href=#parse-error id=parsing-main-inbody:parse-error-6>parse error</a>.<li><p><a href=#stop-parsing id=parsing-main-inbody:stop-parsing>Stop parsing</a>.</ol> 4372 4373 <dt>An end tag whose tag name is "body"<dd> 4374 4375 <p>If the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-12>stack of open elements</a> does not <a href=#has-an-element-in-scope id=parsing-main-inbody:has-an-element-in-scope>have a <code>body</code> element in scope</a>, this is a <a href=#parse-error id=parsing-main-inbody:parse-error-7>parse error</a>; 4376 ignore the token.</p> 4377 4378 4379 4380 <p>Otherwise, if there is a node in the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-13>stack of open elements</a> that is not either a 4381 <code id=parsing-main-inbody:the-dd-element-2><a href=semantics.html#the-dd-element>dd</a></code> element, a <code id=parsing-main-inbody:the-dt-element-2><a href=semantics.html#the-dt-element>dt</a></code> element, an <code id=parsing-main-inbody:the-li-element-2><a href=semantics.html#the-li-element>li</a></code> element, an 4382 <code id=parsing-main-inbody:the-optgroup-element-2><a href=forms.html#the-optgroup-element>optgroup</a></code> element, an <code id=parsing-main-inbody:the-option-element-2><a href=forms.html#the-option-element>option</a></code> element, a <code id=parsing-main-inbody:the-p-element-2><a href=semantics.html#the-p-element>p</a></code> element, an 4383 <code id=parsing-main-inbody:the-rp-element-2><a href=semantics.html#the-rp-element>rp</a></code> element, an <code id=parsing-main-inbody:the-rt-element-2><a href=semantics.html#the-rt-element>rt</a></code> element, a <code id=parsing-main-inbody:the-tbody-element-2><a href=tables.html#the-tbody-element>tbody</a></code> element, a 4384 <code id=parsing-main-inbody:the-td-element-2><a href=tables.html#the-td-element>td</a></code> element, a <code id=parsing-main-inbody:the-tfoot-element-2><a href=tables.html#the-tfoot-element>tfoot</a></code> element, a <code id=parsing-main-inbody:the-th-element-2><a href=tables.html#the-th-element>th</a></code> element, a 4385 <code id=parsing-main-inbody:the-thead-element-2><a href=tables.html#the-thead-element>thead</a></code> element, a <code id=parsing-main-inbody:the-tr-element-2><a href=tables.html#the-tr-element>tr</a></code> element, the <code id=parsing-main-inbody:the-body-element-5><a href=semantics.html#the-body-element>body</a></code> element, or the 4386 <code id=parsing-main-inbody:the-html-element-3><a href=semantics.html#the-html-element>html</a></code> element, then this is a <a href=#parse-error id=parsing-main-inbody:parse-error-8>parse error</a>.</p> 4387 4388 4389 4390 <p>Switch the <a href=#insertion-mode id=parsing-main-inbody:insertion-mode-5>insertion mode</a> to "<a href=#parsing-main-afterbody id=parsing-main-inbody:parsing-main-afterbody>after 4391 body</a>".</p> 4392 4393 <dt>An end tag whose tag name is "html"<dd> 4394 4395 4396 <p>If the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-14>stack of open elements</a> does not <a href=#has-an-element-in-scope id=parsing-main-inbody:has-an-element-in-scope-2>have a <code>body</code> element in scope</a>, this is a <a href=#parse-error id=parsing-main-inbody:parse-error-9>parse error</a>; 4397 ignore the token.</p> 4398 4399 4400 4401 <p>Otherwise, if there is a node in the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-15>stack of open elements</a> that is not either a 4402 <code id=parsing-main-inbody:the-dd-element-3><a href=semantics.html#the-dd-element>dd</a></code> element, a <code id=parsing-main-inbody:the-dt-element-3><a href=semantics.html#the-dt-element>dt</a></code> element, an <code id=parsing-main-inbody:the-li-element-3><a href=semantics.html#the-li-element>li</a></code> element, an 4403 <code id=parsing-main-inbody:the-optgroup-element-3><a href=forms.html#the-optgroup-element>optgroup</a></code> element, an <code id=parsing-main-inbody:the-option-element-3><a href=forms.html#the-option-element>option</a></code> element, a <code id=parsing-main-inbody:the-p-element-3><a href=semantics.html#the-p-element>p</a></code> element, an 4404 <code id=parsing-main-inbody:the-rp-element-3><a href=semantics.html#the-rp-element>rp</a></code> element, an <code id=parsing-main-inbody:the-rt-element-3><a href=semantics.html#the-rt-element>rt</a></code> element, a <code id=parsing-main-inbody:the-tbody-element-3><a href=tables.html#the-tbody-element>tbody</a></code> element, a 4405 <code id=parsing-main-inbody:the-td-element-3><a href=tables.html#the-td-element>td</a></code> element, a <code id=parsing-main-inbody:the-tfoot-element-3><a href=tables.html#the-tfoot-element>tfoot</a></code> element, a <code id=parsing-main-inbody:the-th-element-3><a href=tables.html#the-th-element>th</a></code> element, a 4406 <code id=parsing-main-inbody:the-thead-element-3><a href=tables.html#the-thead-element>thead</a></code> element, a <code id=parsing-main-inbody:the-tr-element-3><a href=tables.html#the-tr-element>tr</a></code> element, the <code id=parsing-main-inbody:the-body-element-6><a href=semantics.html#the-body-element>body</a></code> element, or the 4407 <code id=parsing-main-inbody:the-html-element-4><a href=semantics.html#the-html-element>html</a></code> element, then this is a <a href=#parse-error id=parsing-main-inbody:parse-error-10>parse error</a>.</p> 4408 4409 4410 4411 <p>Switch the <a href=#insertion-mode id=parsing-main-inbody:insertion-mode-6>insertion mode</a> to "<a href=#parsing-main-afterbody id=parsing-main-inbody:parsing-main-afterbody-2>after 4412 body</a>".</p> 4413 4414 4415 <p>Reprocess the token.</p> 4416 4417 <dt>A start tag whose tag name is one of: "address", "article", "aside", "blockquote", "center", 4418 "details", "dialog", "dir", "div", "dl", "fieldset", "figcaption", "figure", "footer", "header", 4419 "hgroup", "main", "menu", "nav", "ol", "p", "section", "summary", "ul"<dd> 4420 4421 4422 4423 <p>If the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-16>stack of open elements</a> <a href=#has-an-element-in-button-scope id=parsing-main-inbody:has-an-element-in-button-scope>has a 4424 <code>p</code> element in button scope</a>, then <a href=#close-a-p-element id=parsing-main-inbody:close-a-p-element>close a <code>p</code> 4425 element</a>.</p> 4426 4427 <p><a href=#insert-an-html-element id=parsing-main-inbody:insert-an-html-element-2>Insert an HTML element</a> for the token.</p> 4428 4429 <dt>A start tag whose tag name is one of: "h1", "h2", "h3", "h4", 4430 "h5", "h6"<dd> 4431 4432 <p>If the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-17>stack of open elements</a> <a href=#has-an-element-in-button-scope id=parsing-main-inbody:has-an-element-in-button-scope-2>has a 4433 <code>p</code> element in button scope</a>, then <a href=#close-a-p-element id=parsing-main-inbody:close-a-p-element-2>close a <code>p</code> 4434 element</a>.</p> 4435 4436 <p>If the <a href=#current-node id=parsing-main-inbody:current-node-2>current node</a> is an <a href=infrastructure.html#html-elements id=parsing-main-inbody:html-elements>HTML element</a> whose 4437 tag name is one of "h1", "h2", "h3", "h4", "h5", or "h6", then this is a <a href=#parse-error id=parsing-main-inbody:parse-error-11>parse 4438 error</a>; pop the <a href=#current-node id=parsing-main-inbody:current-node-3>current node</a> off the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-18>stack of open elements</a>.</p> 4439 4440 4441 <p><a href=#insert-an-html-element id=parsing-main-inbody:insert-an-html-element-3>Insert an HTML element</a> for the token.</p> 4442 4443 <dt>A start tag whose tag name is one of: "pre", "listing"<dd> 4444 4445 <p>If the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-19>stack of open elements</a> <a href=#has-an-element-in-button-scope id=parsing-main-inbody:has-an-element-in-button-scope-3>has 4446 a <code>p</code> element in button scope</a>, then <a href=#close-a-p-element id=parsing-main-inbody:close-a-p-element-3>close a <code>p</code> 4447 element</a>.</p> 4448 4449 <p><a href=#insert-an-html-element id=parsing-main-inbody:insert-an-html-element-4>Insert an HTML element</a> for the token.</p> 4450 4451 <p>If the <a href=#next-token id=parsing-main-inbody:next-token>next token</a> is a U+000A LINE FEED (LF) character token, then ignore that 4452 token and move on to the next one. (Newlines at the start of <code id=parsing-main-inbody:the-pre-element><a href=semantics.html#the-pre-element>pre</a></code> blocks are ignored 4453 as an authoring convenience.)</p> 4454 4455 4456 4457 <p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-4>frameset-ok flag</a> to "not ok".</p> 4458 4459 <dt>A start tag whose tag name is "form"<dd> 4460 4461 <p>If the <a href=#form-element-pointer id=parsing-main-inbody:form-element-pointer><code>form</code> element pointer</a> is not null, and there is 4462 no <code id=parsing-main-inbody:the-template-element-3><a href=scripting.html#the-template-element>template</a></code> element on the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-20>stack of open elements</a>, then this is a 4463 <a href=#parse-error id=parsing-main-inbody:parse-error-12>parse error</a>; ignore the token.</p> 4464 4465 <p>Otherwise:</p> 4466 4467 <p>If the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-21>stack of open elements</a> <a href=#has-an-element-in-button-scope id=parsing-main-inbody:has-an-element-in-button-scope-4>has 4468 a <code>p</code> element in button scope</a>, then <a href=#close-a-p-element id=parsing-main-inbody:close-a-p-element-4>close a <code>p</code> 4469 element</a>.</p> 4470 4471 <p><a href=#insert-an-html-element id=parsing-main-inbody:insert-an-html-element-5>Insert an HTML element</a> for the token, and, if there is no <code id=parsing-main-inbody:the-template-element-4><a href=scripting.html#the-template-element>template</a></code> 4472 element on the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-22>stack of open elements</a>, set the <a href=#form-element-pointer id=parsing-main-inbody:form-element-pointer-2><code>form</code> element pointer</a> to point to the element created.</p> 4473 4474 <dt>A start tag whose tag name is "li"<dd> 4475 4476 <p>Run these steps:</p> 4477 4478 <ol><li><p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-5>frameset-ok flag</a> to "not ok".<li><p>Initialise <var>node</var> to be the <a href=#current-node id=parsing-main-inbody:current-node-4>current 4479 node</a> (the bottommost node of the stack).<li> 4480 4481 <p><i>Loop</i>: If <var>node</var> is an <code id=parsing-main-inbody:the-li-element-4><a href=semantics.html#the-li-element>li</a></code> element, then run these 4482 substeps:</p> 4483 4484 <ol><li><p><a href=#generate-implied-end-tags id=parsing-main-inbody:generate-implied-end-tags>Generate implied end tags</a>, except for <code id=parsing-main-inbody:the-li-element-5><a href=semantics.html#the-li-element>li</a></code> elements.<li><p>If the <a href=#current-node id=parsing-main-inbody:current-node-5>current node</a> is not an <code id=parsing-main-inbody:the-li-element-6><a href=semantics.html#the-li-element>li</a></code> element, then this is a 4485 <a href=#parse-error id=parsing-main-inbody:parse-error-13>parse error</a>.<li><p>Pop elements from the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-23>stack of open elements</a> until an <code id=parsing-main-inbody:the-li-element-7><a href=semantics.html#the-li-element>li</a></code> 4486 element has been popped from the stack.<li><p>Jump to the step labeled <i>done</i> below.</ol> 4487 4488 <li><p>If <var>node</var> is in the <a href=#special id=parsing-main-inbody:special>special</a> category, but is not an 4489 <code id=parsing-main-inbody:the-address-element><a href=semantics.html#the-address-element>address</a></code>, <code id=parsing-main-inbody:the-div-element><a href=semantics.html#the-div-element>div</a></code>, or <code id=parsing-main-inbody:the-p-element-4><a href=semantics.html#the-p-element>p</a></code> element, then jump to the step 4490 labeled <i>done</i> below.<li><p>Otherwise, set <var>node</var> to the previous entry in the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-24>stack of open 4491 elements</a> and return to the step labeled <i>loop</i>.<li><p><i>Done</i>: If the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-25>stack of open elements</a> <a href=#has-an-element-in-button-scope id=parsing-main-inbody:has-an-element-in-button-scope-5>has a <code>p</code> element in button scope</a>, then <a href=#close-a-p-element id=parsing-main-inbody:close-a-p-element-5>close a 4492 <code>p</code> element</a>.<li><p>Finally, <a href=#insert-an-html-element id=parsing-main-inbody:insert-an-html-element-6>insert an HTML element</a> for the token.</ol> 4493 4494 <dt>A start tag whose tag name is one of: "dd", "dt"<dd> 4495 4496 <p>Run these steps:</p> 4497 4498 <ol><li><p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-6>frameset-ok flag</a> to "not ok".<li><p>Initialise <var>node</var> to be the <a href=#current-node id=parsing-main-inbody:current-node-6>current 4499 node</a> (the bottommost node of the stack).<li> 4500 4501 <p><i>Loop</i>: If <var>node</var> is a <code id=parsing-main-inbody:the-dd-element-4><a href=semantics.html#the-dd-element>dd</a></code> element, then run these 4502 substeps:</p> 4503 4504 <ol><li><p><a href=#generate-implied-end-tags id=parsing-main-inbody:generate-implied-end-tags-2>Generate implied end tags</a>, except for <code id=parsing-main-inbody:the-dd-element-5><a href=semantics.html#the-dd-element>dd</a></code> elements.<li><p>If the <a href=#current-node id=parsing-main-inbody:current-node-7>current node</a> is not a <code id=parsing-main-inbody:the-dd-element-6><a href=semantics.html#the-dd-element>dd</a></code> element, then this is a 4505 <a href=#parse-error id=parsing-main-inbody:parse-error-14>parse error</a>.<li><p>Pop elements from the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-26>stack of open elements</a> until a <code id=parsing-main-inbody:the-dd-element-7><a href=semantics.html#the-dd-element>dd</a></code> 4506 element has been popped from the stack.<li><p>Jump to the step labeled <i>done</i> below.</ol> 4507 4508 <li> 4509 4510 <p>If <var>node</var> is a <code id=parsing-main-inbody:the-dt-element-4><a href=semantics.html#the-dt-element>dt</a></code> element, then run these substeps:</p> 4511 4512 <ol><li><p><a href=#generate-implied-end-tags id=parsing-main-inbody:generate-implied-end-tags-3>Generate implied end tags</a>, except for <code id=parsing-main-inbody:the-dt-element-5><a href=semantics.html#the-dt-element>dt</a></code> elements.<li><p>If the <a href=#current-node id=parsing-main-inbody:current-node-8>current node</a> is not a <code id=parsing-main-inbody:the-dt-element-6><a href=semantics.html#the-dt-element>dt</a></code> element, then this is a 4513 <a href=#parse-error id=parsing-main-inbody:parse-error-15>parse error</a>.<li><p>Pop elements from the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-27>stack of open elements</a> until a <code id=parsing-main-inbody:the-dt-element-7><a href=semantics.html#the-dt-element>dt</a></code> 4514 element has been popped from the stack.<li><p>Jump to the step labeled <i>done</i> below.</ol> 4515 4516 <li><p>If <var>node</var> is in the <a href=#special id=parsing-main-inbody:special-2>special</a> category, but is not an 4517 <code id=parsing-main-inbody:the-address-element-2><a href=semantics.html#the-address-element>address</a></code>, <code id=parsing-main-inbody:the-div-element-2><a href=semantics.html#the-div-element>div</a></code>, or <code id=parsing-main-inbody:the-p-element-5><a href=semantics.html#the-p-element>p</a></code> element, then jump to the step 4518 labeled <i>done</i> below.<li><p>Otherwise, set <var>node</var> to the previous entry in the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-28>stack of open 4519 elements</a> and return to the step labeled <i>loop</i>.<li><p><i>Done</i>: If the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-29>stack of open elements</a> <a href=#has-an-element-in-button-scope id=parsing-main-inbody:has-an-element-in-button-scope-6>has a <code>p</code> element in button scope</a>, then <a href=#close-a-p-element id=parsing-main-inbody:close-a-p-element-6>close a 4520 <code>p</code> element</a>.<li><p>Finally, <a href=#insert-an-html-element id=parsing-main-inbody:insert-an-html-element-7>insert an HTML element</a> for the token.</ol> 4521 4522 <dt>A start tag whose tag name is "plaintext"<dd> 4523 4524 <p>If the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-30>stack of open elements</a> <a href=#has-an-element-in-button-scope id=parsing-main-inbody:has-an-element-in-button-scope-7>has a 4525 <code>p</code> element in button scope</a>, then <a href=#close-a-p-element id=parsing-main-inbody:close-a-p-element-7>close a <code>p</code> 4526 element</a>.</p> 4527 4528 <p><a href=#insert-an-html-element id=parsing-main-inbody:insert-an-html-element-8>Insert an HTML element</a> for the token.</p> 4529 4530 <p>Switch the tokenizer to the <a href=#plaintext-state id=parsing-main-inbody:plaintext-state>PLAINTEXT state</a>.</p> 4531 4532 <p class=note>Once a start tag with the tag name "plaintext" has been seen, that will be the 4533 last token ever seen other than character tokens (and the end-of-file token), because there is 4534 no way to switch out of the <a href=#plaintext-state id=parsing-main-inbody:plaintext-state-2>PLAINTEXT state</a>.</p> 4535 4536 <dt>A start tag whose tag name is "button"<dd> 4537 4538 <ol><li> 4539 4540 <p>If the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-31>stack of open elements</a> <a href=#has-an-element-in-scope id=parsing-main-inbody:has-an-element-in-scope-3>has a 4541 <code>button</code> element in scope</a>, then run these substeps:</p> 4542 4543 <ol><li><p><a href=#parse-error id=parsing-main-inbody:parse-error-16>Parse error</a>.<li><p><a href=#generate-implied-end-tags id=parsing-main-inbody:generate-implied-end-tags-4>Generate implied end tags</a>.<li><p>Pop elements from the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-32>stack of open elements</a> until a <code id=parsing-main-inbody:the-button-element><a href=forms.html#the-button-element>button</a></code> 4544 element has been popped from the stack.</ol> 4545 4546 <li><p><a href=#reconstruct-the-active-formatting-elements id=parsing-main-inbody:reconstruct-the-active-formatting-elements-3>Reconstruct the active formatting elements</a>, if any.<li><p><a href=#insert-an-html-element id=parsing-main-inbody:insert-an-html-element-9>Insert an HTML element</a> for the token.<li><p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-7>frameset-ok flag</a> to "not ok".</ol> 4547 4548 <dt>An end tag whose tag name is one of: "address", "article", "aside", "blockquote", "button", 4549 "center", "details", "dialog", "dir", "div", "dl", "fieldset", "figcaption", "figure", "footer", 4550 "header", "hgroup", "listing", "main", "menu", "nav", "ol", "pre", "section", "summary", 4551 "ul"<dd> 4552 4553 <p>If the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-33>stack of open elements</a> does not <a href=#has-an-element-in-scope id=parsing-main-inbody:has-an-element-in-scope-4>have an element in scope</a> that is an <a href=infrastructure.html#html-elements id=parsing-main-inbody:html-elements-2>HTML 4554 element</a> with the same tag name as that of the token, then this is a <a href=#parse-error id=parsing-main-inbody:parse-error-17>parse 4555 error</a>; ignore the token.</p> 4556 4557 <p>Otherwise, run these steps:</p> 4558 4559 <ol><li><p><a href=#generate-implied-end-tags id=parsing-main-inbody:generate-implied-end-tags-5>Generate implied end tags</a>.<li><p>If the <a href=#current-node id=parsing-main-inbody:current-node-9>current node</a> is not an <a href=infrastructure.html#html-elements id=parsing-main-inbody:html-elements-3>HTML element</a> with 4560 the same tag name as that of the token, then this is a 4561 <a href=#parse-error id=parsing-main-inbody:parse-error-18>parse error</a>.<li><p>Pop elements from the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-34>stack of open elements</a> until an <a href=infrastructure.html#html-elements id=parsing-main-inbody:html-elements-4>HTML element</a> with the same tag name as the token has been popped from the 4562 stack.</ol> 4563 4564 <dt>An end tag whose tag name is "form"<dd> 4565 4566 <p>If there is no <code id=parsing-main-inbody:the-template-element-5><a href=scripting.html#the-template-element>template</a></code> element on the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-35>stack of open elements</a>, then 4567 run these substeps:</p> 4568 4569 <ol><li><p>Let <var>node</var> be the element that the <a href=#form-element-pointer id=parsing-main-inbody:form-element-pointer-3><code>form</code> 4570 element pointer</a> is set to, or null if it is not set to an element.<li><p>Set the <a href=#form-element-pointer id=parsing-main-inbody:form-element-pointer-4><code>form</code> element pointer</a> to null.<li><p>If <var>node</var> is null or if the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-36>stack of open elements</a> does 4571 not <a href=#has-an-element-in-scope id=parsing-main-inbody:has-an-element-in-scope-5>have <var>node</var> in scope</a>, then 4572 this is a <a href=#parse-error id=parsing-main-inbody:parse-error-19>parse error</a>; abort these steps and ignore the token.<li><p><a href=#generate-implied-end-tags id=parsing-main-inbody:generate-implied-end-tags-6>Generate implied end tags</a>.<li><p>If the <a href=#current-node id=parsing-main-inbody:current-node-10>current node</a> is not <var>node</var>, then this is a 4573 <a href=#parse-error id=parsing-main-inbody:parse-error-20>parse error</a>.<li><p>Remove <var>node</var> from the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-37>stack of open elements</a>.</ol> 4574 4575 <p>If there <em>is</em> a <code id=parsing-main-inbody:the-template-element-6><a href=scripting.html#the-template-element>template</a></code> element on the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-38>stack of open 4576 elements</a>, then run these substeps instead:</p> 4577 4578 <ol><li><p>If the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-39>stack of open elements</a> does not <a href=#has-an-element-in-scope id=parsing-main-inbody:has-an-element-in-scope-6>have a <code>form</code> element in scope</a>, then this is a <a href=#parse-error id=parsing-main-inbody:parse-error-21>parse 4579 error</a>; abort these steps and ignore the token.<li><p><a href=#generate-implied-end-tags id=parsing-main-inbody:generate-implied-end-tags-7>Generate implied end tags</a>.<li><p>If the <a href=#current-node id=parsing-main-inbody:current-node-11>current node</a> is not a <code id=parsing-main-inbody:the-form-element><a href=forms.html#the-form-element>form</a></code> element, then this is a 4580 <a href=#parse-error id=parsing-main-inbody:parse-error-22>parse error</a>.<li><p>Pop elements from the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-40>stack of open elements</a> until a <code id=parsing-main-inbody:the-form-element-2><a href=forms.html#the-form-element>form</a></code> 4581 element has been popped from the stack.</ol> 4582 4583 <dt>An end tag whose tag name is "p"<dd> 4584 4585 <p>If the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-41>stack of open elements</a> does not <a href=#has-an-element-in-button-scope id=parsing-main-inbody:has-an-element-in-button-scope-8>have a <code>p</code> element in button scope</a>, then this is a <a href=#parse-error id=parsing-main-inbody:parse-error-23>parse 4586 error</a>; <a href=#insert-an-html-element id=parsing-main-inbody:insert-an-html-element-10>insert an HTML element</a> for a "p" start tag token with no 4587 attributes.</p> 4588 4589 <p><a href=#close-a-p-element id=parsing-main-inbody:close-a-p-element-8>Close a <code>p</code> element</a>.</p> 4590 4591 <dt>An end tag whose tag name is "li"<dd> 4592 4593 <p>If the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-42>stack of open elements</a> does not <a href=#has-an-element-in-list-item-scope id=parsing-main-inbody:has-an-element-in-list-item-scope>have an <code>li</code> element in list item scope</a>, then this is a <a href=#parse-error id=parsing-main-inbody:parse-error-24>parse 4594 error</a>; ignore the token.</p> 4595 4596 <p>Otherwise, run these steps:</p> 4597 4598 <ol><li><p><a href=#generate-implied-end-tags id=parsing-main-inbody:generate-implied-end-tags-8>Generate implied end tags</a>, except for <code id=parsing-main-inbody:the-li-element-8><a href=semantics.html#the-li-element>li</a></code> elements.<li><p>If the <a href=#current-node id=parsing-main-inbody:current-node-12>current node</a> is not an <code id=parsing-main-inbody:the-li-element-9><a href=semantics.html#the-li-element>li</a></code> element, then this is a 4599 <a href=#parse-error id=parsing-main-inbody:parse-error-25>parse error</a>.<li><p>Pop elements from the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-43>stack of open elements</a> until an <code id=parsing-main-inbody:the-li-element-10><a href=semantics.html#the-li-element>li</a></code> 4600 element has been popped from the stack.</ol> 4601 4602 <dt>An end tag whose tag name is one of: "dd", "dt"<dd> 4603 4604 <p>If the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-44>stack of open elements</a> does not <a href=#has-an-element-in-scope id=parsing-main-inbody:has-an-element-in-scope-7>have an element in scope</a> that is an <a href=infrastructure.html#html-elements id=parsing-main-inbody:html-elements-5>HTML 4605 element</a> with the same tag name as that of the token, then this is a <a href=#parse-error id=parsing-main-inbody:parse-error-26>parse 4606 error</a>; ignore the token.</p> 4607 4608 <p>Otherwise, run these steps:</p> 4609 4610 <ol><li><p><a href=#generate-implied-end-tags id=parsing-main-inbody:generate-implied-end-tags-9>Generate implied end tags</a>, except for <a id=parsing-main-inbody:html-elements-6 href=infrastructure.html#html-elements>HTML elements</a> with the 4611 same tag name as the token.<li><p>If the <a href=#current-node id=parsing-main-inbody:current-node-13>current node</a> is not an <a href=infrastructure.html#html-elements id=parsing-main-inbody:html-elements-7>HTML 4612 element</a> with the same tag name as that of the token, then this is a <a href=#parse-error id=parsing-main-inbody:parse-error-27>parse 4613 error</a>.<li><p>Pop elements from the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-45>stack of open elements</a> until an <a href=infrastructure.html#html-elements id=parsing-main-inbody:html-elements-8>HTML element</a> with the same tag name as the token has been popped from the 4614 stack.</ol> 4615 4616 <dt>An end tag whose tag name is one of: "h1", "h2", "h3", "h4", "h5", "h6"<dd> 4617 4618 <p>If the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-46>stack of open elements</a> does not <a href=#has-an-element-in-scope id=parsing-main-inbody:has-an-element-in-scope-8>have an element in scope</a> that is an <a href=infrastructure.html#html-elements id=parsing-main-inbody:html-elements-9>HTML 4619 element</a> and whose tag name is one of "h1", "h2", "h3", "h4", "h5", or "h6", then this is 4620 a <a href=#parse-error id=parsing-main-inbody:parse-error-28>parse error</a>; ignore the token.</p> 4621 4622 <p>Otherwise, run these steps:</p> 4623 4624 <ol><li><p><a href=#generate-implied-end-tags id=parsing-main-inbody:generate-implied-end-tags-10>Generate implied end tags</a>.<li><p>If the <a href=#current-node id=parsing-main-inbody:current-node-14>current node</a> is not an <a href=infrastructure.html#html-elements id=parsing-main-inbody:html-elements-10>HTML 4625 element</a> with the same tag name as that of the token, then this is a <a href=#parse-error id=parsing-main-inbody:parse-error-29>parse 4626 error</a>.<li><p>Pop elements from the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-47>stack of open elements</a> until an <a href=infrastructure.html#html-elements id=parsing-main-inbody:html-elements-11>HTML element</a> whose tag name is one of "h1", "h2", "h3", "h4", "h5", or "h6" 4627 has been popped from the stack.</ol> 4628 4629 <dt>An end tag whose tag name is "sarcasm"<dd> 4630 <p>Take a deep breath, then act as described in the "any other end 4631 tag" entry below.</p> 4632 <dt>A start tag whose tag name is "a"<dd> 4633 4634 <p>If the <a href=#list-of-active-formatting-elements id=parsing-main-inbody:list-of-active-formatting-elements>list of active formatting elements</a> contains an <code id=parsing-main-inbody:the-a-element><a href=semantics.html#the-a-element>a</a></code> element 4635 between the end of the list and the last <a href=#concept-parser-marker id=parsing-main-inbody:concept-parser-marker>marker</a> on 4636 the list (or the start of the list if there is no <a href=#concept-parser-marker id=parsing-main-inbody:concept-parser-marker-2>marker</a> on the list), then this is a <a href=#parse-error id=parsing-main-inbody:parse-error-30>parse 4637 error</a>; run the <a href=#adoption-agency-algorithm id=parsing-main-inbody:adoption-agency-algorithm>adoption agency algorithm</a> for the tag name "a", then remove 4638 that element from the <a href=#list-of-active-formatting-elements id=parsing-main-inbody:list-of-active-formatting-elements-2>list of active formatting elements</a> and the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-48>stack of 4639 open elements</a> if the <a href=#adoption-agency-algorithm id=parsing-main-inbody:adoption-agency-algorithm-2>adoption agency algorithm</a> didn't already remove it (it 4640 might not have if the element is not <a href=#has-an-element-in-table-scope id=parsing-main-inbody:has-an-element-in-table-scope>in table 4641 scope</a>).</p> 4642 4643 <p class=example>In the non-conforming stream 4644 <code><a href="a">a<table><a href="b">b</table>x</code>, the first 4645 <code id=parsing-main-inbody:the-a-element-2><a href=semantics.html#the-a-element>a</a></code> element would be closed upon seeing the second one, and the "x" character would 4646 be inside a link to "b", not to "a". This is despite the fact that the outer <code id=parsing-main-inbody:the-a-element-3><a href=semantics.html#the-a-element>a</a></code> 4647 element is not in table scope (meaning that a regular <code></a></code> end tag at the start 4648 of the table wouldn't close the outer <code id=parsing-main-inbody:the-a-element-4><a href=semantics.html#the-a-element>a</a></code> element). The result is that the two 4649 <code id=parsing-main-inbody:the-a-element-5><a href=semantics.html#the-a-element>a</a></code> elements are indirectly nested inside each other non-conforming markup 4650 will often result in non-conforming DOMs when parsed.</p> 4651 4652 <p><a href=#reconstruct-the-active-formatting-elements id=parsing-main-inbody:reconstruct-the-active-formatting-elements-4>Reconstruct the active formatting elements</a>, if any.</p> 4653 4654 <p><a href=#insert-an-html-element id=parsing-main-inbody:insert-an-html-element-11>Insert an HTML element</a> for the token. <a href=#push-onto-the-list-of-active-formatting-elements id=parsing-main-inbody:push-onto-the-list-of-active-formatting-elements>Push onto the list of active 4655 formatting elements</a> that element.</p> 4656 4657 <dt>A start tag whose tag name is one of: "b", "big", "code", "em", 4658 "font", "i", "s", "small", "strike", "strong", "tt", "u"<dd> 4659 4660 <p><a href=#reconstruct-the-active-formatting-elements id=parsing-main-inbody:reconstruct-the-active-formatting-elements-5>Reconstruct the active formatting elements</a>, if any.</p> 4661 4662 <p><a href=#insert-an-html-element id=parsing-main-inbody:insert-an-html-element-12>Insert an HTML element</a> for the token. <a href=#push-onto-the-list-of-active-formatting-elements id=parsing-main-inbody:push-onto-the-list-of-active-formatting-elements-2>Push onto the list of active 4663 formatting elements</a> that element.</p> 4664 4665 <dt>A start tag whose tag name is "nobr"<dd> 4666 4667 <p><a href=#reconstruct-the-active-formatting-elements id=parsing-main-inbody:reconstruct-the-active-formatting-elements-6>Reconstruct the active formatting elements</a>, if any.</p> 4668 4669 <p>If the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-49>stack of open elements</a> <a href=#has-an-element-in-scope id=parsing-main-inbody:has-an-element-in-scope-9>has a 4670 <code>nobr</code> element in scope</a>, then this is a <a href=#parse-error id=parsing-main-inbody:parse-error-31>parse error</a>; run the 4671 <a href=#adoption-agency-algorithm id=parsing-main-inbody:adoption-agency-algorithm-3>adoption agency algorithm</a> for the tag name "nobr", then once again 4672 <a href=#reconstruct-the-active-formatting-elements id=parsing-main-inbody:reconstruct-the-active-formatting-elements-7>reconstruct the active formatting elements</a>, if any.</p> 4673 4674 <p><a href=#insert-an-html-element id=parsing-main-inbody:insert-an-html-element-13>Insert an HTML element</a> for the token. <a href=#push-onto-the-list-of-active-formatting-elements id=parsing-main-inbody:push-onto-the-list-of-active-formatting-elements-3>Push onto the list of active 4675 formatting elements</a> that element.</p> 4676 4677 <dt>An end tag whose tag name is one of: "a", 4678 "b", "big", "code", "em", "font", "i", "nobr", "s", "small", 4679 "strike", "strong", "tt", "u"<dd> 4680 4681 <p>Run the <a href=#adoption-agency-algorithm id=parsing-main-inbody:adoption-agency-algorithm-4>adoption agency algorithm</a> for the token's tag name.</p> 4682 4683 <dt>A start tag whose tag name is one of: "applet", "marquee", "object"<dd> 4684 4685 <p><a href=#reconstruct-the-active-formatting-elements id=parsing-main-inbody:reconstruct-the-active-formatting-elements-8>Reconstruct the active formatting elements</a>, if any.</p> 4686 4687 <p><a href=#insert-an-html-element id=parsing-main-inbody:insert-an-html-element-14>Insert an HTML element</a> for the token.</p> 4688 4689 <p>Insert a <a href=#concept-parser-marker id=parsing-main-inbody:concept-parser-marker-3>marker</a> at the end of the <a href=#list-of-active-formatting-elements id=parsing-main-inbody:list-of-active-formatting-elements-3>list of 4690 active formatting elements</a>.</p> 4691 4692 <p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-8>frameset-ok flag</a> to "not ok".</p> 4693 4694 <dt>An end tag token whose tag name is one of: "applet", "marquee", "object"<dd> 4695 4696 <p>If the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-50>stack of open elements</a> does not <a href=#has-an-element-in-scope id=parsing-main-inbody:has-an-element-in-scope-10>have an element in scope</a> that is an <a href=infrastructure.html#html-elements id=parsing-main-inbody:html-elements-12>HTML 4697 element</a> with the same tag name as that of the token, then this is a <a href=#parse-error id=parsing-main-inbody:parse-error-32>parse 4698 error</a>; ignore the token.</p> 4699 4700 <p>Otherwise, run these steps:</p> 4701 4702 <ol><li><p><a href=#generate-implied-end-tags id=parsing-main-inbody:generate-implied-end-tags-11>Generate implied end tags</a>.<li><p>If the <a href=#current-node id=parsing-main-inbody:current-node-15>current node</a> is not an <a href=infrastructure.html#html-elements id=parsing-main-inbody:html-elements-13>HTML 4703 element</a> with the same tag name as that of the token, then this is a <a href=#parse-error id=parsing-main-inbody:parse-error-33>parse 4704 error</a>.<li><p>Pop elements from the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-51>stack of open elements</a> until an <a href=infrastructure.html#html-elements id=parsing-main-inbody:html-elements-14>HTML element</a> with the same tag name as the token has been popped from the 4705 stack.<li><a href=#clear-the-list-of-active-formatting-elements-up-to-the-last-marker id=parsing-main-inbody:clear-the-list-of-active-formatting-elements-up-to-the-last-marker>Clear the list of active formatting elements up to the last marker</a>.</ol> 4706 4707 <dt>A start tag whose tag name is "table"<dd> 4708 4709 <p>If the <code id=parsing-main-inbody:document><a href=dom.html#document>Document</a></code> is <em>not</em> set to <a id=parsing-main-inbody:quirks-mode href=infrastructure.html#quirks-mode>quirks mode</a>, and the 4710 <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-52>stack of open elements</a> <a href=#has-an-element-in-button-scope id=parsing-main-inbody:has-an-element-in-button-scope-9>has a 4711 <code>p</code> element in button scope</a>, then <a href=#close-a-p-element id=parsing-main-inbody:close-a-p-element-9>close a <code>p</code> 4712 element</a>.</p> 4713 4714 <p><a href=#insert-an-html-element id=parsing-main-inbody:insert-an-html-element-15>Insert an HTML element</a> for the token.</p> 4715 4716 <p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-9>frameset-ok flag</a> to "not ok".</p> 4717 4718 <p>Switch the <a href=#insertion-mode id=parsing-main-inbody:insertion-mode-7>insertion mode</a> to "<a href=#parsing-main-intable id=parsing-main-inbody:parsing-main-intable>in 4719 table</a>".</p> 4720 4721 <dt>An end tag whose tag name is "br"<dd> 4722 4723 <p><a href=#parse-error id=parsing-main-inbody:parse-error-34>Parse error</a>. Drop the attributes from the token, and act as described in the 4724 next entry; i.e. act as if this was a "br" start tag token with no attributes, rather than the 4725 end tag token that it actually is.</p> 4726 4727 <dt>A start tag whose tag name is one of: "area", "br", "embed", 4728 "img", "keygen", "wbr"<dd> 4729 4730 <p><a href=#reconstruct-the-active-formatting-elements id=parsing-main-inbody:reconstruct-the-active-formatting-elements-9>Reconstruct the active formatting elements</a>, if any.</p> 4731 4732 <p><a href=#insert-an-html-element id=parsing-main-inbody:insert-an-html-element-16>Insert an HTML element</a> for the token. Immediately pop the <a href=#current-node id=parsing-main-inbody:current-node-16>current 4733 node</a> off the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-53>stack of open elements</a>.</p> 4734 4735 <p><a href=#acknowledge-self-closing-flag id=parsing-main-inbody:acknowledge-self-closing-flag>Acknowledge the token's <i>self-closing 4736 flag</i></a>, if it is set.</p> 4737 4738 <p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-10>frameset-ok flag</a> to "not ok".</p> 4739 4740 4741 <dt>A start tag whose tag name is "input"<dd> 4742 4743 <p><a href=#reconstruct-the-active-formatting-elements id=parsing-main-inbody:reconstruct-the-active-formatting-elements-10>Reconstruct the active formatting elements</a>, if any.</p> 4744 4745 <p><a href=#insert-an-html-element id=parsing-main-inbody:insert-an-html-element-17>Insert an HTML element</a> for the token. Immediately pop the <a href=#current-node id=parsing-main-inbody:current-node-17>current 4746 node</a> off the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-54>stack of open elements</a>.</p> 4747 4748 <p><a href=#acknowledge-self-closing-flag id=parsing-main-inbody:acknowledge-self-closing-flag-2>Acknowledge the token's <i>self-closing 4749 flag</i></a>, if it is set.</p> 4750 4751 <p>If the token does not have an attribute with the name "type", or if it does, but that 4752 attribute's value is not an <a id=parsing-main-inbody:ascii-case-insensitive href=infrastructure.html#ascii-case-insensitive>ASCII case-insensitive</a> match for the string "<code>hidden</code>", then: set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-11>frameset-ok flag</a> to "not ok".</p> 4753 4754 <dt>A start tag whose tag name is one of: "menuitem", "param", "source", "track"<dd> 4755 4756 <p><a href=#insert-an-html-element id=parsing-main-inbody:insert-an-html-element-18>Insert an HTML element</a> for the token. Immediately pop the <a href=#current-node id=parsing-main-inbody:current-node-18>current 4757 node</a> off the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-55>stack of open elements</a>.</p> 4758 4759 <p><a href=#acknowledge-self-closing-flag id=parsing-main-inbody:acknowledge-self-closing-flag-3>Acknowledge the token's <i>self-closing 4760 flag</i></a>, if it is set.</p> 4761 4762 <dt>A start tag whose tag name is "hr"<dd> 4763 4764 <p>If the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-56>stack of open elements</a> <a href=#has-an-element-in-button-scope id=parsing-main-inbody:has-an-element-in-button-scope-10>has a 4765 <code>p</code> element in button scope</a>, then <a href=#close-a-p-element id=parsing-main-inbody:close-a-p-element-10>close a <code>p</code> 4766 element</a>.</p> 4767 4768 <p><a href=#insert-an-html-element id=parsing-main-inbody:insert-an-html-element-19>Insert an HTML element</a> for the token. Immediately pop the <a href=#current-node id=parsing-main-inbody:current-node-19>current 4769 node</a> off the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-57>stack of open elements</a>.</p> 4770 4771 <p><a href=#acknowledge-self-closing-flag id=parsing-main-inbody:acknowledge-self-closing-flag-4>Acknowledge the token's <i>self-closing 4772 flag</i></a>, if it is set.</p> 4773 4774 <p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-12>frameset-ok flag</a> to "not ok".</p> 4775 4776 <dt>A start tag whose tag name is "image"<dd> 4777 4778 <p><a href=#parse-error id=parsing-main-inbody:parse-error-35>Parse error</a>. Change the token's tag name to "img" and reprocess it. (Don't 4779 ask.)</p> 4780 <dt id=isindex>A start tag whose tag name is "isindex"<dd> 4781 4782 <p><a href=#parse-error id=parsing-main-inbody:parse-error-36>Parse error</a>.</p> 4783 4784 <p>If there is no <code id=parsing-main-inbody:the-template-element-7><a href=scripting.html#the-template-element>template</a></code> element on the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-58>stack of open elements</a> and 4785 the <a href=#form-element-pointer id=parsing-main-inbody:form-element-pointer-5><code>form</code> element pointer</a> is not null, then ignore the 4786 token.</p> 4787 4788 <p>Otherwise:</p> 4789 4790 <p><a href=#acknowledge-self-closing-flag id=parsing-main-inbody:acknowledge-self-closing-flag-5>Acknowledge the token's <i>self-closing 4791 flag</i></a>, if it is set.</p> 4792 4793 <p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-13>frameset-ok flag</a> to "not ok".</p> 4794 4795 4796 <p>If the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-59>stack of open elements</a> <a href=#has-an-element-in-button-scope id=parsing-main-inbody:has-an-element-in-button-scope-11>has a 4797 <code>p</code> element in button scope</a>, then <a href=#close-a-p-element id=parsing-main-inbody:close-a-p-element-11>close a <code>p</code> 4798 element</a>.</p> 4799 4800 <p><a href=#insert-an-html-element id=parsing-main-inbody:insert-an-html-element-20>Insert an HTML element</a> for a "form" start tag token with no attributes, and, if 4801 there is no <code id=parsing-main-inbody:the-template-element-8><a href=scripting.html#the-template-element>template</a></code> element on the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-60>stack of open elements</a>, set the 4802 <a href=#form-element-pointer id=parsing-main-inbody:form-element-pointer-6><code>form</code> element pointer</a> to point to the element 4803 created.</p> 4804 4805 <p>If the token has an attribute called "action", set the <code id=parsing-main-inbody:attr-fs-action><a href=forms.html#attr-fs-action>action</a></code> attribute on the resulting <code id=parsing-main-inbody:the-form-element-3><a href=forms.html#the-form-element>form</a></code> element to the 4806 value of the "action" attribute of the token.</p> 4807 4808 4809 <p><a href=#insert-an-html-element id=parsing-main-inbody:insert-an-html-element-21>Insert an HTML element</a> for an "hr" start tag token with no attributes. 4810 Immediately pop the <a href=#current-node id=parsing-main-inbody:current-node-20>current node</a> off the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-61>stack of open elements</a>.</p> 4811 4812 4813 <p><a href=#reconstruct-the-active-formatting-elements id=parsing-main-inbody:reconstruct-the-active-formatting-elements-11>Reconstruct the active formatting elements</a>, if any.</p> 4814 4815 <p><a href=#insert-an-html-element id=parsing-main-inbody:insert-an-html-element-22>Insert an HTML element</a> for a "label" start tag token with no attributes.</p> 4816 4817 4818 <p><a href=#insert-a-character id=parsing-main-inbody:insert-a-character-3>Insert characters</a> (see below for <a href=#attr-isindex-prompt id=parsing-main-inbody:attr-isindex-prompt>what they should say</a>).</p> 4819 4820 4821 <p><a href=#insert-an-html-element id=parsing-main-inbody:insert-an-html-element-23>Insert an HTML element</a> for an "input" start tag token with all the attributes 4822 from the "isindex" token except "name", "action", and "prompt", and with an attribute named 4823 "name" with the value "isindex". (This creates an <code id=parsing-main-inbody:the-input-element><a href=forms.html#the-input-element>input</a></code> element with the <code id=parsing-main-inbody:attr-fe-name><a href=forms.html#attr-fe-name>name</a></code> attribute set to the magic value "<code id=parsing-main-inbody:attr-fe-name-isindex><a href=forms.html#attr-fe-name-isindex>isindex</a></code>".) Immediately pop the <a href=#current-node id=parsing-main-inbody:current-node-21>current node</a> off 4824 the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-62>stack of open elements</a>.</p> 4825 4826 4827 <p><a href=#insert-a-character id=parsing-main-inbody:insert-a-character-4>Insert more characters</a> (see below for <a href=#attr-isindex-prompt id=parsing-main-inbody:attr-isindex-prompt-2>what they should say</a>).</p> 4828 4829 4830 <p>Pop the <a href=#current-node id=parsing-main-inbody:current-node-22>current node</a> (which will be the <code id=parsing-main-inbody:the-label-element><a href=forms.html#the-label-element>label</a></code> element created 4831 earlier) off the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-63>stack of open elements</a>.</p> 4832 4833 4834 <p><a href=#insert-an-html-element id=parsing-main-inbody:insert-an-html-element-24>Insert an HTML element</a> for an "hr" start tag token with no attributes. 4835 Immediately pop the <a href=#current-node id=parsing-main-inbody:current-node-23>current node</a> off the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-64>stack of open elements</a>.</p> 4836 4837 4838 <p>Pop the <a href=#current-node id=parsing-main-inbody:current-node-24>current node</a> (which will be the <code id=parsing-main-inbody:the-form-element-4><a href=forms.html#the-form-element>form</a></code> element created 4839 earlier) off the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-65>stack of open elements</a>, and, if there is no <code id=parsing-main-inbody:the-template-element-9><a href=scripting.html#the-template-element>template</a></code> 4840 element on the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-66>stack of open elements</a>, set the <a href=#form-element-pointer id=parsing-main-inbody:form-element-pointer-7><code>form</code> element pointer</a> back to null.</p> 4841 4842 4843 <p><dfn id=attr-isindex-prompt><strong>Prompt</strong></dfn>: If the token has an attribute 4844 with the name "prompt", then the first stream of characters must be the same string as given in 4845 that attribute, and the second stream of characters must be empty. Otherwise, the two streams of 4846 character tokens together should, together with the <code id=parsing-main-inbody:the-input-element-2><a href=forms.html#the-input-element>input</a></code> element, express the 4847 equivalent of "This is a searchable index. Enter search keywords: (input field)" in the user's 4848 preferred language.</p> 4849 4850 <dt>A start tag whose tag name is "textarea"<dd> 4851 4852 <p>Run these steps:</p> 4853 4854 <ol><li><p><a href=#insert-an-html-element id=parsing-main-inbody:insert-an-html-element-25>Insert an HTML element</a> for the token.<li><p>If the <a href=#next-token id=parsing-main-inbody:next-token-2>next token</a> is a U+000A LINE FEED (LF) character token, then ignore 4855 that token and move on to the next one. (Newlines at the start of <code id=parsing-main-inbody:the-textarea-element><a href=forms.html#the-textarea-element>textarea</a></code> 4856 elements are ignored as an authoring convenience.)<li><p>Switch the tokenizer to the <a href=#rcdata-state id=parsing-main-inbody:rcdata-state>RCDATA state</a>.<li><p>Let the <a href=#original-insertion-mode id=parsing-main-inbody:original-insertion-mode>original insertion mode</a> be the current <a href=#insertion-mode id=parsing-main-inbody:insertion-mode-8>insertion 4857 mode</a>.</p> 4858 4859 <li><p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-14>frameset-ok flag</a> to "not ok".<li><p>Switch the <a href=#insertion-mode id=parsing-main-inbody:insertion-mode-9>insertion mode</a> to "<a href=#parsing-main-incdata id=parsing-main-inbody:parsing-main-incdata>text</a>".</ol> 4860 4861 <dt>A start tag whose tag name is "xmp"<dd> 4862 4863 <p>If the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-67>stack of open elements</a> <a href=#has-an-element-in-button-scope id=parsing-main-inbody:has-an-element-in-button-scope-12>has a 4864 <code>p</code> element in button scope</a>, then <a href=#close-a-p-element id=parsing-main-inbody:close-a-p-element-12>close a <code>p</code> 4865 element</a>.</p> 4866 4867 <p><a href=#reconstruct-the-active-formatting-elements id=parsing-main-inbody:reconstruct-the-active-formatting-elements-12>Reconstruct the active formatting elements</a>, if any.</p> 4868 4869 <p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-15>frameset-ok flag</a> to "not ok".</p> 4870 4871 <p>Follow the <a href=#generic-raw-text-element-parsing-algorithm id=parsing-main-inbody:generic-raw-text-element-parsing-algorithm>generic raw text element parsing algorithm</a>.</p> 4872 4873 <dt>A start tag whose tag name is "iframe"<dd> 4874 4875 <p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-16>frameset-ok flag</a> to "not ok".</p> 4876 4877 <p>Follow the <a href=#generic-raw-text-element-parsing-algorithm id=parsing-main-inbody:generic-raw-text-element-parsing-algorithm-2>generic raw text element parsing algorithm</a>.</p> 4878 4879 <dt>A start tag whose tag name is "noembed"<dt>A start tag whose tag name is "noscript", if the <a href=#scripting-flag id=parsing-main-inbody:scripting-flag>scripting flag</a> is enabled<dd> 4880 4881 <p>Follow the <a href=#generic-raw-text-element-parsing-algorithm id=parsing-main-inbody:generic-raw-text-element-parsing-algorithm-3>generic raw text element parsing algorithm</a>.</p> 4882 4883 <dt>A start tag whose tag name is "select"<dd> 4884 4885 <p><a href=#reconstruct-the-active-formatting-elements id=parsing-main-inbody:reconstruct-the-active-formatting-elements-13>Reconstruct the active formatting elements</a>, if any.</p> 4886 4887 <p><a href=#insert-an-html-element id=parsing-main-inbody:insert-an-html-element-26>Insert an HTML element</a> for the token.</p> 4888 4889 <p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-17>frameset-ok flag</a> to "not ok".</p> 4890 4891 <p>If the <a href=#insertion-mode id=parsing-main-inbody:insertion-mode-10>insertion mode</a> is one of "<a href=#parsing-main-intable id=parsing-main-inbody:parsing-main-intable-2>in 4892 table</a>", "<a href=#parsing-main-incaption id=parsing-main-inbody:parsing-main-incaption>in caption</a>", "<a href=#parsing-main-intbody id=parsing-main-inbody:parsing-main-intbody>in table body</a>", "<a href=#parsing-main-intr id=parsing-main-inbody:parsing-main-intr>in row</a>", or "<a href=#parsing-main-intd id=parsing-main-inbody:parsing-main-intd>in cell</a>", then switch the 4893 <a href=#insertion-mode id=parsing-main-inbody:insertion-mode-11>insertion mode</a> to "<a href=#parsing-main-inselectintable id=parsing-main-inbody:parsing-main-inselectintable>in select in 4894 table</a>". Otherwise, switch the <a href=#insertion-mode id=parsing-main-inbody:insertion-mode-12>insertion mode</a> to "<a href=#parsing-main-inselect id=parsing-main-inbody:parsing-main-inselect>in select</a>".</p> 4895 4896 <dt>A start tag whose tag name is one of: "optgroup", "option"<dd> 4897 4898 <p>If the <a href=#current-node id=parsing-main-inbody:current-node-25>current node</a> is an <code id=parsing-main-inbody:the-option-element-4><a href=forms.html#the-option-element>option</a></code> element, then pop the 4899 <a href=#current-node id=parsing-main-inbody:current-node-26>current node</a> off the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-68>stack of open elements</a>.</p> 4900 4901 <p><a href=#reconstruct-the-active-formatting-elements id=parsing-main-inbody:reconstruct-the-active-formatting-elements-14>Reconstruct the active formatting elements</a>, if any.</p> 4902 4903 <p><a href=#insert-an-html-element id=parsing-main-inbody:insert-an-html-element-27>Insert an HTML element</a> for the token.</p> 4904 4905 <dt>A start tag whose tag name is one of: "rp", "rt"<dd> 4906 4907 4908 4909 <p>If the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-69>stack of open elements</a> <a href=#has-an-element-in-scope id=parsing-main-inbody:has-an-element-in-scope-11>has a 4910 <code>ruby</code> element in scope</a>, then <a href=#generate-implied-end-tags id=parsing-main-inbody:generate-implied-end-tags-12>generate implied end tags</a>. If the 4911 <a href=#current-node id=parsing-main-inbody:current-node-27>current node</a> is not then a <code id=parsing-main-inbody:the-ruby-element><a href=semantics.html#the-ruby-element>ruby</a></code> element, this is a <a href=#parse-error id=parsing-main-inbody:parse-error-37>parse 4912 error</a>.</p> 4913 4914 <p><a href=#insert-an-html-element id=parsing-main-inbody:insert-an-html-element-28>Insert an HTML element</a> for the token.</p> 4915 4916 <dt>A start tag whose tag name is "math"<dd> 4917 4918 <p><a href=#reconstruct-the-active-formatting-elements id=parsing-main-inbody:reconstruct-the-active-formatting-elements-15>Reconstruct the active formatting elements</a>, if any.</p> 4919 4920 <p><a href=#adjust-mathml-attributes id=parsing-main-inbody:adjust-mathml-attributes>Adjust MathML attributes</a> for the token. (This fixes the case of MathML 4921 attributes that are not all lowercase.)</p> 4922 4923 <p><a href=#adjust-foreign-attributes id=parsing-main-inbody:adjust-foreign-attributes>Adjust foreign attributes</a> for the token. (This fixes the use of namespaced 4924 attributes, in particular XLink.)</p> 4925 4926 <p><a href=#insert-a-foreign-element id=parsing-main-inbody:insert-a-foreign-element>Insert a foreign element</a> for the token, in the <a id=parsing-main-inbody:mathml-namespace href=infrastructure.html#mathml-namespace>MathML 4927 namespace</a>.</p> 4928 4929 4930 4931 <p>If the token has its <i id=parsing-main-inbody:self-closing-flag><a href=#self-closing-flag>self-closing flag</a></i> set, pop the <a href=#current-node id=parsing-main-inbody:current-node-28>current node</a> off the 4932 <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-70>stack of open elements</a> and <a href=#acknowledge-self-closing-flag id=parsing-main-inbody:acknowledge-self-closing-flag-6>acknowledge 4933 the token's <i>self-closing flag</i></a>.</p> 4934 4935 <dt>A start tag whose tag name is "svg"<dd> 4936 4937 <p><a href=#reconstruct-the-active-formatting-elements id=parsing-main-inbody:reconstruct-the-active-formatting-elements-16>Reconstruct the active formatting elements</a>, if any.</p> 4938 4939 <p><a href=#adjust-svg-attributes id=parsing-main-inbody:adjust-svg-attributes>Adjust SVG attributes</a> for the token. (This fixes the case of SVG attributes that 4940 are not all lowercase.)</p> 4941 4942 <p><a href=#adjust-foreign-attributes id=parsing-main-inbody:adjust-foreign-attributes-2>Adjust foreign attributes</a> for the token. (This fixes the use of namespaced 4943 attributes, in particular XLink in SVG.)</p> 4944 4945 <p><a href=#insert-a-foreign-element id=parsing-main-inbody:insert-a-foreign-element-2>Insert a foreign element</a> for the token, in the <a id=parsing-main-inbody:svg-namespace href=infrastructure.html#svg-namespace>SVG namespace</a>.</p> 4946 4947 4948 4949 <p>If the token has its <i id=parsing-main-inbody:self-closing-flag-2><a href=#self-closing-flag>self-closing flag</a></i> set, pop the <a href=#current-node id=parsing-main-inbody:current-node-29>current node</a> off the 4950 <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-71>stack of open elements</a> and <a href=#acknowledge-self-closing-flag id=parsing-main-inbody:acknowledge-self-closing-flag-7>acknowledge 4951 the token's <i>self-closing flag</i></a>.</p> 4952 4953 <dt>A start tag whose tag name is one of: "caption", "col", "colgroup", "frame", 4954 "head", "tbody", "td", "tfoot", "th", "thead", "tr"<dd> 4955 4956 <p><a href=#parse-error id=parsing-main-inbody:parse-error-38>Parse error</a>. Ignore the token.</p> 4957 4958 4959 4960 <dt>Any other start tag<dd> 4961 4962 <p><a href=#reconstruct-the-active-formatting-elements id=parsing-main-inbody:reconstruct-the-active-formatting-elements-17>Reconstruct the active formatting elements</a>, if any.</p> 4963 4964 <p><a href=#insert-an-html-element id=parsing-main-inbody:insert-an-html-element-29>Insert an HTML element</a> for the token.</p> 4965 4966 <p class=note>This element will be an <a href=#ordinary id=parsing-main-inbody:ordinary>ordinary</a> 4967 element.</p> 4968 4969 <dt>Any other end tag<dd> 4970 4971 <p>Run these steps:</p> 4972 4973 <ol><li><p>Initialise <var>node</var> to be the <a href=#current-node id=parsing-main-inbody:current-node-30>current node</a> (the bottommost 4974 node of the stack).<li><p><i>Loop</i>: If <var>node</var> is an <a href=infrastructure.html#html-elements id=parsing-main-inbody:html-elements-15>HTML 4975 element</a> with the same tag name as the token, then:</p> 4976 4977 <ol><li><p><a href=#generate-implied-end-tags id=parsing-main-inbody:generate-implied-end-tags-13>Generate implied end tags</a>, except for <a id=parsing-main-inbody:html-elements-16 href=infrastructure.html#html-elements>HTML elements</a> with the 4978 same tag name as the token.<li><p>If <var>node</var> is not the <a href=#current-node id=parsing-main-inbody:current-node-31>current node</a>, then this is a 4979 <a href=#parse-error id=parsing-main-inbody:parse-error-39>parse error</a>.<li><p>Pop all the nodes from the <a href=#current-node id=parsing-main-inbody:current-node-32>current node</a> up to <var>node</var>, 4980 including <var>node</var>, then stop these steps.</ol> 4981 4982 <li><p>Otherwise, if <var>node</var> is in the <a href=#special id=parsing-main-inbody:special-3>special</a> category, then 4983 this is a <a href=#parse-error id=parsing-main-inbody:parse-error-40>parse error</a>; ignore the token, and abort these steps.<li><p>Set <var>node</var> to the previous entry in the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-72>stack of open 4984 elements</a>.<li><p>Return to the step labeled <i>loop</i>.</ol> 4985 4986 </dl> 4987 4988 <p>When the steps above say the user agent is to <dfn id=close-a-p-element>close a <code>p</code> element</dfn>, it 4989 means that the user agent must run the following steps:</p> 4990 4991 <ol><li><p><a href=#generate-implied-end-tags id=parsing-main-inbody:generate-implied-end-tags-14>Generate implied end tags</a>, except for <code id=parsing-main-inbody:the-p-element-6><a href=semantics.html#the-p-element>p</a></code> elements.<li><p>If the <a href=#current-node id=parsing-main-inbody:current-node-33>current node</a> is not a <code id=parsing-main-inbody:the-p-element-7><a href=semantics.html#the-p-element>p</a></code> element, then this is a 4992 <a href=#parse-error id=parsing-main-inbody:parse-error-41>parse error</a>.<li><p>Pop elements from the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-73>stack of open elements</a> until a <code id=parsing-main-inbody:the-p-element-8><a href=semantics.html#the-p-element>p</a></code> element 4993 has been popped from the stack.</ol> 4994 4995 4996 <p id=adoptionAgency>The <dfn id=adoption-agency-algorithm>adoption agency algorithm</dfn>, which takes as its only argument 4997 a tag name <var>subject</var> for which the algorithm is being run, consists of the 4998 following steps:</p> 4999 5000 <ol><li><p>If the <a href=#current-node id=parsing-main-inbody:current-node-34>current node</a> is an <a href=infrastructure.html#html-elements id=parsing-main-inbody:html-elements-17>HTML element</a> 5001 whose tag name is <var>subject</var>, and the <a href=#current-node id=parsing-main-inbody:current-node-35>current node</a> is not in the 5002 <a href=#list-of-active-formatting-elements id=parsing-main-inbody:list-of-active-formatting-elements-4>list of active formatting elements</a>, then pop the <a href=#current-node id=parsing-main-inbody:current-node-36>current node</a> off the 5003 <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-74>stack of open elements</a>, and abort these steps.<li><p>Let <var>outer loop counter</var> be zero.<li><p><i>Outer loop</i>: If <var>outer loop counter</var> is greater than or equal to 5004 eight, then abort these steps.<li><p>Increment <var>outer loop counter</var> by one.<li> 5005 5006 <p>Let <var>formatting element</var> be the last element in the <a href=#list-of-active-formatting-elements id=parsing-main-inbody:list-of-active-formatting-elements-5>list of active 5007 formatting elements</a> that:</p> 5008 5009 <ul><li>is between the end of the list and the last <a href=#concept-parser-marker id=parsing-main-inbody:concept-parser-marker-4>marker</a> in the list, if any, or the start of the list 5010 otherwise, and<li>has the tag name <var>subject</var>.</ul> 5011 5012 <p>If there is no such element, then abort these steps and instead act as described in the "any 5013 other end tag" entry above.</p> 5014 5015 <li><p>If <var>formatting element</var> is not in the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-75>stack of open 5016 elements</a>, then this is a <a href=#parse-error id=parsing-main-inbody:parse-error-42>parse error</a>; remove the element from the list, and 5017 abort these steps.<li><p>If <var>formatting element</var> is in the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-76>stack of open elements</a>, 5018 but the element is not <a href=#has-an-element-in-scope id=parsing-main-inbody:has-an-element-in-scope-12>in scope</a>, then this is a 5019 <a href=#parse-error id=parsing-main-inbody:parse-error-43>parse error</a>; abort these steps.<li><p>If <var>formatting element</var> is not the <a href=#current-node id=parsing-main-inbody:current-node-37>current node</a>, this is a 5020 <a href=#parse-error id=parsing-main-inbody:parse-error-44>parse error</a>. (But do not abort these steps.)<li><p>Let <var>furthest block</var> be the topmost node in the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-77>stack of open 5021 elements</a> that is lower in the stack than <var>formatting element</var>, and is an 5022 element in the <a href=#special id=parsing-main-inbody:special-4>special</a> category. There might not be one.<li><p>If there is no <var>furthest block</var>, then the UA must first pop all the 5023 nodes from the bottom of the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-78>stack of open elements</a>, from the <a href=#current-node id=parsing-main-inbody:current-node-38>current 5024 node</a> up to and including <var>formatting element</var>, then remove <var>formatting element</var> from the <a href=#list-of-active-formatting-elements id=parsing-main-inbody:list-of-active-formatting-elements-6>list of active formatting elements</a>, and 5025 finally abort these steps.<li><p>Let <var>common ancestor</var> be the element immediately above <var>formatting element</var> in the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-79>stack of open elements</a>.<li><p>Let a bookmark note the position of <var>formatting element</var> in the 5026 <a href=#list-of-active-formatting-elements id=parsing-main-inbody:list-of-active-formatting-elements-7>list of active formatting elements</a> relative to the elements on either side of it in 5027 the list.<li> 5028 5029 <p>Let <var>node</var> and <var>last node</var> be <var>furthest 5030 block</var>. Follow these steps:</p> 5031 5032 <ol><li><p>Let <var>inner loop counter</var> be zero.<li><p><i>Inner loop</i>: Increment <var>inner loop counter</var> by one.<li><p>Let <var>node</var> be the element immediately above <var>node</var> 5033 in the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-80>stack of open elements</a>, or if <var>node</var> is no longer in the 5034 <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-81>stack of open elements</a> (e.g. because it got removed by this algorithm), the element that was immediately above <var>node</var> in the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-82>stack of open elements</a> before <var>node</var> 5035 was removed.<li><p>If <var>node</var> is <var>formatting element</var>, then go to the 5036 next step in the overall algorithm.<li><p>If <var>inner loop counter</var> is greater than three and <var>node</var> is in the <a href=#list-of-active-formatting-elements id=parsing-main-inbody:list-of-active-formatting-elements-8>list of active formatting elements</a>, then remove <var>node</var> from the <a href=#list-of-active-formatting-elements id=parsing-main-inbody:list-of-active-formatting-elements-9>list of active formatting elements</a>.<li><p>If <var>node</var> is not in the <a href=#list-of-active-formatting-elements id=parsing-main-inbody:list-of-active-formatting-elements-10>list of active 5037 formatting elements</a>, then remove <var>node</var> from the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-83>stack of open 5038 elements</a> and then go back to the step labeled <i>inner loop</i>.<li><p><a href=#create-an-element-for-the-token id=parsing-main-inbody:create-an-element-for-the-token>Create an element for the token</a> for which the element <var>node</var> was created, in the <a id=parsing-main-inbody:html-namespace-2 href=infrastructure.html#html-namespace-2>HTML namespace</a>, with <var>common 5039 ancestor</var> as the intended parent; replace the entry for <var>node</var> in the 5040 <a href=#list-of-active-formatting-elements id=parsing-main-inbody:list-of-active-formatting-elements-11>list of active formatting elements</a> with an entry for the new element, replace the 5041 entry for <var>node</var> in the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-84>stack of open elements</a> with an entry for 5042 the new element, and let <var>node</var> be the new element.<li><p>If <var>last node</var> is <var>furthest block</var>, then move the 5043 aforementioned bookmark to be immediately after the new <var>node</var> in the 5044 <a href=#list-of-active-formatting-elements id=parsing-main-inbody:list-of-active-formatting-elements-12>list of active formatting elements</a>.<li><p>Insert <var>last node</var> into <var>node</var>, first removing it 5045 from its previous parent node if any.<li><p>Let <var>last node</var> be <var>node</var>.<li><p>Return to the step labeled <i>inner loop</i>.</ol> 5046 5047 <li><p>Insert whatever <var>last node</var> ended up being in the previous step at the 5048 <a href=#appropriate-place-for-inserting-a-node id=parsing-main-inbody:appropriate-place-for-inserting-a-node>appropriate place for inserting a node</a>, but using <var>common 5049 ancestor</var> as the <i>override target</i>.<li><p><a href=#create-an-element-for-the-token id=parsing-main-inbody:create-an-element-for-the-token-2>Create an element for the token</a> for which <var>formatting 5050 element</var> was created, in the <a id=parsing-main-inbody:html-namespace-2-2 href=infrastructure.html#html-namespace-2>HTML namespace</a>, with <var>furthest 5051 block</var> as the intended parent.<li><p>Take all of the child nodes of <var>furthest block</var> and append them to the 5052 element created in the last step.<li><p>Append that new element to <var>furthest block</var>.<li><p>Remove <var>formatting element</var> from the <a href=#list-of-active-formatting-elements id=parsing-main-inbody:list-of-active-formatting-elements-13>list of active formatting 5053 elements</a>, and insert the new element into the <a href=#list-of-active-formatting-elements id=parsing-main-inbody:list-of-active-formatting-elements-14>list of active formatting 5054 elements</a> at the position of the aforementioned bookmark.<li><p>Remove <var>formatting element</var> from the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-85>stack of open 5055 elements</a>, and insert the new element into the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-86>stack of open elements</a> 5056 immediately below the position of <var>furthest block</var> in that stack.<li><p>Jump back to the step labeled <i>outer loop</i>.</ol> 5057 5058 <p class=note>This algorithm's name, the "adoption agency algorithm", comes from the way it 5059 causes elements to change parents, and is in contrast with other possible algorithms for dealing 5060 with misnested content, which included the "incest algorithm", the "secret affair algorithm", and 5061 the "Heisenberg algorithm".</p> 5062 5063 5064 5065 5066 5067 <h6 id=parsing-main-incdata>12.2.5.4.8 The "<dfn>text</dfn>" insertion mode</h6> 5068 5069 <p>When the user agent is to apply the rules for the "<a href=#parsing-main-incdata id=parsing-main-incdata:parsing-main-incdata>text</a>" <a href=#insertion-mode id=parsing-main-incdata:insertion-mode>insertion mode</a>, the user agent must handle the token as 5070 follows:</p> 5071 5072 <dl class=switch><dt>A character token<dd> 5073 5074 <p><a href=#insert-a-character id=parsing-main-incdata:insert-a-character>Insert the token's character</a>.</p> 5075 5076 <p class=note>This can never be a U+0000 NULL character; the tokenizer converts those to 5077 U+FFFD REPLACEMENT CHARACTER characters.</p> 5078 5079 <dt>An end-of-file token<dd> 5080 5081 5082 <p><a href=#parse-error id=parsing-main-incdata:parse-error>Parse error</a>.</p> 5083 5084 <p>If the <a href=#current-node id=parsing-main-incdata:current-node>current node</a> is a <code id=parsing-main-incdata:the-script-element><a href=scripting.html#the-script-element>script</a></code> element, mark the 5085 <code id=parsing-main-incdata:the-script-element-2><a href=scripting.html#the-script-element>script</a></code> element as <a id=parsing-main-incdata:already-started href=scripting.html#already-started>"already started"</a>.</p> 5086 5087 <p>Pop the <a href=#current-node id=parsing-main-incdata:current-node-2>current node</a> off the <a href=#stack-of-open-elements id=parsing-main-incdata:stack-of-open-elements>stack of open elements</a>.</p> 5088 5089 <p>Switch the <a href=#insertion-mode id=parsing-main-incdata:insertion-mode-2>insertion mode</a> to the <a href=#original-insertion-mode id=parsing-main-incdata:original-insertion-mode>original insertion mode</a> and 5090 reprocess the token.</p> 5091 5092 <dt id=scriptEndTag>An end tag whose tag name is "script"<dd> 5093 5094 <p>If the <a id=parsing-main-incdata:stack-of-script-settings-objects href=webappapis.html#stack-of-script-settings-objects>stack of script settings objects</a> is empty, <a id=parsing-main-incdata:perform-a-microtask-checkpoint href=webappapis.html#perform-a-microtask-checkpoint>perform a microtask checkpoint</a>.</p> 5095 5096 <p>Let <var>script</var> be the <a href=#current-node id=parsing-main-incdata:current-node-3>current node</a> (which will be a 5097 <code id=parsing-main-incdata:the-script-element-3><a href=scripting.html#the-script-element>script</a></code> element).</p> 5098 5099 <p>Pop the <a href=#current-node id=parsing-main-incdata:current-node-4>current node</a> off the <a href=#stack-of-open-elements id=parsing-main-incdata:stack-of-open-elements-2>stack of open elements</a>.</p> 5100 5101 <p>Switch the <a href=#insertion-mode id=parsing-main-incdata:insertion-mode-3>insertion mode</a> to the <a href=#original-insertion-mode id=parsing-main-incdata:original-insertion-mode-2>original insertion mode</a>.</p> 5102 5103 <p>Let the <var>old insertion point</var> have the same value as the current 5104 <a href=#insertion-point id=parsing-main-incdata:insertion-point>insertion point</a>. Let the <a href=#insertion-point id=parsing-main-incdata:insertion-point-2>insertion point</a> be just before the <a href=#next-input-character id=parsing-main-incdata:next-input-character>next 5105 input character</a>.</p> 5106 5107 <p>Increment the parser's <a href=#script-nesting-level id=parsing-main-incdata:script-nesting-level>script nesting level</a> by one.</p> 5108 5109 <p><a href=scripting.html#prepare-a-script id=parsing-main-incdata:prepare-a-script>Prepare</a> the <var>script</var>. This might 5110 cause some script to execute, which might cause <a href=webappapis.html#dom-document-write id=parsing-main-incdata:dom-document-write>new characters 5111 to be inserted into the tokenizer</a>, and might cause the tokenizer to output more tokens, 5112 resulting in a <a href=#nestedParsing>reentrant invocation of the parser</a>.</p> 5113 5114 <p>Decrement the parser's <a href=#script-nesting-level id=parsing-main-incdata:script-nesting-level-2>script nesting level</a> by one. If the parser's <a href=#script-nesting-level id=parsing-main-incdata:script-nesting-level-3>script 5115 nesting level</a> is zero, then set the <a href=#parser-pause-flag id=parsing-main-incdata:parser-pause-flag>parser pause flag</a> to false.</p> 5116 5117 <p>Let the <a href=#insertion-point id=parsing-main-incdata:insertion-point-3>insertion point</a> have the value of the <var>old insertion 5118 point</var>. (In other words, restore the <a href=#insertion-point id=parsing-main-incdata:insertion-point-4>insertion point</a> to its previous value. 5119 This value might be the "undefined" value.)</p> 5120 5121 <p id=scriptTagParserResumes>At this stage, if there is a <a id=parsing-main-incdata:pending-parsing-blocking-script href=scripting.html#pending-parsing-blocking-script>pending parsing-blocking 5122 script</a>, then:</p> 5123 5124 <dl class=switch><dt>If the <a href=#script-nesting-level id=parsing-main-incdata:script-nesting-level-4>script nesting level</a> is not zero:<dd> 5125 5126 <p>Set the <a href=#parser-pause-flag id=parsing-main-incdata:parser-pause-flag-2>parser pause flag</a> to true, and abort the processing of any nested 5127 invocations of the tokenizer, yielding control back to the caller. (Tokenization will resume 5128 when the caller returns to the "outer" tree construction stage.)</p> 5129 5130 <p class=note>The tree construction stage of this particular parser is <a href=#nestedParsing>being called reentrantly</a>, say from a call to <code id=parsing-main-incdata:dom-document-write-2><a href=webappapis.html#dom-document-write>document.write()</a></code>.</p> 5131 5132 <dt>Otherwise:<dd> 5133 5134 <p>Run these steps:</p> 5135 5136 <ol><li><p>Let <var>the script</var> be the <a id=parsing-main-incdata:pending-parsing-blocking-script-2 href=scripting.html#pending-parsing-blocking-script>pending parsing-blocking 5137 script</a>. There is no longer a <a id=parsing-main-incdata:pending-parsing-blocking-script-3 href=scripting.html#pending-parsing-blocking-script>pending parsing-blocking script</a>.<li><p>Block the <a href=#tokenization id=parsing-main-incdata:tokenization>tokenizer</a> for this instance of the 5138 <a href=#html-parser id=parsing-main-incdata:html-parser>HTML parser</a>, such that the <a id=parsing-main-incdata:event-loop href=webappapis.html#event-loop>event loop</a> will not run <a href=webappapis.html#concept-task id=parsing-main-incdata:concept-task>tasks</a> that invoke the <a href=#tokenization id=parsing-main-incdata:tokenization-2>tokenizer</a>.<li><p>If the parser's <code id=parsing-main-incdata:document><a href=dom.html#document>Document</a></code> <a id=parsing-main-incdata:has-a-style-sheet-that-is-blocking-scripts href=semantics.html#has-a-style-sheet-that-is-blocking-scripts>has a style sheet that is blocking 5139 scripts</a> or <var>the script</var>'s <a id=parsing-main-incdata:ready-to-be-parser-executed href=scripting.html#ready-to-be-parser-executed>"ready to be parser-executed"</a> 5140 flag is not set: <a id=parsing-main-incdata:spin-the-event-loop href=webappapis.html#spin-the-event-loop>spin the event loop</a> until the parser's <code id=parsing-main-incdata:document-2><a href=dom.html#document>Document</a></code> 5141 <a id=parsing-main-incdata:has-no-style-sheet-that-is-blocking-scripts href=semantics.html#has-no-style-sheet-that-is-blocking-scripts>has no style sheet that is blocking scripts</a> and <var>the script</var>'s 5142 <a id=parsing-main-incdata:ready-to-be-parser-executed-2 href=scripting.html#ready-to-be-parser-executed>"ready to be parser-executed"</a> flag is set.<li> 5143 5144 <p>If this <a href=#abort-a-parser id=parsing-main-incdata:abort-a-parser>parser has been aborted</a> in the meantime, 5145 abort these steps.</p> 5146 5147 <p class=note>This could happen if, e.g., while the <a id=parsing-main-incdata:spin-the-event-loop-2 href=webappapis.html#spin-the-event-loop>spin the event loop</a> 5148 algorithm is running, the <a id=parsing-main-incdata:browsing-context href=browsers.html#browsing-context>browsing context</a> gets closed, or the <code id=parsing-main-incdata:dom-document-open><a href=webappapis.html#dom-document-open>document.open()</a></code> method gets invoked on the 5149 <code id=parsing-main-incdata:document-3><a href=dom.html#document>Document</a></code>.</p> 5150 5151 <li><p>Unblock the <a href=#tokenization id=parsing-main-incdata:tokenization-3>tokenizer</a> for this instance of the 5152 <a href=#html-parser id=parsing-main-incdata:html-parser-2>HTML parser</a>, such that <a href=webappapis.html#concept-task id=parsing-main-incdata:concept-task-2>tasks</a> that invoke the 5153 <a href=#tokenization id=parsing-main-incdata:tokenization-4>tokenizer</a> can again be run.<li><p>Let the <a href=#insertion-point id=parsing-main-incdata:insertion-point-5>insertion point</a> be just before the <a href=#next-input-character id=parsing-main-incdata:next-input-character-2>next input 5154 character</a>.<li><p>Increment the parser's <a href=#script-nesting-level id=parsing-main-incdata:script-nesting-level-5>script nesting level</a> by one (it should be zero 5155 before this step, so this sets it to one).<li><p><a href=scripting.html#execute-the-script-block id=parsing-main-incdata:execute-the-script-block>Execute</a> <var>the 5156 script</var>.<li><p>Decrement the parser's <a href=#script-nesting-level id=parsing-main-incdata:script-nesting-level-6>script nesting level</a> by one. If the parser's 5157 <a href=#script-nesting-level id=parsing-main-incdata:script-nesting-level-7>script nesting level</a> is zero (which it always should be at this point), then set 5158 the <a href=#parser-pause-flag id=parsing-main-incdata:parser-pause-flag-3>parser pause flag</a> to false.</p> 5159 5160 <li><p>Let the <a href=#insertion-point id=parsing-main-incdata:insertion-point-6>insertion point</a> be undefined again.<li><p>If there is once again a <a id=parsing-main-incdata:pending-parsing-blocking-script-4 href=scripting.html#pending-parsing-blocking-script>pending parsing-blocking script</a>, then repeat 5161 these steps from step 1.</ol> 5162 5163 </dl> 5164 5165 <dt>Any other end tag<dd> 5166 5167 <p>Pop the <a href=#current-node id=parsing-main-incdata:current-node-5>current node</a> off the <a href=#stack-of-open-elements id=parsing-main-incdata:stack-of-open-elements-3>stack of open elements</a>.</p> 5168 5169 <p>Switch the <a href=#insertion-mode id=parsing-main-incdata:insertion-mode-4>insertion mode</a> to the <a href=#original-insertion-mode id=parsing-main-incdata:original-insertion-mode-3>original insertion mode</a>.</p> 5170 5171 </dl> 5172 5173 5174 <h6 id=parsing-main-intable>12.2.5.4.9 The "<dfn>in table</dfn>" insertion mode</h6> 5175 5176 <p>When the user agent is to apply the rules for the "<a href=#parsing-main-intable id=parsing-main-intable:parsing-main-intable>in 5177 table</a>" <a href=#insertion-mode id=parsing-main-intable:insertion-mode>insertion mode</a>, the user agent must handle the token as follows:</p> 5178 5179 <dl class=switch><dt>A character token, if the <a href=#current-node id=parsing-main-intable:current-node>current node</a> is <code id=parsing-main-intable:the-table-element><a href=tables.html#the-table-element>table</a></code>, <code id=parsing-main-intable:the-tbody-element><a href=tables.html#the-tbody-element>tbody</a></code>, <code id=parsing-main-intable:the-tfoot-element><a href=tables.html#the-tfoot-element>tfoot</a></code>, <code id=parsing-main-intable:the-thead-element><a href=tables.html#the-thead-element>thead</a></code>, or <code id=parsing-main-intable:the-tr-element><a href=tables.html#the-tr-element>tr</a></code> element<dd> 5180 5181 <p>Let the <dfn id=concept-pending-table-char-tokens><var>pending table character 5182 tokens</var></dfn> be an empty list of tokens.</p> 5183 5184 <p>Let the <a href=#original-insertion-mode id=parsing-main-intable:original-insertion-mode>original insertion mode</a> be the current <a href=#insertion-mode id=parsing-main-intable:insertion-mode-2>insertion mode</a>.</p> 5185 5186 <p>Switch the <a href=#insertion-mode id=parsing-main-intable:insertion-mode-3>insertion mode</a> to "<a href=#parsing-main-intabletext id=parsing-main-intable:parsing-main-intabletext>in 5187 table text</a>" and reprocess the token.</p> 5188 5189 <dt>A comment token<dd> 5190 <p><a href=#insert-a-comment id=parsing-main-intable:insert-a-comment>Insert a comment</a>.</p> 5191 <dt>A DOCTYPE token<dd> 5192 <p><a href=#parse-error id=parsing-main-intable:parse-error>Parse error</a>. Ignore the token.</p> 5193 <dt>A start tag whose tag name is "caption"<dd> 5194 5195 <p><a href=#clear-the-stack-back-to-a-table-context id=parsing-main-intable:clear-the-stack-back-to-a-table-context>Clear the stack back to a table context</a>. (See below.)</p> 5196 5197 <p>Insert a <a href=#concept-parser-marker id=parsing-main-intable:concept-parser-marker>marker</a> at the end of the <a href=#list-of-active-formatting-elements id=parsing-main-intable:list-of-active-formatting-elements>list of 5198 active formatting elements</a>.</p> 5199 5200 <p><a href=#insert-an-html-element id=parsing-main-intable:insert-an-html-element>Insert an HTML element</a> for the token, then switch the <a href=#insertion-mode id=parsing-main-intable:insertion-mode-4>insertion 5201 mode</a> to "<a href=#parsing-main-incaption id=parsing-main-intable:parsing-main-incaption>in caption</a>".</p> 5202 5203 <dt>A start tag whose tag name is "colgroup"<dd> 5204 5205 <p><a href=#clear-the-stack-back-to-a-table-context id=parsing-main-intable:clear-the-stack-back-to-a-table-context-2>Clear the stack back to a table context</a>. (See below.)</p> 5206 5207 <p><a href=#insert-an-html-element id=parsing-main-intable:insert-an-html-element-2>Insert an HTML element</a> for the token, then switch the <a href=#insertion-mode id=parsing-main-intable:insertion-mode-5>insertion 5208 mode</a> to "<a href=#parsing-main-incolgroup id=parsing-main-intable:parsing-main-incolgroup>in column group</a>".</p> 5209 5210 <dt>A start tag whose tag name is "col"<dd> 5211 5212 5213 <p><a href=#clear-the-stack-back-to-a-table-context id=parsing-main-intable:clear-the-stack-back-to-a-table-context-3>Clear the stack back to a table context</a>. (See below.)</p> 5214 5215 <p><a href=#insert-an-html-element id=parsing-main-intable:insert-an-html-element-3>Insert an HTML element</a> for a "colgroup" start tag token with no attributes, then 5216 switch the <a href=#insertion-mode id=parsing-main-intable:insertion-mode-6>insertion mode</a> to "<a href=#parsing-main-incolgroup id=parsing-main-intable:parsing-main-incolgroup-2>in 5217 column group</a>".</p> 5218 5219 5220 <p>Reprocess the current token.</p> 5221 5222 <dt>A start tag whose tag name is one of: "tbody", "tfoot", "thead"<dd> 5223 5224 <p><a href=#clear-the-stack-back-to-a-table-context id=parsing-main-intable:clear-the-stack-back-to-a-table-context-4>Clear the stack back to a table context</a>. (See below.)</p> 5225 5226 <p><a href=#insert-an-html-element id=parsing-main-intable:insert-an-html-element-4>Insert an HTML element</a> for the token, then switch the <a href=#insertion-mode id=parsing-main-intable:insertion-mode-7>insertion 5227 mode</a> to "<a href=#parsing-main-intbody id=parsing-main-intable:parsing-main-intbody>in table body</a>".</p> 5228 5229 <dt>A start tag whose tag name is one of: "td", "th", "tr"<dd> 5230 5231 5232 <p><a href=#clear-the-stack-back-to-a-table-context id=parsing-main-intable:clear-the-stack-back-to-a-table-context-5>Clear the stack back to a table context</a>. (See below.)</p> 5233 5234 <p><a href=#insert-an-html-element id=parsing-main-intable:insert-an-html-element-5>Insert an HTML element</a> for a "tbody" start tag token with no attributes, then 5235 switch the <a href=#insertion-mode id=parsing-main-intable:insertion-mode-8>insertion mode</a> to "<a href=#parsing-main-intbody id=parsing-main-intable:parsing-main-intbody-2>in table 5236 body</a>".</p> 5237 5238 5239 <p>Reprocess the current token.</p> 5240 5241 <dt>A start tag whose tag name is "table"<dd> 5242 5243 <p><a href=#parse-error id=parsing-main-intable:parse-error-2>Parse error</a>.</p> 5244 5245 5246 <p>If the <a href=#stack-of-open-elements id=parsing-main-intable:stack-of-open-elements>stack of open elements</a> does not <a href=#has-an-element-in-table-scope id=parsing-main-intable:has-an-element-in-table-scope>have a <code>table</code> element in table scope</a>, ignore the token.</p> 5247 5248 <p>Otherwise:</p> 5249 5250 <p>Pop elements from this stack until a <code id=parsing-main-intable:the-table-element-2><a href=tables.html#the-table-element>table</a></code> element has been popped from the 5251 stack.</p> 5252 5253 <p><a href=#reset-the-insertion-mode-appropriately id=parsing-main-intable:reset-the-insertion-mode-appropriately>Reset the insertion mode appropriately</a>.</p> 5254 5255 5256 <p>Reprocess the token.</p> 5257 5258 <dt>An end tag whose tag name is "table"<dd> 5259 5260 <p>If the <a href=#stack-of-open-elements id=parsing-main-intable:stack-of-open-elements-2>stack of open elements</a> does not <a href=#has-an-element-in-table-scope id=parsing-main-intable:has-an-element-in-table-scope-2>have a <code>table</code> element in table scope</a>, this is a <a href=#parse-error id=parsing-main-intable:parse-error-3>parse 5261 error</a>; ignore the token.</p> 5262 5263 <p>Otherwise:</p> 5264 5265 <p>Pop elements from this stack until a <code id=parsing-main-intable:the-table-element-3><a href=tables.html#the-table-element>table</a></code> element has been popped from the 5266 stack.</p> 5267 5268 <p><a href=#reset-the-insertion-mode-appropriately id=parsing-main-intable:reset-the-insertion-mode-appropriately-2>Reset the insertion mode appropriately</a>.</p> 5269 5270 <dt>An end tag whose tag name is one of: "body", "caption", "col", "colgroup", "html", "tbody", 5271 "td", "tfoot", "th", "thead", "tr"<dd> 5272 <p><a href=#parse-error id=parsing-main-intable:parse-error-4>Parse error</a>. Ignore the token.</p> 5273 <dt>A start tag whose tag name is one of: "style", "script", "template"<dt>An end tag whose tag name is "template"<dd> 5274 5275 <p>Process the token <a href=#using-the-rules-for id=parsing-main-intable:using-the-rules-for>using the rules for</a> the "<a href=#parsing-main-inhead id=parsing-main-intable:parsing-main-inhead>in head</a>" <a href=#insertion-mode id=parsing-main-intable:insertion-mode-9>insertion 5276 mode</a>.</p> 5277 5278 <dt>A start tag whose tag name is "input"<dd> 5279 5280 <p>If the token does not have an attribute with the name "type", or if it does, but that 5281 attribute's value is not an <a id=parsing-main-intable:ascii-case-insensitive href=infrastructure.html#ascii-case-insensitive>ASCII case-insensitive</a> match for the string "<code>hidden</code>", then: act as described in the "anything else" entry below.</p> 5282 5283 <p>Otherwise:</p> 5284 5285 <p><a href=#parse-error id=parsing-main-intable:parse-error-5>Parse error</a>.</p> 5286 5287 <p><a href=#insert-an-html-element id=parsing-main-intable:insert-an-html-element-6>Insert an HTML element</a> for the token.</p> 5288 5289 <p>Pop that <code id=parsing-main-intable:the-input-element><a href=forms.html#the-input-element>input</a></code> element off the <a href=#stack-of-open-elements id=parsing-main-intable:stack-of-open-elements-3>stack of open elements</a>.</p> 5290 5291 <p><a href=#acknowledge-self-closing-flag id=parsing-main-intable:acknowledge-self-closing-flag>Acknowledge the token's <i>self-closing 5292 flag</i></a>, if it is set.</p> 5293 5294 <dt>A start tag whose tag name is "form"<dd> 5295 5296 <p><a href=#parse-error id=parsing-main-intable:parse-error-6>Parse error</a>.</p> 5297 5298 <p>If there is a <code id=parsing-main-intable:the-template-element><a href=scripting.html#the-template-element>template</a></code> element on the <a href=#stack-of-open-elements id=parsing-main-intable:stack-of-open-elements-4>stack of open elements</a>, or if 5299 the <a href=#form-element-pointer id=parsing-main-intable:form-element-pointer><code>form</code> element pointer</a> is not null, ignore the 5300 token.</p> 5301 5302 <p>Otherwise:</p> 5303 5304 <p><a href=#insert-an-html-element id=parsing-main-intable:insert-an-html-element-7>Insert an HTML element</a> for the token, and set the <a href=#form-element-pointer id=parsing-main-intable:form-element-pointer-2><code>form</code> element pointer</a> to point to the element created.</p> 5305 5306 <p>Pop that <code id=parsing-main-intable:the-form-element><a href=forms.html#the-form-element>form</a></code> element off the <a href=#stack-of-open-elements id=parsing-main-intable:stack-of-open-elements-5>stack of open elements</a>.</p> 5307 5308 <dt>An end-of-file token<dd> 5309 5310 <p>Process the token <a href=#using-the-rules-for id=parsing-main-intable:using-the-rules-for-2>using the rules for</a> the "<a href=#parsing-main-inbody id=parsing-main-intable:parsing-main-inbody>in body</a>" <a href=#insertion-mode id=parsing-main-intable:insertion-mode-10>insertion mode</a>.</p> 5311 5312 <dt>Anything else<dd> 5313 5314 <p><a href=#parse-error id=parsing-main-intable:parse-error-7>Parse error</a>. Enable <a href=#foster-parent id=parsing-main-intable:foster-parent>foster parenting</a>, process 5315 the token <a href=#using-the-rules-for id=parsing-main-intable:using-the-rules-for-3>using the rules for</a> the "<a href=#parsing-main-inbody id=parsing-main-intable:parsing-main-inbody-2>in 5316 body</a>" <a href=#insertion-mode id=parsing-main-intable:insertion-mode-11>insertion mode</a>, and then disable <a href=#foster-parent id=parsing-main-intable:foster-parent-2>foster 5317 parenting</a>.</p> 5318 5319 </dl> 5320 5321 <p>When the steps above require the UA to <dfn id=clear-the-stack-back-to-a-table-context>clear the stack back to a table context</dfn>, it 5322 means that the UA must, while the <a href=#current-node id=parsing-main-intable:current-node-2>current node</a> is not a <code id=parsing-main-intable:the-table-element-4><a href=tables.html#the-table-element>table</a></code>, 5323 <code id=parsing-main-intable:the-template-element-2><a href=scripting.html#the-template-element>template</a></code>, or <code id=parsing-main-intable:the-html-element><a href=semantics.html#the-html-element>html</a></code> element, pop elements from the <a href=#stack-of-open-elements id=parsing-main-intable:stack-of-open-elements-6>stack of open 5324 elements</a>.</p> 5325 5326 <p class=note>This is the same list of elements as used in the <i id=parsing-main-intable:has-an-element-in-table-scope-3><a href=#has-an-element-in-table-scope>has an element in table scope</a></i> steps.</p> 5327 5328 <p class=note>The <a href=#current-node id=parsing-main-intable:current-node-3>current node</a> being an <code id=parsing-main-intable:the-html-element-2><a href=semantics.html#the-html-element>html</a></code> element after this 5329 process is a <a href=#fragment-case id=parsing-main-intable:fragment-case>fragment case</a>.</p> 5330 5331 5332 5333 <h6 id=parsing-main-intabletext>12.2.5.4.10 The "<dfn>in table text</dfn>" insertion mode</h6> 5334 5335 <p>When the user agent is to apply the rules for the "<a href=#parsing-main-intabletext id=parsing-main-intabletext:parsing-main-intabletext>in table text</a>" <a href=#insertion-mode id=parsing-main-intabletext:insertion-mode>insertion mode</a>, the user agent must handle the token as 5336 follows:</p> 5337 5338 <dl class=switch><dt>A character token that is U+0000 NULL<dd> 5339 5340 <p><a href=#parse-error id=parsing-main-intabletext:parse-error>Parse error</a>. Ignore the token.</p> 5341 5342 <dt>Any other character token<dd> 5343 5344 <p>Append the character token to the <var id=parsing-main-intabletext:concept-pending-table-char-tokens><a href=#concept-pending-table-char-tokens>pending 5345 table character tokens</a></var> list.</p> 5346 5347 <dt>Anything else<dd> 5348 5349 5350 5351 <p>If any of the tokens in the <var id=parsing-main-intabletext:concept-pending-table-char-tokens-2><a href=#concept-pending-table-char-tokens>pending table 5352 character tokens</a></var> list are character tokens that are not <a href=infrastructure.html#space-character id=parsing-main-intabletext:space-character>space characters</a>, then this is a <a href=#parse-error id=parsing-main-intabletext:parse-error-2>parse error</a>: reprocess the 5353 character tokens in the <var id=parsing-main-intabletext:concept-pending-table-char-tokens-3><a href=#concept-pending-table-char-tokens>pending table character 5354 tokens</a></var> list using the rules given in the "anything else" entry in the "<a href=#parsing-main-intable id=parsing-main-intabletext:parsing-main-intable>in table</a>" insertion mode.</p> 5355 5356 5357 5358 <p>Otherwise, <a href=#insert-a-character id=parsing-main-intabletext:insert-a-character>insert the characters</a> given by the <var id=parsing-main-intabletext:concept-pending-table-char-tokens-4><a href=#concept-pending-table-char-tokens>pending table character tokens</a></var> list.</p> 5359 5360 5361 5362 <p>Switch the <a href=#insertion-mode id=parsing-main-intabletext:insertion-mode-2>insertion mode</a> to the <a href=#original-insertion-mode id=parsing-main-intabletext:original-insertion-mode>original insertion mode</a> and 5363 reprocess the token.</p> 5364 5365 </dl> 5366 5367 5368 <h6 id=parsing-main-incaption>12.2.5.4.11 The "<dfn>in caption</dfn>" insertion mode</h6> 5369 5370 <p>When the user agent is to apply the rules for the "<a href=#parsing-main-incaption id=parsing-main-incaption:parsing-main-incaption>in 5371 caption</a>" <a href=#insertion-mode id=parsing-main-incaption:insertion-mode>insertion mode</a>, the user agent must handle the token as follows:</p> 5372 5373 <dl class=switch><dt>An end tag whose tag name is "caption"<dd> 5374 5375 <p>If the <a href=#stack-of-open-elements id=parsing-main-incaption:stack-of-open-elements>stack of open elements</a> does not <a href=#has-an-element-in-table-scope id=parsing-main-incaption:has-an-element-in-table-scope>have a <code>caption</code> element in table scope</a>, this is a <a href=#parse-error id=parsing-main-incaption:parse-error>parse 5376 error</a>; ignore the token. (<a href=#fragment-case id=parsing-main-incaption:fragment-case>fragment case</a>)</p> 5377 5378 <p>Otherwise:</p> 5379 5380 <p><a href=#generate-implied-end-tags id=parsing-main-incaption:generate-implied-end-tags>Generate implied end tags</a>.</p> 5381 5382 <p>Now, if the <a href=#current-node id=parsing-main-incaption:current-node>current node</a> is not a <code id=parsing-main-incaption:the-caption-element><a href=tables.html#the-caption-element>caption</a></code> element, then this is a 5383 <a href=#parse-error id=parsing-main-incaption:parse-error-2>parse error</a>.</p> 5384 5385 <p>Pop elements from this stack until a <code id=parsing-main-incaption:the-caption-element-2><a href=tables.html#the-caption-element>caption</a></code> element has been popped from the 5386 stack.</p> 5387 5388 <p><a href=#clear-the-list-of-active-formatting-elements-up-to-the-last-marker id=parsing-main-incaption:clear-the-list-of-active-formatting-elements-up-to-the-last-marker>Clear the list of active formatting elements up to the last marker</a>.</p> 5389 5390 <p>Switch the <a href=#insertion-mode id=parsing-main-incaption:insertion-mode-2>insertion mode</a> to "<a href=#parsing-main-intable id=parsing-main-incaption:parsing-main-intable>in 5391 table</a>".</p> 5392 5393 <dt>A start tag whose tag name is one of: "caption", "col", "colgroup", "tbody", "td", "tfoot", 5394 "th", "thead", "tr"<dt>An end tag whose tag name is "table"<dd> 5395 5396 <p>If the <a href=#stack-of-open-elements id=parsing-main-incaption:stack-of-open-elements-2>stack of open elements</a> does not <a href=#has-an-element-in-table-scope id=parsing-main-incaption:has-an-element-in-table-scope-2>have a <code>caption</code> element in table scope</a>, this is a <a href=#parse-error id=parsing-main-incaption:parse-error-3>parse 5397 error</a>; ignore the token. (<a href=#fragment-case id=parsing-main-incaption:fragment-case-2>fragment case</a>)</p> 5398 5399 <p>Otherwise:</p> 5400 5401 5402 <p><a href=#generate-implied-end-tags id=parsing-main-incaption:generate-implied-end-tags-2>Generate implied end tags</a>.</p> 5403 5404 <p>Now, if the <a href=#current-node id=parsing-main-incaption:current-node-2>current node</a> is not a <code id=parsing-main-incaption:the-caption-element-3><a href=tables.html#the-caption-element>caption</a></code> element, then this is a 5405 <a href=#parse-error id=parsing-main-incaption:parse-error-4>parse error</a>.</p> 5406 5407 <p>Pop elements from this stack until a <code id=parsing-main-incaption:the-caption-element-4><a href=tables.html#the-caption-element>caption</a></code> element has been popped from the 5408 stack.</p> 5409 5410 <p><a href=#clear-the-list-of-active-formatting-elements-up-to-the-last-marker id=parsing-main-incaption:clear-the-list-of-active-formatting-elements-up-to-the-last-marker-2>Clear the list of active formatting elements up to the last marker</a>.</p> 5411 5412 <p>Switch the <a href=#insertion-mode id=parsing-main-incaption:insertion-mode-3>insertion mode</a> to "<a href=#parsing-main-intable id=parsing-main-incaption:parsing-main-intable-2>in 5413 table</a>".</p> 5414 5415 5416 <p>Reprocess the token.</p> 5417 5418 <dt>An end tag whose tag name is one of: "body", "col", "colgroup", "html", "tbody", "td", 5419 "tfoot", "th", "thead", "tr"<dd> 5420 <p><a href=#parse-error id=parsing-main-incaption:parse-error-5>Parse error</a>. Ignore the token.</p> 5421 <dt>Anything else<dd> 5422 5423 <p>Process the token <a href=#using-the-rules-for id=parsing-main-incaption:using-the-rules-for>using the rules for</a> the "<a href=#parsing-main-inbody id=parsing-main-incaption:parsing-main-inbody>in body</a>" <a href=#insertion-mode id=parsing-main-incaption:insertion-mode-4>insertion mode</a>.</p> 5424 5425 </dl> 5426 5427 5428 <h6 id=parsing-main-incolgroup>12.2.5.4.12 The "<dfn>in column group</dfn>" insertion mode</h6> 5429 5430 <p>When the user agent is to apply the rules for the "<a href=#parsing-main-incolgroup id=parsing-main-incolgroup:parsing-main-incolgroup>in column group</a>" <a href=#insertion-mode id=parsing-main-incolgroup:insertion-mode>insertion mode</a>, the user agent must handle the token 5431 as follows:</p> 5432 5433 <dl class=switch><dt>A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C 5434 FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dd> 5435 <p><a href=#insert-a-character id=parsing-main-incolgroup:insert-a-character>Insert the character</a>.</p> 5436 <dt>A comment token<dd> 5437 <p><a href=#insert-a-comment id=parsing-main-incolgroup:insert-a-comment>Insert a comment</a>.</p> 5438 <dt>A DOCTYPE token<dd> 5439 <p><a href=#parse-error id=parsing-main-incolgroup:parse-error>Parse error</a>. Ignore the token.</p> 5440 <dt>A start tag whose tag name is "html"<dd> 5441 5442 <p>Process the token <a href=#using-the-rules-for id=parsing-main-incolgroup:using-the-rules-for>using the rules for</a> the "<a href=#parsing-main-inbody id=parsing-main-incolgroup:parsing-main-inbody>in body</a>" <a href=#insertion-mode id=parsing-main-incolgroup:insertion-mode-2>insertion mode</a>.</p> 5443 5444 <dt>A start tag whose tag name is "col"<dd> 5445 5446 <p><a href=#insert-an-html-element id=parsing-main-incolgroup:insert-an-html-element>Insert an HTML element</a> for the token. Immediately pop the <a href=#current-node id=parsing-main-incolgroup:current-node>current 5447 node</a> off the <a href=#stack-of-open-elements id=parsing-main-incolgroup:stack-of-open-elements>stack of open elements</a>.</p> 5448 5449 <p><a href=#acknowledge-self-closing-flag id=parsing-main-incolgroup:acknowledge-self-closing-flag>Acknowledge the token's <i>self-closing 5450 flag</i></a>, if it is set.</p> 5451 5452 <dt>An end tag whose tag name is "colgroup"<dd> 5453 5454 <p>If the <a href=#current-node id=parsing-main-incolgroup:current-node-2>current node</a> is not a <code id=parsing-main-incolgroup:the-colgroup-element><a href=tables.html#the-colgroup-element>colgroup</a></code> element, then this is a 5455 <a href=#parse-error id=parsing-main-incolgroup:parse-error-2>parse error</a>; ignore the token.</p> 5456 5457 <p>Otherwise, pop the <a href=#current-node id=parsing-main-incolgroup:current-node-3>current node</a> from the <a href=#stack-of-open-elements id=parsing-main-incolgroup:stack-of-open-elements-2>stack of open elements</a>. 5458 Switch the <a href=#insertion-mode id=parsing-main-incolgroup:insertion-mode-3>insertion mode</a> to "<a href=#parsing-main-intable id=parsing-main-incolgroup:parsing-main-intable>in 5459 table</a>".</p> 5460 5461 <dt>An end tag whose tag name is "col"<dd> 5462 <p><a href=#parse-error id=parsing-main-incolgroup:parse-error-3>Parse error</a>. Ignore the token.</p> 5463 <dt>A start tag whose tag name is "template"<dt>An end tag whose tag name is "template"<dd> 5464 5465 <p>Process the token <a href=#using-the-rules-for id=parsing-main-incolgroup:using-the-rules-for-2>using the rules for</a> the "<a href=#parsing-main-inhead id=parsing-main-incolgroup:parsing-main-inhead>in head</a>" <a href=#insertion-mode id=parsing-main-incolgroup:insertion-mode-4>insertion mode</a>.</p> 5466 5467 <dt>An end-of-file token<dd> 5468 5469 <p>Process the token <a href=#using-the-rules-for id=parsing-main-incolgroup:using-the-rules-for-3>using the rules for</a> the "<a href=#parsing-main-inbody id=parsing-main-incolgroup:parsing-main-inbody-2>in body</a>" <a href=#insertion-mode id=parsing-main-incolgroup:insertion-mode-5>insertion mode</a>.</p> 5470 5471 <dt>Anything else<dd> 5472 5473 5474 <p>If the <a href=#current-node id=parsing-main-incolgroup:current-node-4>current node</a> is not a <code id=parsing-main-incolgroup:the-colgroup-element-2><a href=tables.html#the-colgroup-element>colgroup</a></code> element, then this is a 5475 <a href=#parse-error id=parsing-main-incolgroup:parse-error-4>parse error</a>; ignore the token.</p> 5476 5477 <p>Otherwise, pop the <a href=#current-node id=parsing-main-incolgroup:current-node-5>current node</a> from the <a href=#stack-of-open-elements id=parsing-main-incolgroup:stack-of-open-elements-3>stack of open 5478 elements</a>.</p> 5479 5480 <p>Switch the <a href=#insertion-mode id=parsing-main-incolgroup:insertion-mode-6>insertion mode</a> to "<a href=#parsing-main-intable id=parsing-main-incolgroup:parsing-main-intable-2>in 5481 table</a>".</p> 5482 5483 5484 <p>Reprocess the token.</p> 5485 5486 </dl> 5487 5488 5489 <h6 id=parsing-main-intbody>12.2.5.4.13 The "<dfn>in table body</dfn>" insertion mode</h6> 5490 5491 <p>When the user agent is to apply the rules for the "<a href=#parsing-main-intbody id=parsing-main-intbody:parsing-main-intbody>in table body</a>" <a href=#insertion-mode id=parsing-main-intbody:insertion-mode>insertion mode</a>, the user agent must handle the token as 5492 follows:</p> 5493 5494 <dl class=switch><dt>A start tag whose tag name is "tr"<dd> 5495 5496 <p><a href=#clear-the-stack-back-to-a-table-body-context id=parsing-main-intbody:clear-the-stack-back-to-a-table-body-context>Clear the stack back to a table body context</a>. (See below.)</p> 5497 5498 <p><a href=#insert-an-html-element id=parsing-main-intbody:insert-an-html-element>Insert an HTML element</a> for the token, then switch the <a href=#insertion-mode id=parsing-main-intbody:insertion-mode-2>insertion 5499 mode</a> to "<a href=#parsing-main-intr id=parsing-main-intbody:parsing-main-intr>in row</a>".</p> 5500 5501 <dt>A start tag whose tag name is one of: "th", "td"<dd> 5502 5503 <p><a href=#parse-error id=parsing-main-intbody:parse-error>Parse error</a>.</p> 5504 5505 5506 <p><a href=#clear-the-stack-back-to-a-table-body-context id=parsing-main-intbody:clear-the-stack-back-to-a-table-body-context-2>Clear the stack back to a table body context</a>. (See below.)</p> 5507 5508 <p><a href=#insert-an-html-element id=parsing-main-intbody:insert-an-html-element-2>Insert an HTML element</a> for a "tr" start tag token with no attributes, then 5509 switch the <a href=#insertion-mode id=parsing-main-intbody:insertion-mode-3>insertion mode</a> to "<a href=#parsing-main-intr id=parsing-main-intbody:parsing-main-intr-2>in 5510 row</a>".</p> 5511 5512 5513 <p>Reprocess the current token.</p> 5514 5515 <dt>An end tag whose tag name is one of: "tbody", "tfoot", 5516 "thead"<dd> 5517 5518 <p>If the <a href=#stack-of-open-elements id=parsing-main-intbody:stack-of-open-elements>stack of open elements</a> does not <a href=#has-an-element-in-table-scope id=parsing-main-intbody:has-an-element-in-table-scope>have an element in table scope</a> that is an <a href=infrastructure.html#html-elements id=parsing-main-intbody:html-elements>HTML 5519 element</a> with the same tag name as the token, this is a <a href=#parse-error id=parsing-main-intbody:parse-error-2>parse error</a>; 5520 ignore the token.</p> 5521 5522 <p>Otherwise:</p> 5523 5524 <p><a href=#clear-the-stack-back-to-a-table-body-context id=parsing-main-intbody:clear-the-stack-back-to-a-table-body-context-3>Clear the stack back to a table body context</a>. (See below.)</p> 5525 5526 <p>Pop the <a href=#current-node id=parsing-main-intbody:current-node>current node</a> from the <a href=#stack-of-open-elements id=parsing-main-intbody:stack-of-open-elements-2>stack of open elements</a>. Switch the 5527 <a href=#insertion-mode id=parsing-main-intbody:insertion-mode-4>insertion mode</a> to "<a href=#parsing-main-intable id=parsing-main-intbody:parsing-main-intable>in table</a>".</p> 5528 5529 <dt>A start tag whose tag name is one of: "caption", "col", 5530 "colgroup", "tbody", "tfoot", "thead"<dt>An end tag whose tag name is "table"<dd> 5531 5532 <p>If the <a href=#stack-of-open-elements id=parsing-main-intbody:stack-of-open-elements-3>stack of open elements</a> does not <a href=#has-an-element-in-table-scope id=parsing-main-intbody:has-an-element-in-table-scope-2>have a <code>tbody</code>, <code>thead</code>, or <code>tfoot</code> element in table 5533 scope</a>, this is a <a href=#parse-error id=parsing-main-intbody:parse-error-3>parse error</a>; ignore the token.</p> 5534 5535 <p>Otherwise:</p> 5536 5537 <p><a href=#clear-the-stack-back-to-a-table-body-context id=parsing-main-intbody:clear-the-stack-back-to-a-table-body-context-4>Clear the stack back to a table body context</a>. (See below.)</p> 5538 5539 5540 5541 <p>Pop the <a href=#current-node id=parsing-main-intbody:current-node-2>current node</a> from the <a href=#stack-of-open-elements id=parsing-main-intbody:stack-of-open-elements-4>stack of open elements</a>. Switch the 5542 <a href=#insertion-mode id=parsing-main-intbody:insertion-mode-5>insertion mode</a> to "<a href=#parsing-main-intable id=parsing-main-intbody:parsing-main-intable-2>in table</a>".</p> 5543 5544 5545 5546 <p>Reprocess the token.</p> 5547 5548 <dt>An end tag whose tag name is one of: "body", "caption", "col", "colgroup", "html", "td", 5549 "th", "tr"<dd> 5550 <p><a href=#parse-error id=parsing-main-intbody:parse-error-4>Parse error</a>. Ignore the token.</p> 5551 <dt>Anything else<dd> 5552 <p>Process the token <a href=#using-the-rules-for id=parsing-main-intbody:using-the-rules-for>using the rules for</a> the "<a href=#parsing-main-intable id=parsing-main-intbody:parsing-main-intable-3>in table</a>" <a href=#insertion-mode id=parsing-main-intbody:insertion-mode-6>insertion mode</a>.</p> 5553 </dl> 5554 5555 <p>When the steps above require the UA to <dfn id=clear-the-stack-back-to-a-table-body-context>clear the stack back to a table body context</dfn>, 5556 it means that the UA must, while the <a href=#current-node id=parsing-main-intbody:current-node-3>current node</a> is not a <code id=parsing-main-intbody:the-tbody-element><a href=tables.html#the-tbody-element>tbody</a></code>, 5557 <code id=parsing-main-intbody:the-tfoot-element><a href=tables.html#the-tfoot-element>tfoot</a></code>, <code id=parsing-main-intbody:the-thead-element><a href=tables.html#the-thead-element>thead</a></code>, <code id=parsing-main-intbody:the-template-element><a href=scripting.html#the-template-element>template</a></code>, or <code id=parsing-main-intbody:the-html-element><a href=semantics.html#the-html-element>html</a></code> element, pop 5558 elements from the <a href=#stack-of-open-elements id=parsing-main-intbody:stack-of-open-elements-5>stack of open elements</a>.</p> 5559 5560 <p class=note>The <a href=#current-node id=parsing-main-intbody:current-node-4>current node</a> being an <code id=parsing-main-intbody:the-html-element-2><a href=semantics.html#the-html-element>html</a></code> element after this 5561 process is a <a href=#fragment-case id=parsing-main-intbody:fragment-case>fragment case</a>.</p> 5562 5563 5564 <h6 id=parsing-main-intr>12.2.5.4.14 The "<dfn>in row</dfn>" insertion mode</h6> 5565 5566 <p>When the user agent is to apply the rules for the "<a href=#parsing-main-intr id=parsing-main-intr:parsing-main-intr>in 5567 row</a>" <a href=#insertion-mode id=parsing-main-intr:insertion-mode>insertion mode</a>, the user agent must handle the token as follows:</p> 5568 5569 <dl class=switch><dt>A start tag whose tag name is one of: "th", "td"<dd> 5570 5571 <p><a href=#clear-the-stack-back-to-a-table-row-context id=parsing-main-intr:clear-the-stack-back-to-a-table-row-context>Clear the stack back to a table row context</a>. (See below.)</p> 5572 5573 <p><a href=#insert-an-html-element id=parsing-main-intr:insert-an-html-element>Insert an HTML element</a> for the token, then switch the <a href=#insertion-mode id=parsing-main-intr:insertion-mode-2>insertion 5574 mode</a> to "<a href=#parsing-main-intd id=parsing-main-intr:parsing-main-intd>in cell</a>".</p> 5575 5576 <p>Insert a <a href=#concept-parser-marker id=parsing-main-intr:concept-parser-marker>marker</a> at the end of the <a href=#list-of-active-formatting-elements id=parsing-main-intr:list-of-active-formatting-elements>list of 5577 active formatting elements</a>.</p> 5578 5579 <dt>An end tag whose tag name is "tr"<dd> 5580 5581 <p>If the <a href=#stack-of-open-elements id=parsing-main-intr:stack-of-open-elements>stack of open elements</a> does not <a href=#has-an-element-in-table-scope id=parsing-main-intr:has-an-element-in-table-scope>have a <code>tr</code> element in table scope</a>, this is a <a href=#parse-error id=parsing-main-intr:parse-error>parse error</a>; 5582 ignore the token.</p> 5583 5584 <p>Otherwise:</p> 5585 5586 <p><a href=#clear-the-stack-back-to-a-table-row-context id=parsing-main-intr:clear-the-stack-back-to-a-table-row-context-2>Clear the stack back to a table row context</a>. (See below.)</p> 5587 5588 <p>Pop the <a href=#current-node id=parsing-main-intr:current-node>current node</a> (which will be a <code id=parsing-main-intr:the-tr-element><a href=tables.html#the-tr-element>tr</a></code> element) from the 5589 <a href=#stack-of-open-elements id=parsing-main-intr:stack-of-open-elements-2>stack of open elements</a>. Switch the <a href=#insertion-mode id=parsing-main-intr:insertion-mode-3>insertion mode</a> to "<a href=#parsing-main-intbody id=parsing-main-intr:parsing-main-intbody>in table body</a>".</p> 5590 5591 <dt>A start tag whose tag name is one of: "caption", "col", "colgroup", "tbody", "tfoot", 5592 "thead", "tr"<dt>An end tag whose tag name is "table"<dd> 5593 5594 5595 <p>If the <a href=#stack-of-open-elements id=parsing-main-intr:stack-of-open-elements-3>stack of open elements</a> does not <a href=#has-an-element-in-table-scope id=parsing-main-intr:has-an-element-in-table-scope-2>have a <code>tr</code> element in table scope</a>, this is a <a href=#parse-error id=parsing-main-intr:parse-error-2>parse error</a>; 5596 ignore the token.</p> 5597 5598 <p>Otherwise:</p> 5599 5600 <p><a href=#clear-the-stack-back-to-a-table-row-context id=parsing-main-intr:clear-the-stack-back-to-a-table-row-context-3>Clear the stack back to a table row context</a>. (See below.)</p> 5601 5602 <p>Pop the <a href=#current-node id=parsing-main-intr:current-node-2>current node</a> (which will be a <code id=parsing-main-intr:the-tr-element-2><a href=tables.html#the-tr-element>tr</a></code> element) from the 5603 <a href=#stack-of-open-elements id=parsing-main-intr:stack-of-open-elements-4>stack of open elements</a>. Switch the <a href=#insertion-mode id=parsing-main-intr:insertion-mode-4>insertion mode</a> to "<a href=#parsing-main-intbody id=parsing-main-intr:parsing-main-intbody-2>in table body</a>".</p> 5604 5605 5606 <p>Reprocess the token.</p> 5607 5608 <dt>An end tag whose tag name is one of: "tbody", "tfoot", "thead"<dd> 5609 5610 <p>If the <a href=#stack-of-open-elements id=parsing-main-intr:stack-of-open-elements-5>stack of open elements</a> does not <a href=#has-an-element-in-table-scope id=parsing-main-intr:has-an-element-in-table-scope-3>have an element in table scope</a> that is an <a href=infrastructure.html#html-elements id=parsing-main-intr:html-elements>HTML 5611 element</a> with the same tag name as the token, this is a <a href=#parse-error id=parsing-main-intr:parse-error-3>parse error</a>; 5612 ignore the token.</p> 5613 5614 5615 <p>If the <a href=#stack-of-open-elements id=parsing-main-intr:stack-of-open-elements-6>stack of open elements</a> does not <a href=#has-an-element-in-table-scope id=parsing-main-intr:has-an-element-in-table-scope-4>have a <code>tr</code> element in table scope</a>, ignore the token.</p> 5616 5617 <p>Otherwise:</p> 5618 5619 <p><a href=#clear-the-stack-back-to-a-table-row-context id=parsing-main-intr:clear-the-stack-back-to-a-table-row-context-4>Clear the stack back to a table row context</a>. (See below.)</p> 5620 5621 <p>Pop the <a href=#current-node id=parsing-main-intr:current-node-3>current node</a> (which will be a <code id=parsing-main-intr:the-tr-element-3><a href=tables.html#the-tr-element>tr</a></code> element) from the 5622 <a href=#stack-of-open-elements id=parsing-main-intr:stack-of-open-elements-7>stack of open elements</a>. Switch the <a href=#insertion-mode id=parsing-main-intr:insertion-mode-5>insertion mode</a> to "<a href=#parsing-main-intbody id=parsing-main-intr:parsing-main-intbody-3>in table body</a>".</p> 5623 5624 5625 <p>Reprocess the token.</p> 5626 5627 <dt>An end tag whose tag name is one of: "body", "caption", "col", "colgroup", "html", "td", 5628 "th"<dd> 5629 <p><a href=#parse-error id=parsing-main-intr:parse-error-4>Parse error</a>. Ignore the token.</p> 5630 <dt>Anything else<dd> 5631 5632 <p>Process the token <a href=#using-the-rules-for id=parsing-main-intr:using-the-rules-for>using the rules for</a> the "<a href=#parsing-main-intable id=parsing-main-intr:parsing-main-intable>in table</a>" <a href=#insertion-mode id=parsing-main-intr:insertion-mode-6>insertion mode</a>.</p> 5633 5634 </dl> 5635 5636 <p>When the steps above require the UA to <dfn id=clear-the-stack-back-to-a-table-row-context>clear the stack back to a table row context</dfn>, 5637 it means that the UA must, while the <a href=#current-node id=parsing-main-intr:current-node-4>current node</a> is not a <code id=parsing-main-intr:the-tr-element-4><a href=tables.html#the-tr-element>tr</a></code>, 5638 <code id=parsing-main-intr:the-template-element><a href=scripting.html#the-template-element>template</a></code>, or <code id=parsing-main-intr:the-html-element><a href=semantics.html#the-html-element>html</a></code> element, pop elements from the <a href=#stack-of-open-elements id=parsing-main-intr:stack-of-open-elements-8>stack of open 5639 elements</a>.</p> 5640 5641 <p class=note>The <a href=#current-node id=parsing-main-intr:current-node-5>current node</a> being an <code id=parsing-main-intr:the-html-element-2><a href=semantics.html#the-html-element>html</a></code> element after this 5642 process is a <a href=#fragment-case id=parsing-main-intr:fragment-case>fragment case</a>.</p> 5643 5644 5645 <h6 id=parsing-main-intd>12.2.5.4.15 The "<dfn>in cell</dfn>" insertion mode</h6> 5646 5647 <p>When the user agent is to apply the rules for the "<a href=#parsing-main-intd id=parsing-main-intd:parsing-main-intd>in cell</a>" <a href=#insertion-mode id=parsing-main-intd:insertion-mode>insertion mode</a>, the user agent must handle the token as follows:</p> 5648 5649 <dl class=switch><dt>An end tag whose tag name is one of: "td", "th"<dd> 5650 5651 <p>If the <a href=#stack-of-open-elements id=parsing-main-intd:stack-of-open-elements>stack of open elements</a> does not <a href=#has-an-element-in-table-scope id=parsing-main-intd:has-an-element-in-table-scope>have an element in table scope</a> that is an <a href=infrastructure.html#html-elements id=parsing-main-intd:html-elements>HTML 5652 element</a> with the same tag name as that of the token, then this is a <a href=#parse-error id=parsing-main-intd:parse-error>parse 5653 error</a>; ignore the token.</p> 5654 5655 <p>Otherwise:</p> 5656 5657 <p><a href=#generate-implied-end-tags id=parsing-main-intd:generate-implied-end-tags>Generate implied end tags</a>.</p> 5658 5659 <p>Now, if the <a href=#current-node id=parsing-main-intd:current-node>current node</a> is not an <a href=infrastructure.html#html-elements id=parsing-main-intd:html-elements-2>HTML 5660 element</a> with the same tag name as the token, then this is a <a href=#parse-error id=parsing-main-intd:parse-error-2>parse error</a>.</p> 5661 5662 <p>Pop elements from the <a href=#stack-of-open-elements id=parsing-main-intd:stack-of-open-elements-2>stack of open elements</a> stack until an <a href=infrastructure.html#html-elements id=parsing-main-intd:html-elements-3>HTML element</a> with the same tag name as the token has been popped from the 5663 stack.</p> 5664 5665 <p><a href=#clear-the-list-of-active-formatting-elements-up-to-the-last-marker id=parsing-main-intd:clear-the-list-of-active-formatting-elements-up-to-the-last-marker>Clear the list of active formatting elements up to the last marker</a>.</p> 5666 5667 <p>Switch the <a href=#insertion-mode id=parsing-main-intd:insertion-mode-2>insertion mode</a> to "<a href=#parsing-main-intr id=parsing-main-intd:parsing-main-intr>in 5668 row</a>".</p> 5669 5670 <dt>A start tag whose tag name is one of: "caption", "col", 5671 "colgroup", "tbody", "td", "tfoot", "th", "thead", "tr"<dd> 5672 5673 <p>If the <a href=#stack-of-open-elements id=parsing-main-intd:stack-of-open-elements-3>stack of open elements</a> does <em>not</em> <a href=#has-an-element-in-table-scope id=parsing-main-intd:has-an-element-in-table-scope-2>have a <code>td</code> or <code>th</code> element in table scope</a>, then this 5674 is a <a href=#parse-error id=parsing-main-intd:parse-error-3>parse error</a>; ignore the token. (<a href=#fragment-case id=parsing-main-intd:fragment-case>fragment case</a>)</p> 5675 5676 <p>Otherwise, <a href=#close-the-cell id=parsing-main-intd:close-the-cell>close the cell</a> (see below) and reprocess the token.</p> 5677 5678 <dt>An end tag whose tag name is one of: "body", "caption", 5679 "col", "colgroup", "html"<dd> 5680 <p><a href=#parse-error id=parsing-main-intd:parse-error-4>Parse error</a>. Ignore the token.</p> 5681 <dt>An end tag whose tag name is one of: "table", "tbody", 5682 "tfoot", "thead", "tr"<dd> 5683 5684 <p>If the <a href=#stack-of-open-elements id=parsing-main-intd:stack-of-open-elements-4>stack of open elements</a> does not <a href=#has-an-element-in-table-scope id=parsing-main-intd:has-an-element-in-table-scope-3>have an element in table scope</a> that is an <a href=infrastructure.html#html-elements id=parsing-main-intd:html-elements-4>HTML 5685 element</a> with the same tag name as that of the token, then this is a <a href=#parse-error id=parsing-main-intd:parse-error-5>parse 5686 error</a>; ignore the token.</p> 5687 5688 <p>Otherwise, <a href=#close-the-cell id=parsing-main-intd:close-the-cell-2>close the cell</a> (see below) and reprocess the token.</p> 5689 5690 <dt>Anything else<dd> 5691 5692 <p>Process the token <a href=#using-the-rules-for id=parsing-main-intd:using-the-rules-for>using the rules for</a> the "<a href=#parsing-main-inbody id=parsing-main-intd:parsing-main-inbody>in body</a>" <a href=#insertion-mode id=parsing-main-intd:insertion-mode-3>insertion mode</a>.</p> 5693 5694 </dl> 5695 5696 <p>Where the steps above say to <dfn id=close-the-cell>close the cell</dfn>, they mean to run the following 5697 algorithm:</p> 5698 5699 <ol><li><p><a href=#generate-implied-end-tags id=parsing-main-intd:generate-implied-end-tags-2>Generate implied end tags</a>.<li><p>If the <a href=#current-node id=parsing-main-intd:current-node-2>current node</a> is not now a <code id=parsing-main-intd:the-td-element><a href=tables.html#the-td-element>td</a></code> element or a <code id=parsing-main-intd:the-th-element><a href=tables.html#the-th-element>th</a></code> 5700 element, then this is a <a href=#parse-error id=parsing-main-intd:parse-error-6>parse error</a>.<li><p>Pop elements from the <a href=#stack-of-open-elements id=parsing-main-intd:stack-of-open-elements-5>stack of open elements</a> stack until a <code id=parsing-main-intd:the-td-element-2><a href=tables.html#the-td-element>td</a></code> 5701 element or a <code id=parsing-main-intd:the-th-element-2><a href=tables.html#the-th-element>th</a></code> element has been popped from the stack.<li><p><a href=#clear-the-list-of-active-formatting-elements-up-to-the-last-marker id=parsing-main-intd:clear-the-list-of-active-formatting-elements-up-to-the-last-marker-2>Clear the list of active formatting elements up to the last marker</a>.<li><p>Switch the <a href=#insertion-mode id=parsing-main-intd:insertion-mode-4>insertion mode</a> to "<a href=#parsing-main-intr id=parsing-main-intd:parsing-main-intr-2>in 5702 row</a>".</ol> 5703 5704 <p class=note>The <a href=#stack-of-open-elements id=parsing-main-intd:stack-of-open-elements-6>stack of open elements</a> cannot have both a <code id=parsing-main-intd:the-td-element-3><a href=tables.html#the-td-element>td</a></code> and a 5705 <code id=parsing-main-intd:the-th-element-3><a href=tables.html#the-th-element>th</a></code> element <a href=#has-an-element-in-table-scope id=parsing-main-intd:has-an-element-in-table-scope-4>in table scope</a> at the 5706 same time, nor can it have neither when the <a href=#close-the-cell id=parsing-main-intd:close-the-cell-3>close the cell</a> algorithm is invoked.</p> 5707 5708 5709 <h6 id=parsing-main-inselect>12.2.5.4.16 The "<dfn>in select</dfn>" insertion mode</h6> 5710 5711 <p>When the user agent is to apply the rules for the "<a href=#parsing-main-inselect id=parsing-main-inselect:parsing-main-inselect>in 5712 select</a>" <a href=#insertion-mode id=parsing-main-inselect:insertion-mode>insertion mode</a>, the user agent must handle the token as follows:</p> 5713 5714 <dl class=switch><dt>A character token that is U+0000 NULL<dd> 5715 <p><a href=#parse-error id=parsing-main-inselect:parse-error>Parse error</a>. Ignore the token.</p> 5716 <dt>Any other character token<dd> 5717 5718 <p><a href=#insert-a-character id=parsing-main-inselect:insert-a-character>Insert the token's character</a>.</p> 5719 5720 <dt>A comment token<dd> 5721 <p><a href=#insert-a-comment id=parsing-main-inselect:insert-a-comment>Insert a comment</a>.</p> 5722 <dt>A DOCTYPE token<dd> 5723 <p><a href=#parse-error id=parsing-main-inselect:parse-error-2>Parse error</a>. Ignore the token.</p> 5724 <dt>A start tag whose tag name is "html"<dd> 5725 5726 <p>Process the token <a href=#using-the-rules-for id=parsing-main-inselect:using-the-rules-for>using the rules for</a> the "<a href=#parsing-main-inbody id=parsing-main-inselect:parsing-main-inbody>in body</a>" <a href=#insertion-mode id=parsing-main-inselect:insertion-mode-2>insertion mode</a>.</p> 5727 5728 <dt>A start tag whose tag name is "option"<dd> 5729 5730 5731 <p>If the <a href=#current-node id=parsing-main-inselect:current-node>current node</a> is an <code id=parsing-main-inselect:the-option-element><a href=forms.html#the-option-element>option</a></code> element, pop that node from the 5732 <a href=#stack-of-open-elements id=parsing-main-inselect:stack-of-open-elements>stack of open elements</a>.</p> 5733 5734 5735 <p><a href=#insert-an-html-element id=parsing-main-inselect:insert-an-html-element>Insert an HTML element</a> for the token.</p> 5736 5737 <dt>A start tag whose tag name is "optgroup"<dd> 5738 5739 5740 <p>If the <a href=#current-node id=parsing-main-inselect:current-node-2>current node</a> is an <code id=parsing-main-inselect:the-option-element-2><a href=forms.html#the-option-element>option</a></code> element, pop that node from the 5741 <a href=#stack-of-open-elements id=parsing-main-inselect:stack-of-open-elements-2>stack of open elements</a>.</p> 5742 5743 5744 5745 <p>If the <a href=#current-node id=parsing-main-inselect:current-node-3>current node</a> is an <code id=parsing-main-inselect:the-optgroup-element><a href=forms.html#the-optgroup-element>optgroup</a></code> element, pop that node from the 5746 <a href=#stack-of-open-elements id=parsing-main-inselect:stack-of-open-elements-3>stack of open elements</a>.</p> 5747 5748 5749 <p><a href=#insert-an-html-element id=parsing-main-inselect:insert-an-html-element-2>Insert an HTML element</a> for the token.</p> 5750 5751 <dt>An end tag whose tag name is "optgroup"<dd> 5752 5753 5754 <p>First, if the <a href=#current-node id=parsing-main-inselect:current-node-4>current node</a> is an <code id=parsing-main-inselect:the-option-element-3><a href=forms.html#the-option-element>option</a></code> element, and the node 5755 immediately before it in the <a href=#stack-of-open-elements id=parsing-main-inselect:stack-of-open-elements-4>stack of open elements</a> is an <code id=parsing-main-inselect:the-optgroup-element-2><a href=forms.html#the-optgroup-element>optgroup</a></code> 5756 element, then pop the <a href=#current-node id=parsing-main-inselect:current-node-5>current node</a> from the <a href=#stack-of-open-elements id=parsing-main-inselect:stack-of-open-elements-5>stack of open 5757 elements</a>.</p> 5758 5759 5760 <p>If the <a href=#current-node id=parsing-main-inselect:current-node-6>current node</a> is an <code id=parsing-main-inselect:the-optgroup-element-3><a href=forms.html#the-optgroup-element>optgroup</a></code> element, then pop that node from 5761 the <a href=#stack-of-open-elements id=parsing-main-inselect:stack-of-open-elements-6>stack of open elements</a>. Otherwise, this is a <a href=#parse-error id=parsing-main-inselect:parse-error-3>parse error</a>; ignore 5762 the token.</p> 5763 5764 <dt>An end tag whose tag name is "option"<dd> 5765 5766 <p>If the <a href=#current-node id=parsing-main-inselect:current-node-7>current node</a> is an <code id=parsing-main-inselect:the-option-element-4><a href=forms.html#the-option-element>option</a></code> element, then pop that node from 5767 the <a href=#stack-of-open-elements id=parsing-main-inselect:stack-of-open-elements-7>stack of open elements</a>. Otherwise, this is a <a href=#parse-error id=parsing-main-inselect:parse-error-4>parse error</a>; ignore 5768 the token.</p> 5769 5770 <dt>An end tag whose tag name is "select"<dd> 5771 5772 <p>If the <a href=#stack-of-open-elements id=parsing-main-inselect:stack-of-open-elements-8>stack of open elements</a> does not <a href=#has-an-element-in-select-scope id=parsing-main-inselect:has-an-element-in-select-scope>have a <code>select</code> element in select scope</a>, this is a <a href=#parse-error id=parsing-main-inselect:parse-error-5>parse 5773 error</a>; ignore the token. (<a href=#fragment-case id=parsing-main-inselect:fragment-case>fragment case</a>)</p> 5774 5775 <p>Otherwise:</p> 5776 5777 <p>Pop elements from the <a href=#stack-of-open-elements id=parsing-main-inselect:stack-of-open-elements-9>stack of open elements</a> until a <code id=parsing-main-inselect:the-select-element><a href=forms.html#the-select-element>select</a></code> element 5778 has been popped from the stack.</p> 5779 5780 <p><a href=#reset-the-insertion-mode-appropriately id=parsing-main-inselect:reset-the-insertion-mode-appropriately>Reset the insertion mode appropriately</a>.</p> 5781 5782 <dt>A start tag whose tag name is "select"<dd> 5783 5784 <p><a href=#parse-error id=parsing-main-inselect:parse-error-6>Parse error</a>.</p> 5785 5786 5787 <p>If the <a href=#stack-of-open-elements id=parsing-main-inselect:stack-of-open-elements-10>stack of open elements</a> does not <a href=#has-an-element-in-select-scope id=parsing-main-inselect:has-an-element-in-select-scope-2>have a <code>select</code> element in select scope</a>, ignore the token. 5788 (<a href=#fragment-case id=parsing-main-inselect:fragment-case-2>fragment case</a>)</p> 5789 5790 <p>Otherwise:</p> 5791 5792 <p>Pop elements from the <a href=#stack-of-open-elements id=parsing-main-inselect:stack-of-open-elements-11>stack of open elements</a> until a <code id=parsing-main-inselect:the-select-element-2><a href=forms.html#the-select-element>select</a></code> element 5793 has been popped from the stack.</p> 5794 5795 <p><a href=#reset-the-insertion-mode-appropriately id=parsing-main-inselect:reset-the-insertion-mode-appropriately-2>Reset the insertion mode appropriately</a>.</p> 5796 5797 5798 <p class=note>It just gets treated like an end tag.</p> 5799 5800 <dt>A start tag whose tag name is one of: "input", "keygen", "textarea"<dd> 5801 5802 <p><a href=#parse-error id=parsing-main-inselect:parse-error-7>Parse error</a>.</p> 5803 5804 5805 <p>If the <a href=#stack-of-open-elements id=parsing-main-inselect:stack-of-open-elements-12>stack of open elements</a> does not <a href=#has-an-element-in-select-scope id=parsing-main-inselect:has-an-element-in-select-scope-3>have a <code>select</code> element in select scope</a>, ignore the token. 5806 (<a href=#fragment-case id=parsing-main-inselect:fragment-case-3>fragment case</a>)</p> 5807 5808 <p>Otherwise:</p> 5809 5810 <p>Pop elements from the <a href=#stack-of-open-elements id=parsing-main-inselect:stack-of-open-elements-13>stack of open elements</a> until a <code id=parsing-main-inselect:the-select-element-3><a href=forms.html#the-select-element>select</a></code> element 5811 has been popped from the stack.</p> 5812 5813 <p><a href=#reset-the-insertion-mode-appropriately id=parsing-main-inselect:reset-the-insertion-mode-appropriately-3>Reset the insertion mode appropriately</a>.</p> 5814 5815 5816 <p>Reprocess the token.</p> 5817 5818 <dt>A start tag whose tag name is one of: "script", "template"<dt>An end tag whose tag name is "template"<dd> 5819 5820 <p>Process the token <a href=#using-the-rules-for id=parsing-main-inselect:using-the-rules-for-2>using the rules for</a> the "<a href=#parsing-main-inhead id=parsing-main-inselect:parsing-main-inhead>in head</a>" <a href=#insertion-mode id=parsing-main-inselect:insertion-mode-3>insertion mode</a>.</p> 5821 5822 <dt>An end-of-file token<dd> 5823 5824 <p>Process the token <a href=#using-the-rules-for id=parsing-main-inselect:using-the-rules-for-3>using the rules for</a> the "<a href=#parsing-main-inbody id=parsing-main-inselect:parsing-main-inbody-2>in body</a>" <a href=#insertion-mode id=parsing-main-inselect:insertion-mode-4>insertion mode</a>.</p> 5825 5826 <dt>Anything else<dd> 5827 <p><a href=#parse-error id=parsing-main-inselect:parse-error-8>Parse error</a>. Ignore the token.</p> 5828 </dl> 5829 5830 5831 <h6 id=parsing-main-inselectintable>12.2.5.4.17 The "<dfn>in select in table</dfn>" insertion mode</h6> 5832 5833 <p>When the user agent is to apply the rules for the "<a href=#parsing-main-inselectintable id=parsing-main-inselectintable:parsing-main-inselectintable>in select in table</a>" <a href=#insertion-mode id=parsing-main-inselectintable:insertion-mode>insertion mode</a>, the user agent must handle the 5834 token as follows:</p> 5835 5836 <dl class=switch><dt>A start tag whose tag name is one of: "caption", "table", "tbody", "tfoot", "thead", "tr", 5837 "td", "th"<dd> 5838 5839 <p><a href=#parse-error id=parsing-main-inselectintable:parse-error>Parse error</a>.</p> 5840 5841 5842 <p>Pop elements from the <a href=#stack-of-open-elements id=parsing-main-inselectintable:stack-of-open-elements>stack of open elements</a> until a <code id=parsing-main-inselectintable:the-select-element><a href=forms.html#the-select-element>select</a></code> element 5843 has been popped from the stack.</p> 5844 5845 <p><a href=#reset-the-insertion-mode-appropriately id=parsing-main-inselectintable:reset-the-insertion-mode-appropriately>Reset the insertion mode appropriately</a>.</p> 5846 5847 5848 <p>Reprocess the token.</p> 5849 5850 <dt>An end tag whose tag name is one of: "caption", "table", "tbody", "tfoot", "thead", "tr", 5851 "td", "th"<dd> 5852 5853 <p><a href=#parse-error id=parsing-main-inselectintable:parse-error-2>Parse error</a>.</p> 5854 5855 <p>If the <a href=#stack-of-open-elements id=parsing-main-inselectintable:stack-of-open-elements-2>stack of open elements</a> does not <a href=#has-an-element-in-table-scope id=parsing-main-inselectintable:has-an-element-in-table-scope>have an element in table scope</a> that is an <a href=infrastructure.html#html-elements id=parsing-main-inselectintable:html-elements>HTML 5856 element</a> with the same tag name as that of the token, then ignore the token.</p> 5857 5858 <p>Otherwise:</p> 5859 5860 5861 <p>Pop elements from the <a href=#stack-of-open-elements id=parsing-main-inselectintable:stack-of-open-elements-3>stack of open elements</a> until a <code id=parsing-main-inselectintable:the-select-element-2><a href=forms.html#the-select-element>select</a></code> element 5862 has been popped from the stack.</p> 5863 5864 <p><a href=#reset-the-insertion-mode-appropriately id=parsing-main-inselectintable:reset-the-insertion-mode-appropriately-2>Reset the insertion mode appropriately</a>.</p> 5865 5866 5867 <p>Reprocess the token.</p> 5868 5869 <dt>Anything else<dd> 5870 5871 <p>Process the token <a href=#using-the-rules-for id=parsing-main-inselectintable:using-the-rules-for>using the rules for</a> the "<a href=#parsing-main-inselect id=parsing-main-inselectintable:parsing-main-inselect>in select</a>" <a href=#insertion-mode id=parsing-main-inselectintable:insertion-mode-2>insertion mode</a>.</p> 5872 5873 </dl> 5874 5875 5876 5877 <h6 id=parsing-main-intemplate>12.2.5.4.18 The "<dfn>in template</dfn>" insertion mode</h6> 5878 5879 <p>When the user agent is to apply the rules for the "<a href=#parsing-main-intemplate id=parsing-main-intemplate:parsing-main-intemplate>in 5880 template</a>" <a href=#insertion-mode id=parsing-main-intemplate:insertion-mode>insertion mode</a>, the user agent must handle the token as follows:</p> 5881 5882 <dl class=switch><dt>A character token<dt>A comment token<dt>A DOCTYPE token<dd> 5883 5884 <p>Process the token <a href=#using-the-rules-for id=parsing-main-intemplate:using-the-rules-for>using the rules for</a> the "<a href=#parsing-main-inbody id=parsing-main-intemplate:parsing-main-inbody>in body</a>" <a href=#insertion-mode id=parsing-main-intemplate:insertion-mode-2>insertion mode</a>.</p> 5885 5886 <dt>A start tag whose tag name is one of: "base", "basefont", "bgsound", "link", "meta", "noframes", "script", "style", "template", "title"<dt>An end tag whose tag name is "template"<dd> 5887 5888 <p>Process the token <a href=#using-the-rules-for id=parsing-main-intemplate:using-the-rules-for-2>using the rules for</a> the "<a href=#parsing-main-inhead id=parsing-main-intemplate:parsing-main-inhead>in head</a>" <a href=#insertion-mode id=parsing-main-intemplate:insertion-mode-3>insertion mode</a>.</p> 5889 5890 <dt>A start tag whose tag name is one of: "caption", "colgroup", "tbody", "tfoot", "thead"<dd> 5891 5892 <p>Pop the <a href=#current-template-insertion-mode id=parsing-main-intemplate:current-template-insertion-mode>current template insertion mode</a> off the <a href=#stack-of-template-insertion-modes id=parsing-main-intemplate:stack-of-template-insertion-modes>stack of template 5893 insertion modes</a>.</p> 5894 5895 <p>Push "<a href=#parsing-main-intable id=parsing-main-intemplate:parsing-main-intable>in table</a>" onto the <a href=#stack-of-template-insertion-modes id=parsing-main-intemplate:stack-of-template-insertion-modes-2>stack of 5896 template insertion modes</a> so that it is the new <a href=#current-template-insertion-mode id=parsing-main-intemplate:current-template-insertion-mode-2>current template insertion 5897 mode</a>.</p> 5898 5899 <p>Switch the <a href=#insertion-mode id=parsing-main-intemplate:insertion-mode-4>insertion mode</a> to "<a href=#parsing-main-intable id=parsing-main-intemplate:parsing-main-intable-2>in 5900 table</a>", and reprocess the token.</p> 5901 5902 <dt>A start tag whose tag name is "col"<dd> 5903 5904 <p>Pop the <a href=#current-template-insertion-mode id=parsing-main-intemplate:current-template-insertion-mode-3>current template insertion mode</a> off the <a href=#stack-of-template-insertion-modes id=parsing-main-intemplate:stack-of-template-insertion-modes-3>stack of template 5905 insertion modes</a>.</p> 5906 5907 <p>Push "<a href=#parsing-main-incolgroup id=parsing-main-intemplate:parsing-main-incolgroup>in column group</a>" onto the 5908 <a href=#stack-of-template-insertion-modes id=parsing-main-intemplate:stack-of-template-insertion-modes-4>stack of template insertion modes</a> so that it is the new <a href=#current-template-insertion-mode id=parsing-main-intemplate:current-template-insertion-mode-4>current template 5909 insertion mode</a>.</p> 5910 5911 <p>Switch the <a href=#insertion-mode id=parsing-main-intemplate:insertion-mode-5>insertion mode</a> to "<a href=#parsing-main-incolgroup id=parsing-main-intemplate:parsing-main-incolgroup-2>in 5912 column group</a>", and reprocess the token.</p> 5913 5914 <dt>A start tag whose tag name is "tr"<dd> 5915 5916 <p>Pop the <a href=#current-template-insertion-mode id=parsing-main-intemplate:current-template-insertion-mode-5>current template insertion mode</a> off the <a href=#stack-of-template-insertion-modes id=parsing-main-intemplate:stack-of-template-insertion-modes-5>stack of template 5917 insertion modes</a>.</p> 5918 5919 <p>Push "<a href=#parsing-main-intbody id=parsing-main-intemplate:parsing-main-intbody>in table body</a>" onto the <a href=#stack-of-template-insertion-modes id=parsing-main-intemplate:stack-of-template-insertion-modes-6>stack 5920 of template insertion modes</a> so that it is the new <a href=#current-template-insertion-mode id=parsing-main-intemplate:current-template-insertion-mode-6>current template insertion 5921 mode</a>.</p> 5922 5923 <p>Switch the <a href=#insertion-mode id=parsing-main-intemplate:insertion-mode-6>insertion mode</a> to "<a href=#parsing-main-intbody id=parsing-main-intemplate:parsing-main-intbody-2>in 5924 table body</a>", and reprocess the token.</p> 5925 5926 <dt>A start tag whose tag name is one of: "td", "th"<dd> 5927 5928 <p>Pop the <a href=#current-template-insertion-mode id=parsing-main-intemplate:current-template-insertion-mode-7>current template insertion mode</a> off the <a href=#stack-of-template-insertion-modes id=parsing-main-intemplate:stack-of-template-insertion-modes-7>stack of template 5929 insertion modes</a>.</p> 5930 5931 <p>Push "<a href=#parsing-main-intr id=parsing-main-intemplate:parsing-main-intr>in row</a>" onto the <a href=#stack-of-template-insertion-modes id=parsing-main-intemplate:stack-of-template-insertion-modes-8>stack of template 5932 insertion modes</a> so that it is the new <a href=#current-template-insertion-mode id=parsing-main-intemplate:current-template-insertion-mode-8>current template insertion mode</a>.</p> 5933 5934 <p>Switch the <a href=#insertion-mode id=parsing-main-intemplate:insertion-mode-7>insertion mode</a> to "<a href=#parsing-main-intr id=parsing-main-intemplate:parsing-main-intr-2>in 5935 row</a>", and reprocess the token.</p> 5936 5937 <dt>Any other start tag<dd> 5938 5939 <p>Pop the <a href=#current-template-insertion-mode id=parsing-main-intemplate:current-template-insertion-mode-9>current template insertion mode</a> off the <a href=#stack-of-template-insertion-modes id=parsing-main-intemplate:stack-of-template-insertion-modes-9>stack of template 5940 insertion modes</a>.</p> 5941 5942 <p>Push "<a href=#parsing-main-inbody id=parsing-main-intemplate:parsing-main-inbody-2>in body</a>" onto the <a href=#stack-of-template-insertion-modes id=parsing-main-intemplate:stack-of-template-insertion-modes-10>stack of template 5943 insertion modes</a> so that it is the new <a href=#current-template-insertion-mode id=parsing-main-intemplate:current-template-insertion-mode-10>current template insertion mode</a>.</p> 5944 5945 <p>Switch the <a href=#insertion-mode id=parsing-main-intemplate:insertion-mode-8>insertion mode</a> to "<a href=#parsing-main-inbody id=parsing-main-intemplate:parsing-main-inbody-3>in 5946 body</a>", and reprocess the token.</p> 5947 5948 <dt>Any other end tag<dd> 5949 <p><a href=#parse-error id=parsing-main-intemplate:parse-error>Parse error</a>. Ignore the token.</p> 5950 <dt>An end-of-file token<dd> 5951 5952 <p>If there is no <code id=parsing-main-intemplate:the-template-element><a href=scripting.html#the-template-element>template</a></code> element on the <a href=#stack-of-open-elements id=parsing-main-intemplate:stack-of-open-elements>stack of open elements</a>, then 5953 <a href=#stop-parsing id=parsing-main-intemplate:stop-parsing>stop parsing</a>. (<a href=#fragment-case id=parsing-main-intemplate:fragment-case>fragment case</a>)</p> 5954 5955 <p>Otherwise, this is a <a href=#parse-error id=parsing-main-intemplate:parse-error-2>parse error</a>.</p> 5956 5957 5958 <p>Pop elements from the <a href=#stack-of-open-elements id=parsing-main-intemplate:stack-of-open-elements-2>stack of open elements</a> until a <code id=parsing-main-intemplate:the-template-element-2><a href=scripting.html#the-template-element>template</a></code> 5959 element has been popped from the stack.</p> 5960 5961 <p><a href=#clear-the-list-of-active-formatting-elements-up-to-the-last-marker id=parsing-main-intemplate:clear-the-list-of-active-formatting-elements-up-to-the-last-marker>Clear the list of active formatting elements up to the last marker</a>.</p> 5962 5963 <p>Pop the <a href=#current-template-insertion-mode id=parsing-main-intemplate:current-template-insertion-mode-11>current template insertion mode</a> off the <a href=#stack-of-template-insertion-modes id=parsing-main-intemplate:stack-of-template-insertion-modes-11>stack of template 5964 insertion modes</a>.</p> 5965 5966 <p><a href=#reset-the-insertion-mode-appropriately id=parsing-main-intemplate:reset-the-insertion-mode-appropriately>Reset the insertion mode appropriately</a>.</p> 5967 5968 5969 <p>Reprocess the token.</p> 5970 5971 </dl> 5972 5973 5974 <h6 id=parsing-main-afterbody>12.2.5.4.19 The "<dfn>after body</dfn>" insertion mode</h6> 5975 5976 <p>When the user agent is to apply the rules for the "<a href=#parsing-main-afterbody id=parsing-main-afterbody:parsing-main-afterbody>after body</a>" <a href=#insertion-mode id=parsing-main-afterbody:insertion-mode>insertion mode</a>, the user agent must handle the token as follows:</p> 5977 5978 <dl class=switch><dt>A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C 5979 FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dd> 5980 5981 <p>Process the token <a href=#using-the-rules-for id=parsing-main-afterbody:using-the-rules-for>using the rules for</a> the "<a href=#parsing-main-inbody id=parsing-main-afterbody:parsing-main-inbody>in body</a>" <a href=#insertion-mode id=parsing-main-afterbody:insertion-mode-2>insertion mode</a>.</p> 5982 5983 <dt>A comment token<dd> 5984 5985 <p><a href=#insert-a-comment id=parsing-main-afterbody:insert-a-comment>Insert a comment</a> as the last child of the first element in the <a href=#stack-of-open-elements id=parsing-main-afterbody:stack-of-open-elements>stack of 5986 open elements</a> (the <code id=parsing-main-afterbody:the-html-element><a href=semantics.html#the-html-element>html</a></code> element).</p> 5987 5988 <dt>A DOCTYPE token<dd> 5989 <p><a href=#parse-error id=parsing-main-afterbody:parse-error>Parse error</a>. Ignore the token.</p> 5990 <dt>A start tag whose tag name is "html"<dd> 5991 5992 <p>Process the token <a href=#using-the-rules-for id=parsing-main-afterbody:using-the-rules-for-2>using the rules for</a> the "<a href=#parsing-main-inbody id=parsing-main-afterbody:parsing-main-inbody-2>in body</a>" <a href=#insertion-mode id=parsing-main-afterbody:insertion-mode-3>insertion mode</a>.</p> 5993 5994 <dt>An end tag whose tag name is "html"<dd> 5995 5996 <p>If the parser was originally created as part of the <a href=#html-fragment-parsing-algorithm id=parsing-main-afterbody:html-fragment-parsing-algorithm>HTML fragment parsing 5997 algorithm</a>, this is a <a href=#parse-error id=parsing-main-afterbody:parse-error-2>parse error</a>; ignore the token. (<a href=#fragment-case id=parsing-main-afterbody:fragment-case>fragment 5998 case</a>)</p> 5999 6000 <p>Otherwise, switch the <a href=#insertion-mode id=parsing-main-afterbody:insertion-mode-4>insertion mode</a> to "<a href=#the-after-after-body-insertion-mode id=parsing-main-afterbody:the-after-after-body-insertion-mode>after after body</a>".</p> 6001 6002 <dt>An end-of-file token<dd> 6003 <p><a href=#stop-parsing id=parsing-main-afterbody:stop-parsing>Stop parsing</a>.</p> 6004 <dt>Anything else<dd> 6005 6006 <p><a href=#parse-error id=parsing-main-afterbody:parse-error-3>Parse error</a>. Switch the <a href=#insertion-mode id=parsing-main-afterbody:insertion-mode-5>insertion mode</a> to "<a href=#parsing-main-inbody id=parsing-main-afterbody:parsing-main-inbody-3>in body</a>" and reprocess the token.</p> 6007 6008 </dl> 6009 6010 6011 <h6 id=parsing-main-inframeset>12.2.5.4.20 The "<dfn>in frameset</dfn>" insertion mode</h6> 6012 6013 <p>When the user agent is to apply the rules for the "<a href=#parsing-main-inframeset id=parsing-main-inframeset:parsing-main-inframeset>in 6014 frameset</a>" <a href=#insertion-mode id=parsing-main-inframeset:insertion-mode>insertion mode</a>, the user agent must handle the token as follows:</p> 6015 6016 <dl class=switch><dt>A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C 6017 FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dd> 6018 <p><a href=#insert-a-character id=parsing-main-inframeset:insert-a-character>Insert the character</a>.</p> 6019 <dt>A comment token<dd> 6020 <p><a href=#insert-a-comment id=parsing-main-inframeset:insert-a-comment>Insert a comment</a>.</p> 6021 <dt>A DOCTYPE token<dd> 6022 <p><a href=#parse-error id=parsing-main-inframeset:parse-error>Parse error</a>. Ignore the token.</p> 6023 <dt>A start tag whose tag name is "html"<dd> 6024 6025 <p>Process the token <a href=#using-the-rules-for id=parsing-main-inframeset:using-the-rules-for>using the rules for</a> the "<a href=#parsing-main-inbody id=parsing-main-inframeset:parsing-main-inbody>in body</a>" <a href=#insertion-mode id=parsing-main-inframeset:insertion-mode-2>insertion mode</a>.</p> 6026 6027 <dt>A start tag whose tag name is "frameset"<dd> 6028 <p><a href=#insert-an-html-element id=parsing-main-inframeset:insert-an-html-element>Insert an HTML element</a> for the token.</p> 6029 <dt>An end tag whose tag name is "frameset"<dd> 6030 6031 <p>If the <a href=#current-node id=parsing-main-inframeset:current-node>current node</a> is the root <code id=parsing-main-inframeset:the-html-element><a href=semantics.html#the-html-element>html</a></code> element, then this is a 6032 <a href=#parse-error id=parsing-main-inframeset:parse-error-2>parse error</a>; ignore the token. (<a href=#fragment-case id=parsing-main-inframeset:fragment-case>fragment case</a>)</p> 6033 6034 <p>Otherwise, pop the <a href=#current-node id=parsing-main-inframeset:current-node-2>current node</a> from the <a href=#stack-of-open-elements id=parsing-main-inframeset:stack-of-open-elements>stack of open 6035 elements</a>.</p> 6036 6037 <p>If the parser was <em>not</em> originally created as part of the <a href=#html-fragment-parsing-algorithm id=parsing-main-inframeset:html-fragment-parsing-algorithm>HTML fragment parsing 6038 algorithm</a> (<a href=#fragment-case id=parsing-main-inframeset:fragment-case-2>fragment case</a>), and the <a href=#current-node id=parsing-main-inframeset:current-node-3>current node</a> is no longer a 6039 <code id=parsing-main-inframeset:frameset><a href=obsolete.html#frameset>frameset</a></code> element, then switch the <a href=#insertion-mode id=parsing-main-inframeset:insertion-mode-3>insertion mode</a> to "<a href=#parsing-main-afterframeset id=parsing-main-inframeset:parsing-main-afterframeset>after frameset</a>".</p> 6040 6041 <dt>A start tag whose tag name is "frame"<dd> 6042 6043 <p><a href=#insert-an-html-element id=parsing-main-inframeset:insert-an-html-element-2>Insert an HTML element</a> for the token. Immediately pop the <a href=#current-node id=parsing-main-inframeset:current-node-4>current 6044 node</a> off the <a href=#stack-of-open-elements id=parsing-main-inframeset:stack-of-open-elements-2>stack of open elements</a>.</p> 6045 6046 <p><a href=#acknowledge-self-closing-flag id=parsing-main-inframeset:acknowledge-self-closing-flag>Acknowledge the token's <i>self-closing 6047 flag</i></a>, if it is set.</p> 6048 6049 <dt>A start tag whose tag name is "noframes"<dd> 6050 6051 <p>Process the token <a href=#using-the-rules-for id=parsing-main-inframeset:using-the-rules-for-2>using the rules for</a> the "<a href=#parsing-main-inhead id=parsing-main-inframeset:parsing-main-inhead>in head</a>" <a href=#insertion-mode id=parsing-main-inframeset:insertion-mode-4>insertion mode</a>.</p> 6052 6053 <dt>An end-of-file token<dd> 6054 6055 <p>If the <a href=#current-node id=parsing-main-inframeset:current-node-5>current node</a> is not the root <code id=parsing-main-inframeset:the-html-element-2><a href=semantics.html#the-html-element>html</a></code> element, then this is a 6056 <a href=#parse-error id=parsing-main-inframeset:parse-error-3>parse error</a>.</p> 6057 6058 <p class=note>The <a href=#current-node id=parsing-main-inframeset:current-node-6>current node</a> can only be the root 6059 <code id=parsing-main-inframeset:the-html-element-3><a href=semantics.html#the-html-element>html</a></code> element in the <a href=#fragment-case id=parsing-main-inframeset:fragment-case-3>fragment case</a>.</p> 6060 6061 <p><a href=#stop-parsing id=parsing-main-inframeset:stop-parsing>Stop parsing</a>.</p> 6062 6063 <dt>Anything else<dd> 6064 <p><a href=#parse-error id=parsing-main-inframeset:parse-error-4>Parse error</a>. Ignore the token.</p> 6065 </dl> 6066 6067 6068 <h6 id=parsing-main-afterframeset>12.2.5.4.21 The "<dfn>after frameset</dfn>" insertion mode</h6> 6069 6070 <p>When the user agent is to apply the rules for the "<a href=#parsing-main-afterframeset id=parsing-main-afterframeset:parsing-main-afterframeset>after frameset</a>" <a href=#insertion-mode id=parsing-main-afterframeset:insertion-mode>insertion mode</a>, the user agent must handle the token 6071 as follows:</p> 6072 6073 6074 <dl class=switch><dt>A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C 6075 FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dd> 6076 <p><a href=#insert-a-character id=parsing-main-afterframeset:insert-a-character>Insert the character</a>.</p> 6077 <dt>A comment token<dd> 6078 <p><a href=#insert-a-comment id=parsing-main-afterframeset:insert-a-comment>Insert a comment</a>.</p> 6079 <dt>A DOCTYPE token<dd> 6080 <p><a href=#parse-error id=parsing-main-afterframeset:parse-error>Parse error</a>. Ignore the token.</p> 6081 <dt>A start tag whose tag name is "html"<dd> 6082 6083 <p>Process the token <a href=#using-the-rules-for id=parsing-main-afterframeset:using-the-rules-for>using the rules for</a> the "<a href=#parsing-main-inbody id=parsing-main-afterframeset:parsing-main-inbody>in body</a>" <a href=#insertion-mode id=parsing-main-afterframeset:insertion-mode-2>insertion mode</a>.</p> 6084 6085 <dt>An end tag whose tag name is "html"<dd> 6086 6087 <p>Switch the <a href=#insertion-mode id=parsing-main-afterframeset:insertion-mode-3>insertion mode</a> to "<a href=#the-after-after-frameset-insertion-mode id=parsing-main-afterframeset:the-after-after-frameset-insertion-mode>after after frameset</a>".</p> 6088 6089 <dt>A start tag whose tag name is "noframes"<dd> 6090 6091 <p>Process the token <a href=#using-the-rules-for id=parsing-main-afterframeset:using-the-rules-for-2>using the rules for</a> the "<a href=#parsing-main-inhead id=parsing-main-afterframeset:parsing-main-inhead>in head</a>" <a href=#insertion-mode id=parsing-main-afterframeset:insertion-mode-4>insertion mode</a>.</p> 6092 6093 <dt>An end-of-file token<dd> 6094 <p><a href=#stop-parsing id=parsing-main-afterframeset:stop-parsing>Stop parsing</a>.</p> 6095 <dt>Anything else<dd> 6096 <p><a href=#parse-error id=parsing-main-afterframeset:parse-error-2>Parse error</a>. Ignore the token.</p> 6097 </dl> 6098 6099 6100 <h6 id=the-after-after-body-insertion-mode>12.2.5.4.22 The "<dfn>after after body</dfn>" insertion mode</h6> 6101 6102 <p>When the user agent is to apply the rules for the "<a href=#the-after-after-body-insertion-mode id=the-after-after-body-insertion-mode:the-after-after-body-insertion-mode>after after body</a>" <a href=#insertion-mode id=the-after-after-body-insertion-mode:insertion-mode>insertion mode</a>, the user agent must handle the token 6103 as follows:</p> 6104 6105 <dl class=switch><dt>A comment token<dd> 6106 <p><a href=#insert-a-comment id=the-after-after-body-insertion-mode:insert-a-comment>Insert a comment</a> as the last child of the <code id=the-after-after-body-insertion-mode:document><a href=dom.html#document>Document</a></code> object.</p> 6107 <dt>A DOCTYPE token<dt>A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C 6108 FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dt>A start tag whose tag name is "html"<dd> 6109 6110 <p>Process the token <a href=#using-the-rules-for id=the-after-after-body-insertion-mode:using-the-rules-for>using the rules for</a> the "<a href=#parsing-main-inbody id=the-after-after-body-insertion-mode:parsing-main-inbody>in body</a>" <a href=#insertion-mode id=the-after-after-body-insertion-mode:insertion-mode-2>insertion mode</a>.</p> 6111 6112 <dt>An end-of-file token<dd> 6113 <p><a href=#stop-parsing id=the-after-after-body-insertion-mode:stop-parsing>Stop parsing</a>.</p> 6114 <dt>Anything else<dd> 6115 6116 <p><a href=#parse-error id=the-after-after-body-insertion-mode:parse-error>Parse error</a>. Switch the <a href=#insertion-mode id=the-after-after-body-insertion-mode:insertion-mode-3>insertion mode</a> to "<a href=#parsing-main-inbody id=the-after-after-body-insertion-mode:parsing-main-inbody-2>in body</a>" and reprocess the token.</p> 6117 6118 </dl> 6119 6120 6121 <h6 id=the-after-after-frameset-insertion-mode>12.2.5.4.23 The "<dfn>after after frameset</dfn>" insertion mode</h6> 6122 6123 <p>When the user agent is to apply the rules for the "<a href=#the-after-after-frameset-insertion-mode id=the-after-after-frameset-insertion-mode:the-after-after-frameset-insertion-mode>after after frameset</a>" <a href=#insertion-mode id=the-after-after-frameset-insertion-mode:insertion-mode>insertion mode</a>, the user agent must handle the 6124 token as follows:</p> 6125 6126 <dl class=switch><dt>A comment token<dd> 6127 <p><a href=#insert-a-comment id=the-after-after-frameset-insertion-mode:insert-a-comment>Insert a comment</a> as the last child of the <code id=the-after-after-frameset-insertion-mode:document><a href=dom.html#document>Document</a></code> object.</p> 6128 <dt>A DOCTYPE token<dt>A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C 6129 FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dt>A start tag whose tag name is "html"<dd> 6130 6131 <p>Process the token <a href=#using-the-rules-for id=the-after-after-frameset-insertion-mode:using-the-rules-for>using the rules for</a> the "<a href=#parsing-main-inbody id=the-after-after-frameset-insertion-mode:parsing-main-inbody>in body</a>" <a href=#insertion-mode id=the-after-after-frameset-insertion-mode:insertion-mode-2>insertion mode</a>.</p> 6132 6133 <dt>An end-of-file token<dd> 6134 <p><a href=#stop-parsing id=the-after-after-frameset-insertion-mode:stop-parsing>Stop parsing</a>.</p> 6135 <dt>A start tag whose tag name is "noframes"<dd> 6136 6137 <p>Process the token <a href=#using-the-rules-for id=the-after-after-frameset-insertion-mode:using-the-rules-for-2>using the rules for</a> the "<a href=#parsing-main-inhead id=the-after-after-frameset-insertion-mode:parsing-main-inhead>in head</a>" <a href=#insertion-mode id=the-after-after-frameset-insertion-mode:insertion-mode-3>insertion mode</a>.</p> 6138 6139 <dt>Anything else<dd> 6140 <p><a href=#parse-error id=the-after-after-frameset-insertion-mode:parse-error>Parse error</a>. Ignore the token.</p> 6141 </dl> 6142 6143 6144 6145 <h5 id=parsing-main-inforeign>12.2.5.5 The rules for parsing tokens <dfn>in foreign content</dfn></h5> 6146 6147 <p>When the user agent is to apply the rules for parsing tokens in foreign content, the user agent 6148 must handle the token as follows:</p> 6149 6150 <dl class=switch><dt>A character token that is U+0000 NULL<dd> 6151 6152 <p><a href=#parse-error id=parsing-main-inforeign:parse-error>Parse error</a>. <a href=#insert-a-character id=parsing-main-inforeign:insert-a-character>Insert a U+FFFD REPLACEMENT 6153 CHARACTER character</a>.</p> 6154 6155 <dt>A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C 6156 FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dd> 6157 6158 <p><a href=#insert-a-character id=parsing-main-inforeign:insert-a-character-2>Insert the token's character</a>.</p> 6159 6160 <dt>Any other character token<dd> 6161 6162 <p><a href=#insert-a-character id=parsing-main-inforeign:insert-a-character-3>Insert the token's character</a>.</p> 6163 6164 <p>Set the <a href=#frameset-ok-flag id=parsing-main-inforeign:frameset-ok-flag>frameset-ok flag</a> to "not ok".</p> 6165 6166 <dt>A comment token<dd> 6167 6168 <p><a href=#insert-a-comment id=parsing-main-inforeign:insert-a-comment>Insert a comment</a>.</p> 6169 6170 <dt>A DOCTYPE token<dd> 6171 <p><a href=#parse-error id=parsing-main-inforeign:parse-error-2>Parse error</a>. Ignore the token.</p> 6172 <dt>A start tag whose tag name is one of: "b", "big", "blockquote", "body", "br", "center", "code", "dd", "div", "dl", "dt", "em", "embed", "h1", "h2", "h3", "h4", "h5", "h6", "head", "hr", "i", "img", 6173 "li", "listing", 6174 "menu", "meta", "nobr", "ol", "p", "pre", "ruby", "s", "small", "span", "strong", "strike", "sub", 6175 "sup", "table", "tt", "u", "ul", "var"<dt>A start tag whose tag name is "font", if the token has any attributes named "color", "face", 6176 or "size"<dd> 6177 6178 <p><a href=#parse-error id=parsing-main-inforeign:parse-error-3>Parse error</a>.</p> 6179 6180 6181 6182 <p>If the parser was originally created for the <a href=#html-fragment-parsing-algorithm id=parsing-main-inforeign:html-fragment-parsing-algorithm>HTML fragment parsing algorithm</a>, 6183 then act as described in the "any other start tag" entry below. (<a href=#fragment-case id=parsing-main-inforeign:fragment-case>fragment case</a>)</p> 6184 6185 <p>Otherwise:</p> 6186 6187 <p>Pop an element from the <a href=#stack-of-open-elements id=parsing-main-inforeign:stack-of-open-elements>stack of open elements</a>, and then keep popping more 6188 elements from the <a href=#stack-of-open-elements id=parsing-main-inforeign:stack-of-open-elements-2>stack of open elements</a> until the <a href=#current-node id=parsing-main-inforeign:current-node>current node</a> is a 6189 <a href=#mathml-text-integration-point id=parsing-main-inforeign:mathml-text-integration-point>MathML text integration point</a>, an <a href=#html-integration-point id=parsing-main-inforeign:html-integration-point>HTML integration point</a>, or an 6190 element in the <a id=parsing-main-inforeign:html-namespace-2 href=infrastructure.html#html-namespace-2>HTML namespace</a>.</p> 6191 6192 <p>Then, reprocess the token.</p> 6193 6194 <dt>Any other start tag<dd> 6195 6196 <p>If the <a href=#adjusted-current-node id=parsing-main-inforeign:adjusted-current-node>adjusted current node</a> is an element in the <a id=parsing-main-inforeign:mathml-namespace href=infrastructure.html#mathml-namespace>MathML namespace</a>, 6197 <a href=#adjust-mathml-attributes id=parsing-main-inforeign:adjust-mathml-attributes>adjust MathML attributes</a> for the token. (This fixes the case of MathML attributes 6198 that are not all lowercase.)</p> 6199 6200 <p>If the <a href=#adjusted-current-node id=parsing-main-inforeign:adjusted-current-node-2>adjusted current node</a> is an element in the <a id=parsing-main-inforeign:svg-namespace href=infrastructure.html#svg-namespace>SVG namespace</a>, and the 6201 token's tag name is one of the ones in the first column of the following table, change the tag 6202 name to the name given in the corresponding cell in the second column. (This fixes the case of 6203 SVG elements that are not all lowercase.)</p> 6204 6205 <table><thead><tr><th> Tag name <th> Element name 6206 <tbody><tr><td> <code>altglyph</code> <td> <code>altGlyph</code> 6207 <tr><td> <code>altglyphdef</code> <td> <code>altGlyphDef</code> 6208 <tr><td> <code>altglyphitem</code> <td> <code>altGlyphItem</code> 6209 <tr><td> <code>animatecolor</code> <td> <code>animateColor</code> 6210 <tr><td> <code>animatemotion</code> <td> <code>animateMotion</code> 6211 <tr><td> <code>animatetransform</code> <td> <code>animateTransform</code> 6212 <tr><td> <code>clippath</code> <td> <code>clipPath</code> 6213 <tr><td> <code>feblend</code> <td> <code>feBlend</code> 6214 <tr><td> <code>fecolormatrix</code> <td> <code>feColorMatrix</code> 6215 <tr><td> <code>fecomponenttransfer</code> <td> <code>feComponentTransfer</code> 6216 <tr><td> <code>fecomposite</code> <td> <code>feComposite</code> 6217 <tr><td> <code>feconvolvematrix</code> <td> <code>feConvolveMatrix</code> 6218 <tr><td> <code>fediffuselighting</code> <td> <code>feDiffuseLighting</code> 6219 <tr><td> <code>fedisplacementmap</code> <td> <code>feDisplacementMap</code> 6220 <tr><td> <code>fedistantlight</code> <td> <code>feDistantLight</code> 6221 <tr><td> <code>fedropshadow</code> <td> <code>feDropShadow</code> 6222 <tr><td> <code>feflood</code> <td> <code>feFlood</code> 6223 <tr><td> <code>fefunca</code> <td> <code>feFuncA</code> 6224 <tr><td> <code>fefuncb</code> <td> <code>feFuncB</code> 6225 <tr><td> <code>fefuncg</code> <td> <code>feFuncG</code> 6226 <tr><td> <code>fefuncr</code> <td> <code>feFuncR</code> 6227 <tr><td> <code>fegaussianblur</code> <td> <code>feGaussianBlur</code> 6228 <tr><td> <code>feimage</code> <td> <code>feImage</code> 6229 <tr><td> <code>femerge</code> <td> <code>feMerge</code> 6230 <tr><td> <code>femergenode</code> <td> <code>feMergeNode</code> 6231 <tr><td> <code>femorphology</code> <td> <code>feMorphology</code> 6232 <tr><td> <code>feoffset</code> <td> <code>feOffset</code> 6233 <tr><td> <code>fepointlight</code> <td> <code>fePointLight</code> 6234 <tr><td> <code>fespecularlighting</code> <td> <code>feSpecularLighting</code> 6235 <tr><td> <code>fespotlight</code> <td> <code>feSpotLight</code> 6236 <tr><td> <code>fetile</code> <td> <code>feTile</code> 6237 <tr><td> <code>feturbulence</code> <td> <code>feTurbulence</code> 6238 <tr><td> <code>foreignobject</code> <td> <code>foreignObject</code> 6239 <tr><td> <code>glyphref</code> <td> <code>glyphRef</code> 6240 <tr><td> <code>lineargradient</code> <td> <code>linearGradient</code> 6241 <tr><td> <code>radialgradient</code> <td> <code>radialGradient</code> 6242 6243 <tr><td> <code>textpath</code> <td> <code>textPath</code> 6244 </table> 6245 6246 <p>If the <a href=#adjusted-current-node id=parsing-main-inforeign:adjusted-current-node-3>adjusted current node</a> is an element in the <a id=parsing-main-inforeign:svg-namespace-2 href=infrastructure.html#svg-namespace>SVG namespace</a>, 6247 <a href=#adjust-svg-attributes id=parsing-main-inforeign:adjust-svg-attributes>adjust SVG attributes</a> for the token. (This fixes the case of SVG attributes that 6248 are not all lowercase.)</p> 6249 6250 <p><a href=#adjust-foreign-attributes id=parsing-main-inforeign:adjust-foreign-attributes>Adjust foreign attributes</a> for the token. (This fixes the use of namespaced 6251 attributes, in particular XLink in SVG.)</p> 6252 6253 <p><a href=#insert-a-foreign-element id=parsing-main-inforeign:insert-a-foreign-element>Insert a foreign element</a> for the token, in the same namespace as the 6254 <a href=#adjusted-current-node id=parsing-main-inforeign:adjusted-current-node-4>adjusted current node</a>.</p> 6255 6256 <p>If the token has its <i id=parsing-main-inforeign:self-closing-flag><a href=#self-closing-flag>self-closing flag</a></i> set, then run the appropriate steps from the 6257 following list:</p> 6258 6259 <dl class=switch><dt>If the token's tag name is "script", and the new <a href=#current-node id=parsing-main-inforeign:current-node-2>current node</a> is in the <a id=parsing-main-inforeign:svg-namespace-3 href=infrastructure.html#svg-namespace>SVG namespace</a><dd> 6260 6261 <p><a href=#acknowledge-self-closing-flag id=parsing-main-inforeign:acknowledge-self-closing-flag>Acknowledge the token's <i>self-closing 6262 flag</i></a>, and then act as described in the steps for a "script" end tag below.</p> 6263 6264 <dt>Otherwise<dd> 6265 6266 <p>Pop the <a href=#current-node id=parsing-main-inforeign:current-node-3>current node</a> off the <a href=#stack-of-open-elements id=parsing-main-inforeign:stack-of-open-elements-3>stack of open elements</a> and <a href=#acknowledge-self-closing-flag id=parsing-main-inforeign:acknowledge-self-closing-flag-2>acknowledge the token's <i>self-closing 6267 flag</i></a>.</p> 6268 6269 </dl> 6270 6271 <dt id=scriptForeignEndTag>An end tag whose tag name is "script", if the <a href=#current-node id=parsing-main-inforeign:current-node-4>current node</a> is a <code>script</code> element in the <a id=parsing-main-inforeign:svg-namespace-4 href=infrastructure.html#svg-namespace>SVG namespace</a><dd> 6272 6273 <p>Pop the <a href=#current-node id=parsing-main-inforeign:current-node-5>current node</a> off the <a href=#stack-of-open-elements id=parsing-main-inforeign:stack-of-open-elements-4>stack of open elements</a>.</p> 6274 6275 <p>Let the <var>old insertion point</var> have the same value as the current 6276 <a href=#insertion-point id=parsing-main-inforeign:insertion-point>insertion point</a>. Let the <a href=#insertion-point id=parsing-main-inforeign:insertion-point-2>insertion point</a> be just before the <a href=#next-input-character id=parsing-main-inforeign:next-input-character>next 6277 input character</a>.</p> 6278 6279 <p>Increment the parser's <a href=#script-nesting-level id=parsing-main-inforeign:script-nesting-level>script nesting level</a> by one. Set the <a href=#parser-pause-flag id=parsing-main-inforeign:parser-pause-flag>parser pause 6280 flag</a> to true.</p> 6281 6282 <p><a href=http://www.w3.org/TR/SVGMobile12/script.html#ScriptContentProcessing>Process the 6283 <code>script</code> element</a> according to the SVG rules, if the user agent supports 6284 SVG. <a href=references.html#refsSVG>[SVG]</a></p> 6285 6286 <p class=note>Even if this causes <a href=webappapis.html#dom-document-write id=parsing-main-inforeign:dom-document-write>new characters to be 6287 inserted into the tokenizer</a>, the parser will not be executed reentrantly, since the 6288 <a href=#parser-pause-flag id=parsing-main-inforeign:parser-pause-flag-2>parser pause flag</a> is true.</p> 6289 6290 <p>Decrement the parser's <a href=#script-nesting-level id=parsing-main-inforeign:script-nesting-level-2>script nesting level</a> by one. If the parser's <a href=#script-nesting-level id=parsing-main-inforeign:script-nesting-level-3>script 6291 nesting level</a> is zero, then set the <a href=#parser-pause-flag id=parsing-main-inforeign:parser-pause-flag-3>parser pause flag</a> to false.</p> 6292 6293 <p>Let the <a href=#insertion-point id=parsing-main-inforeign:insertion-point-3>insertion point</a> have the value of the <var>old insertion 6294 point</var>. (In other words, restore the <a href=#insertion-point id=parsing-main-inforeign:insertion-point-4>insertion point</a> to its previous value. 6295 This value might be the "undefined" value.)</p> 6296 6297 <dt>Any other end tag<dd> 6298 6299 <p>Run these steps:</p> 6300 6301 <ol><li><p>Initialise <var>node</var> to be the <a href=#current-node id=parsing-main-inforeign:current-node-6>current node</a> (the bottommost 6302 node of the stack).<li><p>If <var>node</var>'s tag name, <a id=parsing-main-inforeign:converted-to-ascii-lowercase href=infrastructure.html#converted-to-ascii-lowercase>converted to ASCII lowercase</a>, is 6303 not the same as the tag name of the token, then this is a <a href=#parse-error id=parsing-main-inforeign:parse-error-4>parse error</a>.<li><p><i>Loop</i>: If <var>node</var> is the topmost element in the <a href=#stack-of-open-elements id=parsing-main-inforeign:stack-of-open-elements-5>stack of 6304 open elements</a>, abort these steps. (<a href=#fragment-case id=parsing-main-inforeign:fragment-case-2>fragment case</a>)<li><p>If <var>node</var>'s tag name, <a id=parsing-main-inforeign:converted-to-ascii-lowercase-2 href=infrastructure.html#converted-to-ascii-lowercase>converted to ASCII lowercase</a>, is 6305 the same as the tag name of the token, pop elements from the <a href=#stack-of-open-elements id=parsing-main-inforeign:stack-of-open-elements-6>stack of open 6306 elements</a> until <var>node</var> has been popped from the stack, and then abort 6307 these steps.<li><p>Set <var>node</var> to the previous entry in the <a href=#stack-of-open-elements id=parsing-main-inforeign:stack-of-open-elements-7>stack of open 6308 elements</a>.<li><p>If <var>node</var> is not an element in the <a id=parsing-main-inforeign:html-namespace-2-2 href=infrastructure.html#html-namespace-2>HTML namespace</a>, return 6309 to the step labeled <i>loop</i>.<li><p>Otherwise, process the token according to the rules given in the section corresponding 6310 to the current <a href=#insertion-mode id=parsing-main-inforeign:insertion-mode>insertion mode</a> in HTML content.</ol> 6311 6312 </dl> 6313 6314 6315 6316 6317 6318 6319 <h4 id=the-end>12.2.6 The end</h4> 6320 6321 <p>Once the user agent <dfn id=stop-parsing>stops parsing</dfn> the document, the user agent 6322 must run the following steps:<div class=status><input onclick=toggleStatus(this) value= type=button><p class=support><strong>Support:</strong> <span class="chrome yes"><span>Chrome</span> <span>4+</span></span><span class="ie yes"><span>IE</span> <span>9+</span></span><span class="firefox yes"><span>Firefox</span> <span>2+</span></span><span class="and_chr yes"><span>Chrome for Android</span> <span>38+</span></span><span class="ios_saf yes"><span>iOS Safari</span> <span>3.2+</span></span><span class="android yes"><span>Android Browser</span> <span>2.1+</span></span><span class="op_mini yes"><span>Opera Mini</span> <span>5.0-8.0+</span></span><span class="and_uc yes"><span>UC Browser for Android</span> <span>9.9+</span></span><span class="safari yes"><span>Safari</span> <span>3.1+</span></span><span class="opera yes"><span>Opera</span> <span>9.5-9.6+</span></span><span class="ie_mob yes"><span>IE Mobile</span> <span>10+</span></span><span class="and_ff yes"><span>Firefox for Android</span> <span>32+</span></span><p class=caniuse>Source: <a href="http://caniuse.com/#feat=domcontentloaded">caniuse.com</a></div> 6323 6324 <ol><li><p>Set the <a id=the-end:current-document-readiness href=dom.html#current-document-readiness>current document readiness</a> to "<code>interactive</code>" 6325 and the <a href=#insertion-point id=the-end:insertion-point>insertion point</a> to 6326 undefined.<li><p>Pop <em>all</em> the nodes off the <a href=#stack-of-open-elements id=the-end:stack-of-open-elements>stack of open elements</a>.<li><p>If the <a id=the-end:list-of-scripts-that-will-execute-when-the-document-has-finished-parsing href=scripting.html#list-of-scripts-that-will-execute-when-the-document-has-finished-parsing>list of scripts that will execute when the document has finished 6327 parsing</a> is not empty, run these substeps:</p> 6328 6329 <ol><li><p><a id=the-end:spin-the-event-loop href=webappapis.html#spin-the-event-loop>Spin the event loop</a> until the first <code id=the-end:the-script-element><a href=scripting.html#the-script-element>script</a></code> in the <a id=the-end:list-of-scripts-that-will-execute-when-the-document-has-finished-parsing-2 href=scripting.html#list-of-scripts-that-will-execute-when-the-document-has-finished-parsing>list 6330 of scripts that will execute when the document has finished parsing</a> has its <a id=the-end:ready-to-be-parser-executed href=scripting.html#ready-to-be-parser-executed>"ready 6331 to be parser-executed"</a> flag set <em>and</em> the parser's <code id=the-end:document><a href=dom.html#document>Document</a></code> 6332 <a id=the-end:has-no-style-sheet-that-is-blocking-scripts href=semantics.html#has-no-style-sheet-that-is-blocking-scripts>has no style sheet that is blocking scripts</a>.<li><p><a href=scripting.html#execute-the-script-block id=the-end:execute-the-script-block>Execute</a> the first <code id=the-end:the-script-element-2><a href=scripting.html#the-script-element>script</a></code> in 6333 the <a id=the-end:list-of-scripts-that-will-execute-when-the-document-has-finished-parsing-3 href=scripting.html#list-of-scripts-that-will-execute-when-the-document-has-finished-parsing>list of scripts that will execute when the document has finished 6334 parsing</a>.<li><p>Remove the first <code id=the-end:the-script-element-3><a href=scripting.html#the-script-element>script</a></code> element from the <a id=the-end:list-of-scripts-that-will-execute-when-the-document-has-finished-parsing-4 href=scripting.html#list-of-scripts-that-will-execute-when-the-document-has-finished-parsing>list of scripts that will 6335 execute when the document has finished parsing</a> (i.e. shift out the first entry in the 6336 list).<li><p>If the <a id=the-end:list-of-scripts-that-will-execute-when-the-document-has-finished-parsing-5 href=scripting.html#list-of-scripts-that-will-execute-when-the-document-has-finished-parsing>list of scripts that will execute when the document has finished 6337 parsing</a> is still not empty, repeat these substeps again from substep 1.</p> 6338 6339 </ol> 6340 6341 <li><p><a id=the-end:queue-a-task href=webappapis.html#queue-a-task>Queue a task</a> to <a id=the-end:fire-a-simple-event href=webappapis.html#fire-a-simple-event>fire a simple event</a> that bubbles named <code id=the-end:event-domcontentloaded><a href=indices.html#event-domcontentloaded>DOMContentLoaded</a></code> at the <code id=the-end:document-2><a href=dom.html#document>Document</a></code>.<li><p><a id=the-end:spin-the-event-loop-2 href=webappapis.html#spin-the-event-loop>Spin the event loop</a> until the <a id=the-end:set-of-scripts-that-will-execute-as-soon-as-possible href=scripting.html#set-of-scripts-that-will-execute-as-soon-as-possible>set of scripts that will execute as soon 6342 as possible</a> and the <a id=the-end:list-of-scripts-that-will-execute-in-order-as-soon-as-possible href=scripting.html#list-of-scripts-that-will-execute-in-order-as-soon-as-possible>list of scripts that will execute in order as soon as 6343 possible</a> are empty.<li><p><a id=the-end:spin-the-event-loop-3 href=webappapis.html#spin-the-event-loop>Spin the event loop</a> until there is nothing that <dfn id=delay-the-load-event>delays the load event</dfn> in the <code id=the-end:document-3><a href=dom.html#document>Document</a></code>.<li> 6344 6345 <p><a id=the-end:queue-a-task-2 href=webappapis.html#queue-a-task>Queue a task</a> to run the following substeps:</p> 6346 6347 <ol><li><p>Set the <a id=the-end:current-document-readiness-2 href=dom.html#current-document-readiness>current document readiness</a> to "<code>complete</code>".<li><p><i>Load event</i>: If the <code id=the-end:document-4><a href=dom.html#document>Document</a></code> is in a <a id=the-end:browsing-context href=browsers.html#browsing-context>browsing context</a>, 6348 <a id=the-end:fire-a-simple-event-2 href=webappapis.html#fire-a-simple-event>fire a simple event</a> named <code id=the-end:event-load><a href=indices.html#event-load>load</a></code> at the 6349 <code id=the-end:document-5><a href=dom.html#document>Document</a></code>'s <code id=the-end:window><a href=browsers.html#window>Window</a></code> object, with <i id=the-end:concept-event-target-override><a href=infrastructure.html#concept-event-target-override>target override</a></i> set to the <code id=the-end:document-6><a href=dom.html#document>Document</a></code> 6350 object.</ol> 6351 6352 <li> 6353 6354 <p>If the <code id=the-end:document-7><a href=dom.html#document>Document</a></code> is in a <a id=the-end:browsing-context-2 href=browsers.html#browsing-context>browsing context</a>, then <a id=the-end:queue-a-task-3 href=webappapis.html#queue-a-task>queue a 6355 task</a> to run the following substeps:</p> 6356 6357 <ol><li><p>If the <code id=the-end:document-8><a href=dom.html#document>Document</a></code>'s <a id=the-end:page-showing href=browsers.html#page-showing>page showing</a> flag is true, then abort this 6358 task (i.e. don't fire the event below).<li><p>Set the <code id=the-end:document-9><a href=dom.html#document>Document</a></code>'s <a id=the-end:page-showing-2 href=browsers.html#page-showing>page showing</a> flag to true.<li><p><a href=infrastructure.html#concept-event-fire id=the-end:concept-event-fire>Fire</a> a <a href=infrastructure.html#concept-events-trusted id=the-end:concept-events-trusted>trusted</a> event with the name <code id=the-end:event-pageshow><a href=indices.html#event-pageshow>pageshow</a></code> at the <code id=the-end:window-2><a href=browsers.html#window>Window</a></code> object of the 6359 <code id=the-end:document-10><a href=dom.html#document>Document</a></code>, with <i id=the-end:concept-event-target-override-2><a href=infrastructure.html#concept-event-target-override>target override</a></i> set to the <code id=the-end:document-11><a href=dom.html#document>Document</a></code> 6360 object, 6361 using the <code id=the-end:pagetransitionevent><a href=browsers.html#pagetransitionevent>PageTransitionEvent</a></code> interface, with the <code id=the-end:dom-pagetransitionevent-persisted><a href=browsers.html#dom-pagetransitionevent-persisted>persisted</a></code> attribute initialised to false. This 6362 event must not bubble, must not be cancelable, and has no default action.</ol> 6363 6364 <li><p>If the <code id=the-end:document-12><a href=dom.html#document>Document</a></code> has any <a id=the-end:pending-application-cache-download-process-tasks href=browsers.html#pending-application-cache-download-process-tasks>pending application cache download process 6365 tasks</a>, then <a href=webappapis.html#queue-a-task id=the-end:queue-a-task-4>queue</a> each such <a href=webappapis.html#concept-task id=the-end:concept-task>task</a> in the order they were added to the list of <a id=the-end:pending-application-cache-download-process-tasks-2 href=browsers.html#pending-application-cache-download-process-tasks>pending 6366 application cache download process tasks</a>, and then empty the list of <a id=the-end:pending-application-cache-download-process-tasks-3 href=browsers.html#pending-application-cache-download-process-tasks>pending 6367 application cache download process tasks</a>. The <a id=the-end:task-source href=webappapis.html#task-source>task source</a> for these <a href=webappapis.html#concept-task id=the-end:concept-task-2>tasks</a> is the <a id=the-end:networking-task-source href=webappapis.html#networking-task-source>networking task source</a>.<li><p>If the <code id=the-end:document-13><a href=dom.html#document>Document</a></code>'s <a id=the-end:print-when-loaded href=webappapis.html#print-when-loaded>print when loaded</a> flag is set, then run the 6368 <a id=the-end:printing-steps href=webappapis.html#printing-steps>printing steps</a>.<li><p>The <code id=the-end:document-14><a href=dom.html#document>Document</a></code> is now <dfn id=ready-for-post-load-tasks>ready for post-load tasks</dfn>.<li><p><a id=the-end:queue-a-task-5 href=webappapis.html#queue-a-task>Queue a task</a> to mark the <code id=the-end:document-15><a href=dom.html#document>Document</a></code> as <dfn id=completely-loaded>completely 6369 loaded</dfn>.</ol> 6370 6371 <p>When the user agent is to <dfn id=abort-a-parser>abort a parser</dfn>, it must run the following steps:</p> 6372 6373 <ol><li><p>Throw away any pending content in the <a href=#input-stream id=the-end:input-stream>input stream</a>, and discard any future 6374 content that would have been added to it.<li><p>Set the <a id=the-end:current-document-readiness-3 href=dom.html#current-document-readiness>current document readiness</a> to "<code>interactive</code>".<li><p>Pop <em>all</em> the nodes off the <a href=#stack-of-open-elements id=the-end:stack-of-open-elements-2>stack of open elements</a>.<li><p>Set the <a id=the-end:current-document-readiness-4 href=dom.html#current-document-readiness>current document readiness</a> to "<code>complete</code>".</ol> 6375 6376 <p>Except where otherwise specified, the <a id=the-end:task-source-2 href=webappapis.html#task-source>task source</a> for the <a href=webappapis.html#concept-task id=the-end:concept-task-3>tasks</a> mentioned in this section is the <a id=the-end:dom-manipulation-task-source href=webappapis.html#dom-manipulation-task-source>DOM manipulation task 6377 source</a>.</p> 6378 6379 6380 6381 6382 6383 6384 <h4 id=coercing-an-html-dom-into-an-infoset>12.2.7 Coercing an HTML DOM into an infoset</h4> 6385 6386 <p>When an application uses an <a href=#html-parser id=coercing-an-html-dom-into-an-infoset:html-parser>HTML parser</a> in conjunction with an XML pipeline, it is 6387 possible that the constructed DOM is not compatible with the XML tool chain in certain subtle 6388 ways. For example, an XML toolchain might not be able to represent attributes with the name <code>xmlns</code>, since they conflict with the Namespaces in XML syntax. There is also some 6389 data that the <a href=#html-parser id=coercing-an-html-dom-into-an-infoset:html-parser-2>HTML parser</a> generates that isn't included in the DOM itself. This 6390 section specifies some rules for handling these issues.</p> 6391 6392 <p>If the XML API being used doesn't support DOCTYPEs, the tool may drop DOCTYPEs altogether.</p> 6393 6394 <p>If the XML API doesn't support attributes in no namespace that are named "<code>xmlns</code>", attributes whose names start with "<code>xmlns:</code>", or 6395 attributes in the <a id=coercing-an-html-dom-into-an-infoset:xmlns-namespace href=infrastructure.html#xmlns-namespace>XMLNS namespace</a>, then the tool may drop such attributes.</p> 6396 6397 <p>The tool may annotate the output with any namespace declarations required for proper 6398 operation.</p> 6399 6400 <p>If the XML API being used restricts the allowable characters in the local names of elements and 6401 attributes, then the tool may map all element and attribute local names that the API wouldn't 6402 support to a set of names that <em>are</em> allowed, by replacing any character that isn't 6403 supported with the uppercase letter U and the six digits of the character's Unicode code point 6404 when expressed in hexadecimal, using digits 0-9 and capital letters A-F as the symbols, in 6405 increasing numeric order.</p> 6406 6407 <p class=example>For example, the element name <code>foo<bar</code>, which can be 6408 output by the <a href=#html-parser id=coercing-an-html-dom-into-an-infoset:html-parser-3>HTML parser</a>, though it is neither a legal HTML element name nor a 6409 well-formed XML element name, would be converted into <code>fooU00003Cbar</code>, which 6410 <em>is</em> a well-formed XML element name (though it's still not legal in HTML by any means).</p> 6411 6412 <p class=example>As another example, consider the attribute <code>xlink:href</code>. 6413 Used on a MathML element, it becomes, after being <a href=#adjust-foreign-attributes id=coercing-an-html-dom-into-an-infoset:adjust-foreign-attributes>adjusted</a>, an attribute with a prefix "<code>xlink</code>" and a local 6414 name "<code>href</code>". However, used on an HTML element, it becomes an attribute with 6415 no prefix and the local name "<code>xlink:href</code>", which is not a valid NCName, and 6416 thus might not be accepted by an XML API. It could thus get converted, becoming "<code>xlinkU00003Ahref</code>".</p> 6417 6418 <p class=note>The resulting names from this conversion conveniently can't clash with any 6419 attribute generated by the <a href=#html-parser id=coercing-an-html-dom-into-an-infoset:html-parser-4>HTML parser</a>, since those are all either lowercase or those 6420 listed in the <a href=#adjust-foreign-attributes id=coercing-an-html-dom-into-an-infoset:adjust-foreign-attributes-2>adjust foreign attributes</a> algorithm's table.</p> 6421 6422 <p>If the XML API restricts comments from having two consecutive U+002D HYPHEN-MINUS characters 6423 (--), the tool may insert a single U+0020 SPACE character between any such offending 6424 characters.</p> 6425 6426 <p>If the XML API restricts comments from ending in a U+002D HYPHEN-MINUS character (-), the tool 6427 may insert a single U+0020 SPACE character at the end of such comments.</p> 6428 6429 <p>If the XML API restricts allowed characters in character data, attribute values, or comments, 6430 the tool may replace any U+000C FORM FEED (FF) character with a U+0020 SPACE character, and any 6431 other literal non-XML character with a U+FFFD REPLACEMENT CHARACTER.</p> 6432 6433 <p>If the tool has no way to convey out-of-band information, then the tool may drop the following 6434 information:</p> 6435 6436 <ul><li>Whether the document is set to <i id=coercing-an-html-dom-into-an-infoset:no-quirks-mode><a href=infrastructure.html#no-quirks-mode>no-quirks mode</a></i>, <i id=coercing-an-html-dom-into-an-infoset:limited-quirks-mode><a href=infrastructure.html#limited-quirks-mode>limited-quirks mode</a></i>, or 6437 <i id=coercing-an-html-dom-into-an-infoset:quirks-mode><a href=infrastructure.html#quirks-mode>quirks mode</a></i><li>The association between form controls and forms that aren't their nearest <code id=coercing-an-html-dom-into-an-infoset:the-form-element><a href=forms.html#the-form-element>form</a></code> 6438 element ancestor (use of the <a href=#form-element-pointer id=coercing-an-html-dom-into-an-infoset:form-element-pointer><code>form</code> element pointer</a> in the parser)<li>The <a id=coercing-an-html-dom-into-an-infoset:template-contents href=scripting.html#template-contents>template contents</a> of any <code id=coercing-an-html-dom-into-an-infoset:the-template-element><a href=scripting.html#the-template-element>template</a></code> elements.</ul> 6439 6440 <p class=note>The mutations allowed by this section apply <em>after</em> the <a href=#html-parser id=coercing-an-html-dom-into-an-infoset:html-parser-5>HTML 6441 parser</a>'s rules have been applied. For example, a <code><a::></code> start tag 6442 will be closed by a <code></a::></code> end tag, and never by a <code></aU00003AU00003A></code> end tag, even if the user agent is using the rules above to 6443 then generate an actual element in the DOM with the name <code>aU00003AU00003A</code> for 6444 that start tag.</p> 6445 6446 6447 6448 6449 6450 6451 <h4 id=an-introduction-to-error-handling-and-strange-cases-in-the-parser>12.2.8 An introduction to error handling and strange cases in the parser</h4> 6452 6453 <p><i>This section is non-normative.</i></p> 6454 6455 <p>This section examines some erroneous markup and discusses how the <a href=#html-parser id=an-introduction-to-error-handling-and-strange-cases-in-the-parser:html-parser>HTML parser</a> 6456 handles these cases.</p> 6457 6458 6459 <h5 id=misnested-tags:-b-i-/b-/i>12.2.8.1 Misnested tags: <b><i></b></i></h5> 6460 6461 <p><i>This section is non-normative.</i></p> 6462 6463 <p>The most-often discussed example of erroneous markup is as follows:</p> 6464 6465 <pre><p>1<b>2<i>3</b>4</i>5</p></pre> 6466 6467 <p>The parsing of this markup is straightforward up to the "3". At this point, the DOM looks like 6468 this:</p> 6469 6470 <ul class=domTree><li class=t1><code id=misnested-tags:-b-i-/b-/i:the-html-element><a href=semantics.html#the-html-element>html</a></code><ul><li class=t1><code id=misnested-tags:-b-i-/b-/i:the-head-element><a href=semantics.html#the-head-element>head</a></code><li class=t1><code id=misnested-tags:-b-i-/b-/i:the-body-element><a href=semantics.html#the-body-element>body</a></code><ul><li class=t1><code id=misnested-tags:-b-i-/b-/i:the-p-element><a href=semantics.html#the-p-element>p</a></code><ul><li class=t3><code id=misnested-tags:-b-i-/b-/i:text><a href=infrastructure.html#text>#text</a></code>: <span>1</span><li class=t1><code id=misnested-tags:-b-i-/b-/i:the-b-element><a href=semantics.html#the-b-element>b</a></code><ul><li class=t3><code id=misnested-tags:-b-i-/b-/i:text-2><a href=infrastructure.html#text>#text</a></code>: <span>2</span><li class=t1><code id=misnested-tags:-b-i-/b-/i:the-i-element><a href=semantics.html#the-i-element>i</a></code><ul><li class=t3><code id=misnested-tags:-b-i-/b-/i:text-3><a href=infrastructure.html#text>#text</a></code>: <span>3</span></ul></ul></ul></ul></ul></ul> 6471 6472 <p>Here, the <a href=#stack-of-open-elements id=misnested-tags:-b-i-/b-/i:stack-of-open-elements>stack of open elements</a> has five elements on it: <code id=misnested-tags:-b-i-/b-/i:the-html-element-2><a href=semantics.html#the-html-element>html</a></code>, 6473 <code id=misnested-tags:-b-i-/b-/i:the-body-element-2><a href=semantics.html#the-body-element>body</a></code>, <code id=misnested-tags:-b-i-/b-/i:the-p-element-2><a href=semantics.html#the-p-element>p</a></code>, <code id=misnested-tags:-b-i-/b-/i:the-b-element-2><a href=semantics.html#the-b-element>b</a></code>, and <code id=misnested-tags:-b-i-/b-/i:the-i-element-2><a href=semantics.html#the-i-element>i</a></code>. The <a href=#list-of-active-formatting-elements id=misnested-tags:-b-i-/b-/i:list-of-active-formatting-elements>list of active 6474 formatting elements</a> just has two: <code id=misnested-tags:-b-i-/b-/i:the-b-element-3><a href=semantics.html#the-b-element>b</a></code> and <code id=misnested-tags:-b-i-/b-/i:the-i-element-3><a href=semantics.html#the-i-element>i</a></code>. The <a href=#insertion-mode id=misnested-tags:-b-i-/b-/i:insertion-mode>insertion 6475 mode</a> is "<a href=#parsing-main-inbody id=misnested-tags:-b-i-/b-/i:parsing-main-inbody>in body</a>".</p> 6476 6477 <p>Upon receiving the end tag token with the tag name "b", the "<a href=#adoptionAgency>adoption 6478 agency algorithm</a>" is invoked. This is a simple case, in that the <var>formatting 6479 element</var> is the <code id=misnested-tags:-b-i-/b-/i:the-b-element-4><a href=semantics.html#the-b-element>b</a></code> element, and there is no <var>furthest block</var>. 6480 Thus, the <a href=#stack-of-open-elements id=misnested-tags:-b-i-/b-/i:stack-of-open-elements-2>stack of open elements</a> ends up with just three elements: <code id=misnested-tags:-b-i-/b-/i:the-html-element-3><a href=semantics.html#the-html-element>html</a></code>, 6481 <code id=misnested-tags:-b-i-/b-/i:the-body-element-3><a href=semantics.html#the-body-element>body</a></code>, and <code id=misnested-tags:-b-i-/b-/i:the-p-element-3><a href=semantics.html#the-p-element>p</a></code>, while the <a href=#list-of-active-formatting-elements id=misnested-tags:-b-i-/b-/i:list-of-active-formatting-elements-2>list of active formatting elements</a> 6482 has just one: <code id=misnested-tags:-b-i-/b-/i:the-i-element-4><a href=semantics.html#the-i-element>i</a></code>. The DOM tree is unmodified at this point.</p> 6483 6484 <p>The next token is a character ("4"), triggers the <a href=#reconstruct-the-active-formatting-elements id=misnested-tags:-b-i-/b-/i:reconstruct-the-active-formatting-elements>reconstruction of the active formatting elements</a>, in this case just 6485 the <code id=misnested-tags:-b-i-/b-/i:the-i-element-5><a href=semantics.html#the-i-element>i</a></code> element. A new <code id=misnested-tags:-b-i-/b-/i:the-i-element-6><a href=semantics.html#the-i-element>i</a></code> element is thus created for the "4" 6486 <code id=misnested-tags:-b-i-/b-/i:text-4><a href=infrastructure.html#text>Text</a></code> node. After the end tag token for the "i" is also received, and the "5" 6487 <code id=misnested-tags:-b-i-/b-/i:text-5><a href=infrastructure.html#text>Text</a></code> node is inserted, the DOM looks as follows:</p> 6488 6489 <ul class=domTree><li class=t1><code id=misnested-tags:-b-i-/b-/i:the-html-element-4><a href=semantics.html#the-html-element>html</a></code><ul><li class=t1><code id=misnested-tags:-b-i-/b-/i:the-head-element-2><a href=semantics.html#the-head-element>head</a></code><li class=t1><code id=misnested-tags:-b-i-/b-/i:the-body-element-4><a href=semantics.html#the-body-element>body</a></code><ul><li class=t1><code id=misnested-tags:-b-i-/b-/i:the-p-element-4><a href=semantics.html#the-p-element>p</a></code><ul><li class=t3><code id=misnested-tags:-b-i-/b-/i:text-6><a href=infrastructure.html#text>#text</a></code>: <span>1</span><li class=t1><code id=misnested-tags:-b-i-/b-/i:the-b-element-5><a href=semantics.html#the-b-element>b</a></code><ul><li class=t3><code id=misnested-tags:-b-i-/b-/i:text-7><a href=infrastructure.html#text>#text</a></code>: <span>2</span><li class=t1><code id=misnested-tags:-b-i-/b-/i:the-i-element-7><a href=semantics.html#the-i-element>i</a></code><ul><li class=t3><code id=misnested-tags:-b-i-/b-/i:text-8><a href=infrastructure.html#text>#text</a></code>: <span>3</span></ul></ul><li class=t1><code id=misnested-tags:-b-i-/b-/i:the-i-element-8><a href=semantics.html#the-i-element>i</a></code><ul><li class=t3><code id=misnested-tags:-b-i-/b-/i:text-9><a href=infrastructure.html#text>#text</a></code>: <span>4</span></ul><li class=t3><code id=misnested-tags:-b-i-/b-/i:text-10><a href=infrastructure.html#text>#text</a></code>: <span>5</span></ul></ul></ul></ul> 6490 6491 6492 <h5 id=misnested-tags:-b-p-/b-/p>12.2.8.2 Misnested tags: <b><p></b></p></h5> 6493 6494 <p><i>This section is non-normative.</i></p> 6495 6496 <p>A case similar to the previous one is the following:</p> 6497 6498 <pre><b>1<p>2</b>3</p></pre> 6499 6500 <p>Up to the "2" the parsing here is straightforward:</p> 6501 6502 <ul class=domTree><li class=t1><code id=misnested-tags:-b-p-/b-/p:the-html-element><a href=semantics.html#the-html-element>html</a></code><ul><li class=t1><code id=misnested-tags:-b-p-/b-/p:the-head-element><a href=semantics.html#the-head-element>head</a></code><li class=t1><code id=misnested-tags:-b-p-/b-/p:the-body-element><a href=semantics.html#the-body-element>body</a></code><ul><li class=t1><code id=misnested-tags:-b-p-/b-/p:the-b-element><a href=semantics.html#the-b-element>b</a></code><ul><li class=t3><code id=misnested-tags:-b-p-/b-/p:text><a href=infrastructure.html#text>#text</a></code>: <span>1</span><li class=t1><code id=misnested-tags:-b-p-/b-/p:the-p-element><a href=semantics.html#the-p-element>p</a></code><ul><li class=t3><code id=misnested-tags:-b-p-/b-/p:text-2><a href=infrastructure.html#text>#text</a></code>: <span>2</span></ul></ul></ul></ul></ul> 6503 6504 <p>The interesting part is when the end tag token with the tag name "b" is parsed.</p> 6505 6506 <p>Before that token is seen, the <a href=#stack-of-open-elements id=misnested-tags:-b-p-/b-/p:stack-of-open-elements>stack of open elements</a> has four elements on it: 6507 <code id=misnested-tags:-b-p-/b-/p:the-html-element-2><a href=semantics.html#the-html-element>html</a></code>, <code id=misnested-tags:-b-p-/b-/p:the-body-element-2><a href=semantics.html#the-body-element>body</a></code>, <code id=misnested-tags:-b-p-/b-/p:the-b-element-2><a href=semantics.html#the-b-element>b</a></code>, and <code id=misnested-tags:-b-p-/b-/p:the-p-element-2><a href=semantics.html#the-p-element>p</a></code>. The <a href=#list-of-active-formatting-elements id=misnested-tags:-b-p-/b-/p:list-of-active-formatting-elements>list of active 6508 formatting elements</a> just has the one: <code id=misnested-tags:-b-p-/b-/p:the-b-element-3><a href=semantics.html#the-b-element>b</a></code>. The <a href=#insertion-mode id=misnested-tags:-b-p-/b-/p:insertion-mode>insertion mode</a> is 6509 "<a href=#parsing-main-inbody id=misnested-tags:-b-p-/b-/p:parsing-main-inbody>in body</a>".</p> 6510 6511 <p>Upon receiving the end tag token with the tag name "b", the "<a href=#adoptionAgency>adoption 6512 agency algorithm</a>" is invoked, as in the previous example. However, in this case, there 6513 <em>is</em> a <var>furthest block</var>, namely the <code id=misnested-tags:-b-p-/b-/p:the-p-element-3><a href=semantics.html#the-p-element>p</a></code> element. Thus, this 6514 time the adoption agency algorithm isn't skipped over.</p> 6515 6516 <p>The <var>common ancestor</var> is the <code id=misnested-tags:-b-p-/b-/p:the-body-element-3><a href=semantics.html#the-body-element>body</a></code> element. A conceptual 6517 "bookmark" marks the position of the <code id=misnested-tags:-b-p-/b-/p:the-b-element-4><a href=semantics.html#the-b-element>b</a></code> in the <a href=#list-of-active-formatting-elements id=misnested-tags:-b-p-/b-/p:list-of-active-formatting-elements-2>list of active formatting 6518 elements</a>, but since that list has only one element in it, the bookmark won't have much 6519 effect.</p> 6520 6521 <p>As the algorithm progresses, <var>node</var> ends up set to the formatting element 6522 (<code id=misnested-tags:-b-p-/b-/p:the-b-element-5><a href=semantics.html#the-b-element>b</a></code>), and <var>last node</var> ends up set to the <var>furthest 6523 block</var> (<code id=misnested-tags:-b-p-/b-/p:the-p-element-4><a href=semantics.html#the-p-element>p</a></code>).</p> 6524 6525 <p>The <var>last node</var> gets appended (moved) to the <var>common 6526 ancestor</var>, so that the DOM looks like:</p> 6527 6528 <ul class=domTree><li class=t1><code id=misnested-tags:-b-p-/b-/p:the-html-element-3><a href=semantics.html#the-html-element>html</a></code><ul><li class=t1><code id=misnested-tags:-b-p-/b-/p:the-head-element-2><a href=semantics.html#the-head-element>head</a></code><li class=t1><code id=misnested-tags:-b-p-/b-/p:the-body-element-4><a href=semantics.html#the-body-element>body</a></code><ul><li class=t1><code id=misnested-tags:-b-p-/b-/p:the-b-element-6><a href=semantics.html#the-b-element>b</a></code><ul><li class=t3><code id=misnested-tags:-b-p-/b-/p:text-3><a href=infrastructure.html#text>#text</a></code>: <span>1</span></ul><li class=t1><code id=misnested-tags:-b-p-/b-/p:the-p-element-5><a href=semantics.html#the-p-element>p</a></code><ul><li class=t3><code id=misnested-tags:-b-p-/b-/p:text-4><a href=infrastructure.html#text>#text</a></code>: <span>2</span></ul></ul></ul></ul> 6529 6530 <p>A new <code id=misnested-tags:-b-p-/b-/p:the-b-element-7><a href=semantics.html#the-b-element>b</a></code> element is created, and the children of the <code id=misnested-tags:-b-p-/b-/p:the-p-element-6><a href=semantics.html#the-p-element>p</a></code> element are 6531 moved to it:</p> 6532 6533 <ul class=domTree><li class=t1><code id=misnested-tags:-b-p-/b-/p:the-html-element-4><a href=semantics.html#the-html-element>html</a></code><ul><li class=t1><code id=misnested-tags:-b-p-/b-/p:the-head-element-3><a href=semantics.html#the-head-element>head</a></code><li class=t1><code id=misnested-tags:-b-p-/b-/p:the-body-element-5><a href=semantics.html#the-body-element>body</a></code><ul><li class=t1><code id=misnested-tags:-b-p-/b-/p:the-b-element-8><a href=semantics.html#the-b-element>b</a></code><ul><li class=t3><code id=misnested-tags:-b-p-/b-/p:text-5><a href=infrastructure.html#text>#text</a></code>: <span>1</span></ul><li class=t1><code id=misnested-tags:-b-p-/b-/p:the-p-element-7><a href=semantics.html#the-p-element>p</a></code></ul></ul></ul> 6534 <ul class=domTree><li class=t1><code id=misnested-tags:-b-p-/b-/p:the-b-element-9><a href=semantics.html#the-b-element>b</a></code><ul><li class=t3><code id=misnested-tags:-b-p-/b-/p:text-6><a href=infrastructure.html#text>#text</a></code>: <span>2</span></ul></ul> 6535 6536 <p>Finally, the new <code id=misnested-tags:-b-p-/b-/p:the-b-element-10><a href=semantics.html#the-b-element>b</a></code> element is appended to the <code id=misnested-tags:-b-p-/b-/p:the-p-element-8><a href=semantics.html#the-p-element>p</a></code> element, so that the 6537 DOM looks like:</p> 6538 6539 <ul class=domTree><li class=t1><code id=misnested-tags:-b-p-/b-/p:the-html-element-5><a href=semantics.html#the-html-element>html</a></code><ul><li class=t1><code id=misnested-tags:-b-p-/b-/p:the-head-element-4><a href=semantics.html#the-head-element>head</a></code><li class=t1><code id=misnested-tags:-b-p-/b-/p:the-body-element-6><a href=semantics.html#the-body-element>body</a></code><ul><li class=t1><code id=misnested-tags:-b-p-/b-/p:the-b-element-11><a href=semantics.html#the-b-element>b</a></code><ul><li class=t3><code id=misnested-tags:-b-p-/b-/p:text-7><a href=infrastructure.html#text>#text</a></code>: <span>1</span></ul><li class=t1><code id=misnested-tags:-b-p-/b-/p:the-p-element-9><a href=semantics.html#the-p-element>p</a></code><ul><li class=t1><code id=misnested-tags:-b-p-/b-/p:the-b-element-12><a href=semantics.html#the-b-element>b</a></code><ul><li class=t3><code id=misnested-tags:-b-p-/b-/p:text-8><a href=infrastructure.html#text>#text</a></code>: <span>2</span></ul></ul></ul></ul></ul> 6540 6541 <p>The <code id=misnested-tags:-b-p-/b-/p:the-b-element-13><a href=semantics.html#the-b-element>b</a></code> element is removed from the <a href=#list-of-active-formatting-elements id=misnested-tags:-b-p-/b-/p:list-of-active-formatting-elements-3>list of active formatting elements</a> 6542 and the <a href=#stack-of-open-elements id=misnested-tags:-b-p-/b-/p:stack-of-open-elements-2>stack of open elements</a>, so that when the "3" is parsed, it is appended to the 6543 <code id=misnested-tags:-b-p-/b-/p:the-p-element-10><a href=semantics.html#the-p-element>p</a></code> element:</p> 6544 6545 <ul class=domTree><li class=t1><code id=misnested-tags:-b-p-/b-/p:the-html-element-6><a href=semantics.html#the-html-element>html</a></code><ul><li class=t1><code id=misnested-tags:-b-p-/b-/p:the-head-element-5><a href=semantics.html#the-head-element>head</a></code><li class=t1><code id=misnested-tags:-b-p-/b-/p:the-body-element-7><a href=semantics.html#the-body-element>body</a></code><ul><li class=t1><code id=misnested-tags:-b-p-/b-/p:the-b-element-14><a href=semantics.html#the-b-element>b</a></code><ul><li class=t3><code id=misnested-tags:-b-p-/b-/p:text-9><a href=infrastructure.html#text>#text</a></code>: <span>1</span></ul><li class=t1><code id=misnested-tags:-b-p-/b-/p:the-p-element-11><a href=semantics.html#the-p-element>p</a></code><ul><li class=t1><code id=misnested-tags:-b-p-/b-/p:the-b-element-15><a href=semantics.html#the-b-element>b</a></code><ul><li class=t3><code id=misnested-tags:-b-p-/b-/p:text-10><a href=infrastructure.html#text>#text</a></code>: <span>2</span></ul><li class=t3><code id=misnested-tags:-b-p-/b-/p:text-11><a href=infrastructure.html#text>#text</a></code>: <span>3</span></ul></ul></ul></ul> 6546 6547 6548 <h5 id=unexpected-markup-in-tables>12.2.8.3 Unexpected markup in tables</h5> 6549 6550 <p><i>This section is non-normative.</i></p> 6551 6552 <p>Error handling in tables is, for historical reasons, especially strange. For example, consider 6553 the following markup:</p> 6554 6555 <pre><table><strong><b></strong><tr><td>aaa</td></tr><strong>bbb</strong></table>ccc</pre> 6556 6557 <p>The highlighted <code id=unexpected-markup-in-tables:the-b-element><a href=semantics.html#the-b-element>b</a></code> element start tag is not allowed directly inside a table like 6558 that, and the parser handles this case by placing the element <em>before</em> the table. (This is 6559 called <i id=unexpected-markup-in-tables:foster-parent><a href=#foster-parent>foster parenting</a></i>.) This can be seen by examining the DOM tree 6560 as it stands just after the <code id=unexpected-markup-in-tables:the-table-element><a href=tables.html#the-table-element>table</a></code> element's start tag has been seen:</p> 6561 6562 <ul class=domTree><li class=t1><code id=unexpected-markup-in-tables:the-html-element><a href=semantics.html#the-html-element>html</a></code><ul><li class=t1><code id=unexpected-markup-in-tables:the-head-element><a href=semantics.html#the-head-element>head</a></code><li class=t1><code id=unexpected-markup-in-tables:the-body-element><a href=semantics.html#the-body-element>body</a></code><ul><li class=t1><code id=unexpected-markup-in-tables:the-table-element-2><a href=tables.html#the-table-element>table</a></code></ul></ul></ul> 6563 6564 <p>...and then immediately after the <code id=unexpected-markup-in-tables:the-b-element-2><a href=semantics.html#the-b-element>b</a></code> element start tag has been seen:</p> 6565 6566 <ul class=domTree><li class=t1><code id=unexpected-markup-in-tables:the-html-element-2><a href=semantics.html#the-html-element>html</a></code><ul><li class=t1><code id=unexpected-markup-in-tables:the-head-element-2><a href=semantics.html#the-head-element>head</a></code><li class=t1><code id=unexpected-markup-in-tables:the-body-element-2><a href=semantics.html#the-body-element>body</a></code><ul><li class=t1><code id=unexpected-markup-in-tables:the-b-element-3><a href=semantics.html#the-b-element>b</a></code><li class=t1><code id=unexpected-markup-in-tables:the-table-element-3><a href=tables.html#the-table-element>table</a></code></ul></ul></ul> 6567 6568 <p>At this point, the <a href=#stack-of-open-elements id=unexpected-markup-in-tables:stack-of-open-elements>stack of open elements</a> has on it the elements 6569 <code id=unexpected-markup-in-tables:the-html-element-3><a href=semantics.html#the-html-element>html</a></code>, <code id=unexpected-markup-in-tables:the-body-element-3><a href=semantics.html#the-body-element>body</a></code>, <code id=unexpected-markup-in-tables:the-table-element-4><a href=tables.html#the-table-element>table</a></code>, and <code id=unexpected-markup-in-tables:the-b-element-4><a href=semantics.html#the-b-element>b</a></code> (in that order, 6570 despite the resulting DOM tree); the <a href=#list-of-active-formatting-elements id=unexpected-markup-in-tables:list-of-active-formatting-elements>list of active formatting elements</a> just has the 6571 <code id=unexpected-markup-in-tables:the-b-element-5><a href=semantics.html#the-b-element>b</a></code> element in it; and the <a href=#insertion-mode id=unexpected-markup-in-tables:insertion-mode>insertion mode</a> is "<a href=#parsing-main-intable id=unexpected-markup-in-tables:parsing-main-intable>in table</a>".</p> 6572 6573 <p>The <code id=unexpected-markup-in-tables:the-tr-element><a href=tables.html#the-tr-element>tr</a></code> start tag causes the <code id=unexpected-markup-in-tables:the-b-element-6><a href=semantics.html#the-b-element>b</a></code> element to be popped off the stack and 6574 a <code id=unexpected-markup-in-tables:the-tbody-element><a href=tables.html#the-tbody-element>tbody</a></code> start tag to be implied; the <code id=unexpected-markup-in-tables:the-tbody-element-2><a href=tables.html#the-tbody-element>tbody</a></code> and <code id=unexpected-markup-in-tables:the-tr-element-2><a href=tables.html#the-tr-element>tr</a></code> elements 6575 are then handled in a rather straight-forward manner, taking the parser through the "<a href=#parsing-main-intbody id=unexpected-markup-in-tables:parsing-main-intbody>in table body</a>" and "<a href=#parsing-main-intr id=unexpected-markup-in-tables:parsing-main-intr>in row</a>" insertion modes, after which the DOM looks as follows:</p> 6576 6577 <ul class=domTree><li class=t1><code id=unexpected-markup-in-tables:the-html-element-4><a href=semantics.html#the-html-element>html</a></code><ul><li class=t1><code id=unexpected-markup-in-tables:the-head-element-3><a href=semantics.html#the-head-element>head</a></code><li class=t1><code id=unexpected-markup-in-tables:the-body-element-4><a href=semantics.html#the-body-element>body</a></code><ul><li class=t1><code id=unexpected-markup-in-tables:the-b-element-7><a href=semantics.html#the-b-element>b</a></code><li class=t1><code id=unexpected-markup-in-tables:the-table-element-5><a href=tables.html#the-table-element>table</a></code><ul><li class=t1><code id=unexpected-markup-in-tables:the-tbody-element-3><a href=tables.html#the-tbody-element>tbody</a></code><ul><li class=t1><code id=unexpected-markup-in-tables:the-tr-element-3><a href=tables.html#the-tr-element>tr</a></code></ul></ul></ul></ul></ul> 6578 6579 <p>Here, the <a href=#stack-of-open-elements id=unexpected-markup-in-tables:stack-of-open-elements-2>stack of open elements</a> has on it the elements <code id=unexpected-markup-in-tables:the-html-element-5><a href=semantics.html#the-html-element>html</a></code>, 6580 <code id=unexpected-markup-in-tables:the-body-element-5><a href=semantics.html#the-body-element>body</a></code>, <code id=unexpected-markup-in-tables:the-table-element-6><a href=tables.html#the-table-element>table</a></code>, <code id=unexpected-markup-in-tables:the-tbody-element-4><a href=tables.html#the-tbody-element>tbody</a></code>, and <code id=unexpected-markup-in-tables:the-tr-element-4><a href=tables.html#the-tr-element>tr</a></code>; the <a href=#list-of-active-formatting-elements id=unexpected-markup-in-tables:list-of-active-formatting-elements-2>list of 6581 active formatting elements</a> still has the <code id=unexpected-markup-in-tables:the-b-element-8><a href=semantics.html#the-b-element>b</a></code> element in it; and the 6582 <a href=#insertion-mode id=unexpected-markup-in-tables:insertion-mode-2>insertion mode</a> is "<a href=#parsing-main-intr id=unexpected-markup-in-tables:parsing-main-intr-2>in row</a>".</p> 6583 6584 <p>The <code id=unexpected-markup-in-tables:the-td-element><a href=tables.html#the-td-element>td</a></code> element start tag token, after putting a <code id=unexpected-markup-in-tables:the-td-element-2><a href=tables.html#the-td-element>td</a></code> element on the 6585 tree, puts a <a href=#concept-parser-marker id=unexpected-markup-in-tables:concept-parser-marker>marker</a> on the <a href=#list-of-active-formatting-elements id=unexpected-markup-in-tables:list-of-active-formatting-elements-3>list of active 6586 formatting elements</a> (it also switches to the "<a href=#parsing-main-intd id=unexpected-markup-in-tables:parsing-main-intd>in 6587 cell</a>" <a href=#insertion-mode id=unexpected-markup-in-tables:insertion-mode-3>insertion mode</a>).</p> 6588 6589 <ul class=domTree><li class=t1><code id=unexpected-markup-in-tables:the-html-element-6><a href=semantics.html#the-html-element>html</a></code><ul><li class=t1><code id=unexpected-markup-in-tables:the-head-element-4><a href=semantics.html#the-head-element>head</a></code><li class=t1><code id=unexpected-markup-in-tables:the-body-element-6><a href=semantics.html#the-body-element>body</a></code><ul><li class=t1><code id=unexpected-markup-in-tables:the-b-element-9><a href=semantics.html#the-b-element>b</a></code><li class=t1><code id=unexpected-markup-in-tables:the-table-element-7><a href=tables.html#the-table-element>table</a></code><ul><li class=t1><code id=unexpected-markup-in-tables:the-tbody-element-5><a href=tables.html#the-tbody-element>tbody</a></code><ul><li class=t1><code id=unexpected-markup-in-tables:the-tr-element-5><a href=tables.html#the-tr-element>tr</a></code><ul><li class=t1><code id=unexpected-markup-in-tables:the-td-element-3><a href=tables.html#the-td-element>td</a></code></ul></ul></ul></ul></ul></ul> 6590 6591 <p>The <a href=#concept-parser-marker id=unexpected-markup-in-tables:concept-parser-marker-2>marker</a> means that when the "aaa" character 6592 tokens are seen, no <code id=unexpected-markup-in-tables:the-b-element-10><a href=semantics.html#the-b-element>b</a></code> element is created to hold the resulting <code id=unexpected-markup-in-tables:text><a href=infrastructure.html#text>Text</a></code> 6593 node:</p> 6594 6595 <ul class=domTree><li class=t1><code id=unexpected-markup-in-tables:the-html-element-7><a href=semantics.html#the-html-element>html</a></code><ul><li class=t1><code id=unexpected-markup-in-tables:the-head-element-5><a href=semantics.html#the-head-element>head</a></code><li class=t1><code id=unexpected-markup-in-tables:the-body-element-7><a href=semantics.html#the-body-element>body</a></code><ul><li class=t1><code id=unexpected-markup-in-tables:the-b-element-11><a href=semantics.html#the-b-element>b</a></code><li class=t1><code id=unexpected-markup-in-tables:the-table-element-8><a href=tables.html#the-table-element>table</a></code><ul><li class=t1><code id=unexpected-markup-in-tables:the-tbody-element-6><a href=tables.html#the-tbody-element>tbody</a></code><ul><li class=t1><code id=unexpected-markup-in-tables:the-tr-element-6><a href=tables.html#the-tr-element>tr</a></code><ul><li class=t1><code id=unexpected-markup-in-tables:the-td-element-4><a href=tables.html#the-td-element>td</a></code><ul><li class=t3><code id=unexpected-markup-in-tables:text-2><a href=infrastructure.html#text>#text</a></code>: <span>aaa</span></ul></ul></ul></ul></ul></ul></ul> 6596 6597 <p>The end tags are handled in a straight-forward manner; after handling them, the <a href=#stack-of-open-elements id=unexpected-markup-in-tables:stack-of-open-elements-3>stack of 6598 open elements</a> has on it the elements <code id=unexpected-markup-in-tables:the-html-element-8><a href=semantics.html#the-html-element>html</a></code>, <code id=unexpected-markup-in-tables:the-body-element-8><a href=semantics.html#the-body-element>body</a></code>, 6599 <code id=unexpected-markup-in-tables:the-table-element-9><a href=tables.html#the-table-element>table</a></code>, and <code id=unexpected-markup-in-tables:the-tbody-element-7><a href=tables.html#the-tbody-element>tbody</a></code>; the <a href=#list-of-active-formatting-elements id=unexpected-markup-in-tables:list-of-active-formatting-elements-4>list of active formatting elements</a> 6600 still has the <code id=unexpected-markup-in-tables:the-b-element-12><a href=semantics.html#the-b-element>b</a></code> element in it (the <a href=#concept-parser-marker id=unexpected-markup-in-tables:concept-parser-marker-3>marker</a> 6601 having been removed by the "td" end tag token); and the <a href=#insertion-mode id=unexpected-markup-in-tables:insertion-mode-4>insertion mode</a> is "<a href=#parsing-main-intbody id=unexpected-markup-in-tables:parsing-main-intbody-2>in table body</a>".</p> 6602 6603 <p>Thus it is that the "bbb" character tokens are found. These trigger the "<a href=#parsing-main-intabletext id=unexpected-markup-in-tables:parsing-main-intabletext>in table text</a>" insertion mode to be used (with the <a href=#original-insertion-mode id=unexpected-markup-in-tables:original-insertion-mode>original 6604 insertion mode</a> set to "<a href=#parsing-main-intbody id=unexpected-markup-in-tables:parsing-main-intbody-3>in table body</a>"). 6605 The character tokens are collected, and when the next token (the <code id=unexpected-markup-in-tables:the-table-element-10><a href=tables.html#the-table-element>table</a></code> element end 6606 tag) is seen, they are processed as a group. Since they are not all spaces, they are handled as 6607 per the "anything else" rules in the "<a href=#parsing-main-intable id=unexpected-markup-in-tables:parsing-main-intable-2>in table</a>" 6608 insertion mode, which defer to the "<a href=#parsing-main-inbody id=unexpected-markup-in-tables:parsing-main-inbody>in body</a>" 6609 insertion mode but with <a href=#foster-parent id=unexpected-markup-in-tables:foster-parent-2>foster parenting</a>.</p> 6610 6611 <p>When <a href=#reconstruct-the-active-formatting-elements id=unexpected-markup-in-tables:reconstruct-the-active-formatting-elements>the active formatting elements 6612 are reconstructed</a>, a <code id=unexpected-markup-in-tables:the-b-element-13><a href=semantics.html#the-b-element>b</a></code> element is created and <a href=#foster-parent id=unexpected-markup-in-tables:foster-parent-3>foster parented</a>, and then the "bbb" <code id=unexpected-markup-in-tables:text-3><a href=infrastructure.html#text>Text</a></code> node is appended to it:</p> 6613 6614 <ul class=domTree><li class=t1><code id=unexpected-markup-in-tables:the-html-element-9><a href=semantics.html#the-html-element>html</a></code><ul><li class=t1><code id=unexpected-markup-in-tables:the-head-element-6><a href=semantics.html#the-head-element>head</a></code><li class=t1><code id=unexpected-markup-in-tables:the-body-element-9><a href=semantics.html#the-body-element>body</a></code><ul><li class=t1><code id=unexpected-markup-in-tables:the-b-element-14><a href=semantics.html#the-b-element>b</a></code><li class=t1><code id=unexpected-markup-in-tables:the-b-element-15><a href=semantics.html#the-b-element>b</a></code><ul><li class=t3><code id=unexpected-markup-in-tables:text-4><a href=infrastructure.html#text>#text</a></code>: <span>bbb</span></ul><li class=t1><code id=unexpected-markup-in-tables:the-table-element-11><a href=tables.html#the-table-element>table</a></code><ul><li class=t1><code id=unexpected-markup-in-tables:the-tbody-element-8><a href=tables.html#the-tbody-element>tbody</a></code><ul><li class=t1><code id=unexpected-markup-in-tables:the-tr-element-7><a href=tables.html#the-tr-element>tr</a></code><ul><li class=t1><code id=unexpected-markup-in-tables:the-td-element-5><a href=tables.html#the-td-element>td</a></code><ul><li class=t3><code id=unexpected-markup-in-tables:text-5><a href=infrastructure.html#text>#text</a></code>: <span>aaa</span></ul></ul></ul></ul></ul></ul></ul> 6615 6616 <p>The <a href=#stack-of-open-elements id=unexpected-markup-in-tables:stack-of-open-elements-4>stack of open elements</a> has on it the elements <code id=unexpected-markup-in-tables:the-html-element-10><a href=semantics.html#the-html-element>html</a></code>, 6617 <code id=unexpected-markup-in-tables:the-body-element-10><a href=semantics.html#the-body-element>body</a></code>, <code id=unexpected-markup-in-tables:the-table-element-12><a href=tables.html#the-table-element>table</a></code>, <code id=unexpected-markup-in-tables:the-tbody-element-9><a href=tables.html#the-tbody-element>tbody</a></code>, and the new <code id=unexpected-markup-in-tables:the-b-element-16><a href=semantics.html#the-b-element>b</a></code> (again, note 6618 that this doesn't match the resulting tree!); the <a href=#list-of-active-formatting-elements id=unexpected-markup-in-tables:list-of-active-formatting-elements-5>list of active formatting elements</a> 6619 has the new <code id=unexpected-markup-in-tables:the-b-element-17><a href=semantics.html#the-b-element>b</a></code> element in it; and the <a href=#insertion-mode id=unexpected-markup-in-tables:insertion-mode-5>insertion mode</a> is still "<a href=#parsing-main-intbody id=unexpected-markup-in-tables:parsing-main-intbody-4>in table body</a>".</p> 6620 6621 <p>Had the character tokens been only <a href=infrastructure.html#space-character id=unexpected-markup-in-tables:space-character>space characters</a> 6622 instead of "bbb", then those <a href=infrastructure.html#space-character id=unexpected-markup-in-tables:space-character-2>space characters</a> would just be 6623 appended to the <code id=unexpected-markup-in-tables:the-tbody-element-10><a href=tables.html#the-tbody-element>tbody</a></code> element.</p> 6624 6625 <p>Finally, the <code id=unexpected-markup-in-tables:the-table-element-13><a href=tables.html#the-table-element>table</a></code> is closed by a "table" end tag. This pops all the nodes from 6626 the <a href=#stack-of-open-elements id=unexpected-markup-in-tables:stack-of-open-elements-5>stack of open elements</a> up to and including the <code id=unexpected-markup-in-tables:the-table-element-14><a href=tables.html#the-table-element>table</a></code> element, but it 6627 doesn't affect the <a href=#list-of-active-formatting-elements id=unexpected-markup-in-tables:list-of-active-formatting-elements-6>list of active formatting elements</a>, so the "ccc" character tokens 6628 after the table result in yet another <code id=unexpected-markup-in-tables:the-b-element-18><a href=semantics.html#the-b-element>b</a></code> element being created, this time after the 6629 table:</p> 6630 6631 <ul class=domTree><li class=t1><code id=unexpected-markup-in-tables:the-html-element-11><a href=semantics.html#the-html-element>html</a></code><ul><li class=t1><code id=unexpected-markup-in-tables:the-head-element-7><a href=semantics.html#the-head-element>head</a></code><li class=t1><code id=unexpected-markup-in-tables:the-body-element-11><a href=semantics.html#the-body-element>body</a></code><ul><li class=t1><code id=unexpected-markup-in-tables:the-b-element-19><a href=semantics.html#the-b-element>b</a></code><li class=t1><code id=unexpected-markup-in-tables:the-b-element-20><a href=semantics.html#the-b-element>b</a></code><ul><li class=t3><code id=unexpected-markup-in-tables:text-6><a href=infrastructure.html#text>#text</a></code>: <span>bbb</span></ul><li class=t1><code id=unexpected-markup-in-tables:the-table-element-15><a href=tables.html#the-table-element>table</a></code><ul><li class=t1><code id=unexpected-markup-in-tables:the-tbody-element-11><a href=tables.html#the-tbody-element>tbody</a></code><ul><li class=t1><code id=unexpected-markup-in-tables:the-tr-element-8><a href=tables.html#the-tr-element>tr</a></code><ul><li class=t1><code id=unexpected-markup-in-tables:the-td-element-6><a href=tables.html#the-td-element>td</a></code><ul><li class=t3><code id=unexpected-markup-in-tables:text-7><a href=infrastructure.html#text>#text</a></code>: <span>aaa</span></ul></ul></ul></ul><li class=t1><code id=unexpected-markup-in-tables:the-b-element-21><a href=semantics.html#the-b-element>b</a></code><ul><li class=t3><code id=unexpected-markup-in-tables:text-8><a href=infrastructure.html#text>#text</a></code>: <span>ccc</span></ul></ul></ul></ul> 6632 6633 6634 <h5 id=scripts-that-modify-the-page-as-it-is-being-parsed>12.2.8.4 Scripts that modify the page as it is being parsed</h5> 6635 6636 <p><i>This section is non-normative.</i></p> 6637 6638 <p>Consider the following markup, which for this example we will assume is the document with 6639 <a id=scripts-that-modify-the-page-as-it-is-being-parsed:url href=infrastructure.html#url>URL</a> <code>http://example.com/inner</code>, being rendered as the content of 6640 an <code id=scripts-that-modify-the-page-as-it-is-being-parsed:the-iframe-element><a href=embedded-content.html#the-iframe-element>iframe</a></code> in another document with the <a id=scripts-that-modify-the-page-as-it-is-being-parsed:url-2 href=infrastructure.html#url>URL</a> <code>http://example.com/outer</code>:</p> 6641 6642 <pre><div id=a> 6643 <script> 6644 var div = document.getElementById('a'); 6645 parent.document.body.appendChild(div); 6646 </script> 6647 <script> 6648 alert(document.URL); 6649 </script> 6650 </div> 6651 <script> 6652 alert(document.URL); 6653 </script></pre> 6654 6655 <p>Up to the first "script" end tag, before the script is parsed, the result is relatively 6656 straightforward:</p> 6657 6658 <ul class=domTree><li class=t1><code id=scripts-that-modify-the-page-as-it-is-being-parsed:the-html-element><a href=semantics.html#the-html-element>html</a></code><ul><li class=t1><code id=scripts-that-modify-the-page-as-it-is-being-parsed:the-head-element><a href=semantics.html#the-head-element>head</a></code><li class=t1><code id=scripts-that-modify-the-page-as-it-is-being-parsed:the-body-element><a href=semantics.html#the-body-element>body</a></code><ul><li class=t1><code id=scripts-that-modify-the-page-as-it-is-being-parsed:the-div-element><a href=semantics.html#the-div-element>div</a></code> <span class=t2><code id=scripts-that-modify-the-page-as-it-is-being-parsed:the-id-attribute class="attribute name"><a href=dom.html#the-id-attribute>id</a></code>="<code class="attribute value">a</code>"</span><ul><li class=t3><code id=scripts-that-modify-the-page-as-it-is-being-parsed:text><a href=infrastructure.html#text>#text</a></code>: <span> 6659 </span><li class=t1><code id=scripts-that-modify-the-page-as-it-is-being-parsed:the-script-element><a href=scripting.html#the-script-element>script</a></code><ul><li class=t3><code id=scripts-that-modify-the-page-as-it-is-being-parsed:text-2><a href=infrastructure.html#text>#text</a></code>: <span>var div = document.getElementById('a'); parent.document.body.appendChild(div);</span></ul></ul></ul></ul></ul> 6660 6661 <p>After the script is parsed, though, the <code id=scripts-that-modify-the-page-as-it-is-being-parsed:the-div-element-2><a href=semantics.html#the-div-element>div</a></code> element and its child 6662 <code id=scripts-that-modify-the-page-as-it-is-being-parsed:the-script-element-2><a href=scripting.html#the-script-element>script</a></code> element are gone:</p> 6663 6664 <ul class=domTree><li class=t1><code id=scripts-that-modify-the-page-as-it-is-being-parsed:the-html-element-2><a href=semantics.html#the-html-element>html</a></code><ul><li class=t1><code id=scripts-that-modify-the-page-as-it-is-being-parsed:the-head-element-2><a href=semantics.html#the-head-element>head</a></code><li class=t1><code id=scripts-that-modify-the-page-as-it-is-being-parsed:the-body-element-2><a href=semantics.html#the-body-element>body</a></code></ul></ul> 6665 6666 <p>They are, at this point, in the <code id=scripts-that-modify-the-page-as-it-is-being-parsed:document><a href=dom.html#document>Document</a></code> of the aforementioned outer 6667 <a id=scripts-that-modify-the-page-as-it-is-being-parsed:browsing-context href=browsers.html#browsing-context>browsing context</a>. However, the <a href=#stack-of-open-elements id=scripts-that-modify-the-page-as-it-is-being-parsed:stack-of-open-elements>stack of open elements</a> <em>still contains 6668 the <code id=scripts-that-modify-the-page-as-it-is-being-parsed:the-div-element-3><a href=semantics.html#the-div-element>div</a></code> element</em>.</p> 6669 6670 <p>Thus, when the second <code id=scripts-that-modify-the-page-as-it-is-being-parsed:the-script-element-3><a href=scripting.html#the-script-element>script</a></code> element is parsed, it is inserted <em>into the outer 6671 <code id=scripts-that-modify-the-page-as-it-is-being-parsed:document-2><a href=dom.html#document>Document</a></code> object</em>.</p> 6672 6673 <p>Those parsed into different <code id=scripts-that-modify-the-page-as-it-is-being-parsed:document-3><a href=dom.html#document>Document</a></code>s than the one the parser was created for do 6674 not execute, so the first alert does not show.</p> 6675 6676 <p>Once the <code id=scripts-that-modify-the-page-as-it-is-being-parsed:the-div-element-4><a href=semantics.html#the-div-element>div</a></code> element's end tag is parsed, the <code id=scripts-that-modify-the-page-as-it-is-being-parsed:the-div-element-5><a href=semantics.html#the-div-element>div</a></code> element is popped 6677 off the stack, and so the next <code id=scripts-that-modify-the-page-as-it-is-being-parsed:the-script-element-4><a href=scripting.html#the-script-element>script</a></code> element is in the inner 6678 <code id=scripts-that-modify-the-page-as-it-is-being-parsed:document-4><a href=dom.html#document>Document</a></code>:</p> 6679 6680 <ul class=domTree><li class=t1><code id=scripts-that-modify-the-page-as-it-is-being-parsed:the-html-element-3><a href=semantics.html#the-html-element>html</a></code><ul><li class=t1><code id=scripts-that-modify-the-page-as-it-is-being-parsed:the-head-element-3><a href=semantics.html#the-head-element>head</a></code><li class=t1><code id=scripts-that-modify-the-page-as-it-is-being-parsed:the-body-element-3><a href=semantics.html#the-body-element>body</a></code><ul><li class=t1><code id=scripts-that-modify-the-page-as-it-is-being-parsed:the-script-element-5><a href=scripting.html#the-script-element>script</a></code><ul><li class=t3><code id=scripts-that-modify-the-page-as-it-is-being-parsed:text-3><a href=infrastructure.html#text>#text</a></code>: <span>alert(document.URL);</span></ul></ul></ul></ul> 6681 6682 <p>This script does execute, resulting in an alert that says "http://example.com/inner".</p> 6683 6684 6685 <h5 id=the-execution-of-scripts-that-are-moving-across-multiple-documents>12.2.8.5 The execution of scripts that are moving across multiple documents</h5> 6686 6687 <p><i>This section is non-normative.</i></p> 6688 6689 <p>Elaborating on the example in the previous section, consider the case where the second 6690 <code id=the-execution-of-scripts-that-are-moving-across-multiple-documents:the-script-element><a href=scripting.html#the-script-element>script</a></code> element is an external script (i.e. one with a <code id=the-execution-of-scripts-that-are-moving-across-multiple-documents:attr-script-src><a href=scripting.html#attr-script-src>src</a></code> attribute). Since the element was not in the parser's 6691 <code id=the-execution-of-scripts-that-are-moving-across-multiple-documents:document><a href=dom.html#document>Document</a></code> when it was created, that external script is not even downloaded.</p> 6692 6693 <p>In a case where a <code id=the-execution-of-scripts-that-are-moving-across-multiple-documents:the-script-element-2><a href=scripting.html#the-script-element>script</a></code> element with a <code id=the-execution-of-scripts-that-are-moving-across-multiple-documents:attr-script-src-2><a href=scripting.html#attr-script-src>src</a></code> 6694 attribute is parsed normally into its parser's <code id=the-execution-of-scripts-that-are-moving-across-multiple-documents:document-2><a href=dom.html#document>Document</a></code>, but while the external 6695 script is being downloaded, the element is moved to another document, the script continues to 6696 download, but does not execute.</p> 6697 6698 <p class=note>In general, moving <code id=the-execution-of-scripts-that-are-moving-across-multiple-documents:the-script-element-3><a href=scripting.html#the-script-element>script</a></code> elements between <code id=the-execution-of-scripts-that-are-moving-across-multiple-documents:document-3><a href=dom.html#document>Document</a></code>s is 6699 considered a bad practice.</p> 6700 6701 6702 6703 <h5 id=unclosed-formatting-elements>12.2.8.6 Unclosed formatting elements</h5> 6704 6705 <p><i>This section is non-normative.</i></p> 6706 6707 <p>The following markup shows how nested formatting elements (such as <code id=unclosed-formatting-elements:the-b-element><a href=semantics.html#the-b-element>b</a></code>) get 6708 collected and continue to be applied even as the elements they are contained in are closed, but 6709 that excessive duplicates are thrown away.</p> 6710 6711 <pre><!DOCTYPE html> 6712 <p><b class=x><b class=x><b><b class=x><b class=x><b>X 6713 <p>X 6714 <p><b><b class=x><b>X 6715 <p></b></b></b></b></b></b>X</pre> 6716 6717 <p>The resulting DOM tree is as follows:</p> 6718 6719 <ul class=domTree><li class=t10>DOCTYPE: <code>html</code><li class=t1><code id=unclosed-formatting-elements:the-html-element><a href=semantics.html#the-html-element>html</a></code><ul><li class=t1><code id=unclosed-formatting-elements:the-head-element><a href=semantics.html#the-head-element>head</a></code><li class=t1><code id=unclosed-formatting-elements:the-body-element><a href=semantics.html#the-body-element>body</a></code><ul><li class=t1><code id=unclosed-formatting-elements:the-p-element><a href=semantics.html#the-p-element>p</a></code><ul><li class=t1><code id=unclosed-formatting-elements:the-b-element-2><a href=semantics.html#the-b-element>b</a></code> <span class=t2><code id=unclosed-formatting-elements:classes class="attribute name"><a href=dom.html#classes>class</a></code>="<code class="attribute value">x</code>"</span><ul><li class=t1><code id=unclosed-formatting-elements:the-b-element-3><a href=semantics.html#the-b-element>b</a></code> <span class=t2><code id=unclosed-formatting-elements:classes-2 class="attribute name"><a href=dom.html#classes>class</a></code>="<code class="attribute value">x</code>"</span><ul><li class=t1><code id=unclosed-formatting-elements:the-b-element-4><a href=semantics.html#the-b-element>b</a></code><ul><li class=t1><code id=unclosed-formatting-elements:the-b-element-5><a href=semantics.html#the-b-element>b</a></code> <span class=t2><code id=unclosed-formatting-elements:classes-3 class="attribute name"><a href=dom.html#classes>class</a></code>="<code class="attribute value">x</code>"</span><ul><li class=t1><code id=unclosed-formatting-elements:the-b-element-6><a href=semantics.html#the-b-element>b</a></code> <span class=t2><code id=unclosed-formatting-elements:classes-4 class="attribute name"><a href=dom.html#classes>class</a></code>="<code class="attribute value">x</code>"</span><ul><li class=t1><code id=unclosed-formatting-elements:the-b-element-7><a href=semantics.html#the-b-element>b</a></code><ul><li class=t3><code id=unclosed-formatting-elements:text><a href=infrastructure.html#text>#text</a></code>: <span>X</span></ul></ul></ul></ul></ul></ul></ul><li class=t1><code id=unclosed-formatting-elements:the-p-element-2><a href=semantics.html#the-p-element>p</a></code><ul><li class=t1><code id=unclosed-formatting-elements:the-b-element-8><a href=semantics.html#the-b-element>b</a></code> <span class=t2><code id=unclosed-formatting-elements:classes-5 class="attribute name"><a href=dom.html#classes>class</a></code>="<code class="attribute value">x</code>"</span><ul><li class=t1><code id=unclosed-formatting-elements:the-b-element-9><a href=semantics.html#the-b-element>b</a></code><ul><li class=t1><code id=unclosed-formatting-elements:the-b-element-10><a href=semantics.html#the-b-element>b</a></code> <span class=t2><code id=unclosed-formatting-elements:classes-6 class="attribute name"><a href=dom.html#classes>class</a></code>="<code class="attribute value">x</code>"</span><ul><li class=t1><code id=unclosed-formatting-elements:the-b-element-11><a href=semantics.html#the-b-element>b</a></code> <span class=t2><code id=unclosed-formatting-elements:classes-7 class="attribute name"><a href=dom.html#classes>class</a></code>="<code class="attribute value">x</code>"</span><ul><li class=t1><code id=unclosed-formatting-elements:the-b-element-12><a href=semantics.html#the-b-element>b</a></code><ul><li class=t3><code id=unclosed-formatting-elements:text-2><a href=infrastructure.html#text>#text</a></code>: <span>X</span></ul></ul></ul></ul></ul></ul><li class=t1><code id=unclosed-formatting-elements:the-p-element-3><a href=semantics.html#the-p-element>p</a></code><ul><li class=t1><code id=unclosed-formatting-elements:the-b-element-13><a href=semantics.html#the-b-element>b</a></code> <span class=t2><code id=unclosed-formatting-elements:classes-8 class="attribute name"><a href=dom.html#classes>class</a></code>="<code class="attribute value">x</code>"</span><ul><li class=t1><code id=unclosed-formatting-elements:the-b-element-14><a href=semantics.html#the-b-element>b</a></code><ul><li class=t1><code id=unclosed-formatting-elements:the-b-element-15><a href=semantics.html#the-b-element>b</a></code> <span class=t2><code id=unclosed-formatting-elements:classes-9 class="attribute name"><a href=dom.html#classes>class</a></code>="<code class="attribute value">x</code>"</span><ul><li class=t1><code id=unclosed-formatting-elements:the-b-element-16><a href=semantics.html#the-b-element>b</a></code> <span class=t2><code id=unclosed-formatting-elements:classes-10 class="attribute name"><a href=dom.html#classes>class</a></code>="<code class="attribute value">x</code>"</span><ul><li class=t1><code id=unclosed-formatting-elements:the-b-element-17><a href=semantics.html#the-b-element>b</a></code><ul><li class=t1><code id=unclosed-formatting-elements:the-b-element-18><a href=semantics.html#the-b-element>b</a></code><ul><li class=t1><code id=unclosed-formatting-elements:the-b-element-19><a href=semantics.html#the-b-element>b</a></code> <span class=t2><code id=unclosed-formatting-elements:classes-11 class="attribute name"><a href=dom.html#classes>class</a></code>="<code class="attribute value">x</code>"</span><ul><li class=t1><code id=unclosed-formatting-elements:the-b-element-20><a href=semantics.html#the-b-element>b</a></code><ul><li class=t3><code id=unclosed-formatting-elements:text-3><a href=infrastructure.html#text>#text</a></code>: <span>X</span></ul></ul></ul></ul></ul></ul></ul></ul></ul><li class=t1><code id=unclosed-formatting-elements:the-p-element-4><a href=semantics.html#the-p-element>p</a></code><ul><li class=t3><code id=unclosed-formatting-elements:text-4><a href=infrastructure.html#text>#text</a></code>: <span>X</span></ul></ul></ul></ul> 6720 6721 <p>Note how the second <code id=unclosed-formatting-elements:the-p-element-5><a href=semantics.html#the-p-element>p</a></code> element in the markup has no explicit <code id=unclosed-formatting-elements:the-b-element-21><a href=semantics.html#the-b-element>b</a></code> 6722 elements, but in the resulting DOM, up to three of each kind of formatting element (in this case 6723 three <code id=unclosed-formatting-elements:the-b-element-22><a href=semantics.html#the-b-element>b</a></code> elements with the class attribute, and two unadorned <code id=unclosed-formatting-elements:the-b-element-23><a href=semantics.html#the-b-element>b</a></code> elements) 6724 get reconstructed before the element's "X".</p> 6725 6726 <p>Also note how this means that in the final paragraph only six <code id=unclosed-formatting-elements:the-b-element-24><a href=semantics.html#the-b-element>b</a></code> end tags are 6727 needed to completely clear the <a href=#list-of-active-formatting-elements id=unclosed-formatting-elements:list-of-active-formatting-elements>list of active formatting elements</a>, even though nine 6728 <code id=unclosed-formatting-elements:the-b-element-25><a href=semantics.html#the-b-element>b</a></code> start tags have been seen up to this point.</p> 6729 6730 6731 6732 6733 6734 <h3 id=serialising-html-fragments>12.3 Serialising HTML fragments</h3> 6735 6736 <p>The following steps form the <dfn id=html-fragment-serialisation-algorithm>HTML fragment serialisation algorithm</dfn>. The algorithm 6737 takes as input a DOM <code id=serialising-html-fragments:element><a href=infrastructure.html#element>Element</a></code>, <code id=serialising-html-fragments:document><a href=dom.html#document>Document</a></code>, or <code id=serialising-html-fragments:documentfragment><a href=infrastructure.html#documentfragment>DocumentFragment</a></code> 6738 referred to as <var>the node</var>, and either returns a string or throws an 6739 exception.</p> 6740 6741 <p class=note>This algorithm serialises the <em>children</em> of the node being serialised, not 6742 the node itself.</p> 6743 6744 <ol><li><p>Let <var>s</var> be a string, and initialise it to the empty string.<li><p>If <var>the node</var> is a <code id=serialising-html-fragments:the-template-element><a href=scripting.html#the-template-element>template</a></code> element, then let <var>the node</var> instead be the <code id=serialising-html-fragments:the-template-element-2><a href=scripting.html#the-template-element>template</a></code> element's <a id=serialising-html-fragments:template-contents href=scripting.html#template-contents>template 6745 contents</a> (a <code id=serialising-html-fragments:documentfragment-2><a href=infrastructure.html#documentfragment>DocumentFragment</a></code> node).<li> 6746 6747 <p>For each child node of <var>the node</var>, in <a id=serialising-html-fragments:tree-order href=infrastructure.html#tree-order>tree order</a>, run the 6748 following steps: 6749 6750 <ol><li><p>Let <var>current node</var> be the child node being processed.<li> 6751 6752 <p>Append the appropriate string from the following list to <var>s</var>:</p> 6753 6754 <dl class=switch><dt>If <var>current node</var> is an <code>Element</code><dd> 6755 6756 <p>If <var>current node</var> is an element in the <a id=serialising-html-fragments:html-namespace-2 href=infrastructure.html#html-namespace-2>HTML namespace</a>, the 6757 <a id=serialising-html-fragments:mathml-namespace href=infrastructure.html#mathml-namespace>MathML namespace</a>, or the <a id=serialising-html-fragments:svg-namespace href=infrastructure.html#svg-namespace>SVG namespace</a>, then let <var>tagname</var> be <var>current node</var>'s local name. Otherwise, let <var>tagname</var> be <var>current node</var>'s qualified name.</p> 6758 6759 <p>Append a U+003C LESS-THAN SIGN character (<), followed by <var>tagname</var>.</p> 6760 6761 <p class=note>For <a id=serialising-html-fragments:html-elements href=infrastructure.html#html-elements>HTML elements</a> created by the <a href=#html-parser id=serialising-html-fragments:html-parser>HTML parser</a> or 6762 <code>Document.createElement()</code>, <var>tagname</var> will be 6763 lowercase.</p> 6764 6765 <p>For each attribute that the element has, append a U+0020 SPACE character, the <a href="#attribute's-serialised-name" id="serialising-html-fragments:attribute's-serialised-name">attribute's serialised name as described below</a>, a 6766 U+003D EQUALS SIGN character (=), a U+0022 QUOTATION MARK character ("), the 6767 attribute's value, <a href=#escapingString id=serialising-html-fragments:escapingString>escaped as described below</a> in 6768 <i>attribute mode</i>, and a second U+0022 QUOTATION MARK character (").</p> 6769 6770 <p>An <dfn id="attribute's-serialised-name">attribute's serialised name</dfn> for the purposes of the previous paragraph must 6771 be determined as follows:</p> 6772 6773 <dl class=switch><dt>If the attribute has no namespace<dd> 6774 6775 <p>The attribute's serialised name is the attribute's local name.</p> 6776 6777 <p class=note>For attributes on <a id=serialising-html-fragments:html-elements-2 href=infrastructure.html#html-elements>HTML elements</a> set by the <a href=#html-parser id=serialising-html-fragments:html-parser-2>HTML 6778 parser</a> or by <code>Element.setAttribute()</code>, the local name will be 6779 lowercase.</p> 6780 6781 <dt>If the attribute is in the <a id=serialising-html-fragments:xml-namespace href=infrastructure.html#xml-namespace>XML namespace</a><dd><p>The attribute's serialised name is the string "<code>xml:</code>" followed 6782 by the attribute's local name.<dt>If the attribute is in the <a id=serialising-html-fragments:xmlns-namespace href=infrastructure.html#xmlns-namespace>XMLNS namespace</a> and the attribute's local name 6783 is <code>xmlns</code><dd><p>The attribute's serialised name is the string "<code>xmlns</code>".<dt>If the attribute is in the <a id=serialising-html-fragments:xmlns-namespace-2 href=infrastructure.html#xmlns-namespace>XMLNS namespace</a> and the attribute's local name 6784 is not <code>xmlns</code><dd><p>The attribute's serialised name is the string "<code>xmlns:</code>" 6785 followed by the attribute's local name.<dt>If the attribute is in the <a id=serialising-html-fragments:xlink-namespace href=infrastructure.html#xlink-namespace>XLink namespace</a><dd><p>The attribute's serialised name is the string "<code>xlink:</code>" 6786 followed by the attribute's local name.<dt>If the attribute is in some other namespace<dd><p>The attribute's serialised name is the attribute's qualified name.</dl> 6787 6788 <p>While the exact order of attributes is UA-defined, and may depend on factors such as the 6789 order that the attributes were given in the original markup, the sort order must be stable, 6790 such that consecutive invocations of this algorithm serialise an element's attributes in the 6791 same order.</p> 6792 6793 <p>Append a U+003E GREATER-THAN SIGN character (>).</p> 6794 6795 <p>If <var>current node</var> is an <code id=serialising-html-fragments:the-area-element><a href=embedded-content.html#the-area-element>area</a></code>, <code id=serialising-html-fragments:the-base-element><a href=semantics.html#the-base-element>base</a></code>, 6796 <code id=serialising-html-fragments:basefont><a href=obsolete.html#basefont>basefont</a></code>, <code id=serialising-html-fragments:bgsound><a href=obsolete.html#bgsound>bgsound</a></code>, <code id=serialising-html-fragments:the-br-element><a href=semantics.html#the-br-element>br</a></code>, <code id=serialising-html-fragments:the-col-element><a href=tables.html#the-col-element>col</a></code>, 6797 <code id=serialising-html-fragments:the-embed-element><a href=embedded-content.html#the-embed-element>embed</a></code>, <code id=serialising-html-fragments:frame><a href=obsolete.html#frame>frame</a></code>, <code id=serialising-html-fragments:the-hr-element><a href=semantics.html#the-hr-element>hr</a></code>, <code id=serialising-html-fragments:the-img-element><a href=embedded-content.html#the-img-element>img</a></code>, 6798 <code id=serialising-html-fragments:the-input-element><a href=forms.html#the-input-element>input</a></code>, <code id=serialising-html-fragments:the-keygen-element><a href=forms.html#the-keygen-element>keygen</a></code>, <code id=serialising-html-fragments:the-link-element><a href=semantics.html#the-link-element>link</a></code>, <code id=serialising-html-fragments:the-menuitem-element><a href=forms.html#the-menuitem-element>menuitem</a></code>, 6799 <code id=serialising-html-fragments:the-meta-element><a href=semantics.html#the-meta-element>meta</a></code>, <code id=serialising-html-fragments:the-param-element><a href=embedded-content.html#the-param-element>param</a></code>, <code id=serialising-html-fragments:the-source-element><a href=embedded-content.html#the-source-element>source</a></code>, <code id=serialising-html-fragments:the-track-element><a href=embedded-content.html#the-track-element>track</a></code> or 6800 <code id=serialising-html-fragments:the-wbr-element><a href=semantics.html#the-wbr-element>wbr</a></code> element, then continue on to the next child node at this point.</p> 6801 6802 6803 6804 <p>If <var>current node</var> is a <code id=serialising-html-fragments:the-pre-element><a href=semantics.html#the-pre-element>pre</a></code>, <code id=serialising-html-fragments:the-textarea-element><a href=forms.html#the-textarea-element>textarea</a></code>, or 6805 <code id=serialising-html-fragments:listing><a href=obsolete.html#listing>listing</a></code> element, and the first child node of the element, if any, is a 6806 <code id=serialising-html-fragments:text><a href=infrastructure.html#text>Text</a></code> node whose character data has as its first character a U+000A LINE FEED 6807 (LF) character, then append a U+000A LINE FEED (LF) character.</p> 6808 6809 <p>Append the value of running the <a href=#html-fragment-serialisation-algorithm id=serialising-html-fragments:html-fragment-serialisation-algorithm>HTML fragment serialisation algorithm</a> on the 6810 <var>current node</var> element (thus recursing into this algorithm for that 6811 element), followed by a U+003C LESS-THAN SIGN character (<), a U+002F SOLIDUS character 6812 (/), <var>tagname</var> again, and finally a U+003E GREATER-THAN SIGN character 6813 (>).</p> 6814 6815 <dt>If <var>current node</var> is a <code>Text</code> node<dd> 6816 6817 <p>If the parent of <var>current node</var> is a <code id=serialising-html-fragments:the-style-element><a href=semantics.html#the-style-element>style</a></code>, 6818 <code id=serialising-html-fragments:the-script-element><a href=scripting.html#the-script-element>script</a></code>, <code id=serialising-html-fragments:xmp><a href=obsolete.html#xmp>xmp</a></code>, <code id=serialising-html-fragments:the-iframe-element><a href=embedded-content.html#the-iframe-element>iframe</a></code>, <code id=serialising-html-fragments:noembed><a href=obsolete.html#noembed>noembed</a></code>, 6819 <code id=serialising-html-fragments:noframes><a href=obsolete.html#noframes>noframes</a></code>, or <code id=serialising-html-fragments:plaintext><a href=obsolete.html#plaintext>plaintext</a></code> element, or if the parent of <var>current node</var> is a <code id=serialising-html-fragments:the-noscript-element><a href=scripting.html#the-noscript-element>noscript</a></code> element and <a href=webappapis.html#concept-n-script id=serialising-html-fragments:concept-n-script>scripting is enabled</a> for the node, then append the value of 6820 <var>current node</var>'s <code>data</code> IDL attribute literally.</p> 6821 6822 <p>Otherwise, append the value of <var>current node</var>'s <code>data</code> IDL attribute, <a href=#escapingString id=serialising-html-fragments:escapingString-2>escaped as described 6823 below</a>.</p> 6824 6825 <dt>If <var>current node</var> is a <code>Comment</code><dd> 6826 6827 <p>Append the literal string "<code><!--</code>" (U+003C LESS-THAN SIGN, U+0021 6828 EXCLAMATION MARK, U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS), followed by the value of <var>current node</var>'s <code>data</code> IDL attribute, followed by the 6829 literal string "<code>--></code>" (U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS, 6830 U+003E GREATER-THAN SIGN).</p> 6831 6832 <dt>If <var>current node</var> is a <code>ProcessingInstruction</code><dd> 6833 6834 <p>Append the literal string "<code><?</code>" (U+003C LESS-THAN SIGN, U+003F 6835 QUESTION MARK), followed by the value of <var>current node</var>'s <code>target</code> IDL attribute, followed by a single U+0020 SPACE character, followed 6836 by the value of <var>current node</var>'s <code>data</code> IDL 6837 attribute, followed by a single U+003E GREATER-THAN SIGN character (>).</p> 6838 6839 <dt>If <var>current node</var> is a <code>DocumentType</code><dd> 6840 6841 <p>Append the literal string "<code><!DOCTYPE</code>" (U+003C LESS-THAN SIGN, U+0021 6842 EXCLAMATION MARK, U+0044 LATIN CAPITAL LETTER D, U+004F LATIN CAPITAL LETTER O, U+0043 LATIN 6843 CAPITAL LETTER C, U+0054 LATIN CAPITAL LETTER T, U+0059 LATIN CAPITAL LETTER Y, U+0050 LATIN 6844 CAPITAL LETTER P, U+0045 LATIN CAPITAL LETTER E), followed by a space (U+0020 SPACE), 6845 followed by the value of <var>current node</var>'s <code>name</code> IDL 6846 attribute, followed by the literal string "<code>></code>" (U+003E GREATER-THAN SIGN).</p> 6847 6848 </dl> 6849 6850 6851 6852 </ol> 6853 6854 <li><p>The result of the algorithm is the string <var>s</var>.</ol> 6855 6856 <p class=warning>It is possible that the output of this algorithm, if parsed with an <a href=#html-parser id=serialising-html-fragments:html-parser-3>HTML 6857 parser</a>, will not return the original tree structure.</p> 6858 6859 <div class=example> 6860 6861 <p>For instance, if a <code id=serialising-html-fragments:the-textarea-element-2><a href=forms.html#the-textarea-element>textarea</a></code> element to which a <code>Comment</code> node 6862 has been appended is serialised and the output is then reparsed, the comment will end up being 6863 displayed in the text field. Similarly, if, as a result of DOM manipulation, an element contains 6864 a comment that contains the literal string "<code>--></code>", then when the result 6865 of serialising the element is parsed, the comment will be truncated at that point and the rest of 6866 the comment will be interpreted as markup. More examples would be making a <code id=serialising-html-fragments:the-script-element-2><a href=scripting.html#the-script-element>script</a></code> 6867 element contain a <code id=serialising-html-fragments:text-2><a href=infrastructure.html#text>Text</a></code> node with the text string "<code></script></code>", or 6868 having a <code id=serialising-html-fragments:the-p-element><a href=semantics.html#the-p-element>p</a></code> element that contains a <code id=serialising-html-fragments:the-ul-element><a href=semantics.html#the-ul-element>ul</a></code> element (as the <code id=serialising-html-fragments:the-ul-element-2><a href=semantics.html#the-ul-element>ul</a></code> 6869 element's <a href=#syntax-start-tag id=serialising-html-fragments:syntax-start-tag>start tag</a> would imply the end tag for the 6870 <code id=serialising-html-fragments:the-p-element-2><a href=semantics.html#the-p-element>p</a></code>).</p> 6871 6872 <p>This can enable cross-site scripting attacks. An example of this would be a page that lets the 6873 user enter some font family names that are then inserted into a CSS <code id=serialising-html-fragments:the-style-element-2><a href=semantics.html#the-style-element>style</a></code> block via 6874 the DOM and which then uses the <code id=serialising-html-fragments:dom-innerhtml><a href=infrastructure.html#dom-innerhtml>innerHTML</a></code> IDL attribute to get 6875 the HTML serialisation of that <code id=serialising-html-fragments:the-style-element-3><a href=semantics.html#the-style-element>style</a></code> element: if the user enters 6876 "<code></style><script>attack</script></code>" as a font family name, <code id=serialising-html-fragments:dom-innerhtml-2><a href=infrastructure.html#dom-innerhtml>innerHTML</a></code> will return markup that, if parsed in a different context, 6877 would contain a <code id=serialising-html-fragments:the-script-element-3><a href=scripting.html#the-script-element>script</a></code> node, even though no <code id=serialising-html-fragments:the-script-element-4><a href=scripting.html#the-script-element>script</a></code> node existed in the 6878 original DOM.</p> 6879 6880 </div> 6881 6882 <p><dfn id=escapingString>Escaping a string</dfn> (for the purposes of the algorithm above) 6883 consists of running the following steps:</p> 6884 6885 <ol><li><p>Replace any occurrence of the "<code>&</code>" character by the string "<code>&amp;</code>".<li><p>Replace any occurrences of the U+00A0 NO-BREAK SPACE character by the string "<code>&nbsp;</code>".<li><p>If the algorithm was invoked in the <i>attribute mode</i>, replace any occurrences of the 6886 "<code>"</code>" character by the string "<code>&quot;</code>".<li><p>If the algorithm was <em>not</em> invoked in the <i>attribute mode</i>, replace any 6887 occurrences of the "<code><</code>" character by the string "<code>&lt;</code>", and any occurrences of the "<code>></code>" character by 6888 the string "<code>&gt;</code>".</ol> 6889 6890 6891 <h3 id=parsing-html-fragments>12.4 Parsing HTML fragments</h3> 6892 6893 <p>The following steps form the <dfn id=html-fragment-parsing-algorithm>HTML fragment parsing algorithm</dfn>. The algorithm 6894 optionally takes as input an <code id=parsing-html-fragments:element><a href=infrastructure.html#element>Element</a></code> node, referred to as the <dfn id=concept-frag-parse-context><var>context</var></dfn> element, which gives the context for 6895 the parser, as well as <var>input</var>, a string to parse, and returns a list of zero or 6896 more nodes.</p> 6897 6898 <p class=note>Parts marked <dfn id=fragment-case>fragment case</dfn> in algorithms in the parser section are 6899 parts that only occur if the parser was created for the purposes of this algorithm (and with a 6900 <var id=parsing-html-fragments:concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></var> element). The algorithms have been annotated 6901 with such markings for informational purposes only; such markings have no normative weight. If it 6902 is possible for a condition described as a <a href=#fragment-case id=parsing-html-fragments:fragment-case>fragment case</a> to occur even when the 6903 parser wasn't created for the purposes of handling this algorithm, then that is an error in the 6904 specification.</p> 6905 6906 <ol><li> 6907 6908 <p>Create a new <code id=parsing-html-fragments:document><a href=dom.html#document>Document</a></code> node, and mark it as being an <a href=infrastructure.html#html-documents id=parsing-html-fragments:html-documents>HTML document</a>.</p> 6909 6910 <li> 6911 6912 <p>If there is a <var id=parsing-html-fragments:concept-frag-parse-context-2><a href=#concept-frag-parse-context>context</a></var> element, and the 6913 <a id=parsing-html-fragments:node-document href=https://dom.spec.whatwg.org/#concept-node-document data-x-internal=node-document>node document</a> of the <var id=parsing-html-fragments:concept-frag-parse-context-3><a href=#concept-frag-parse-context>context</a></var> element is in 6914 <a id=parsing-html-fragments:quirks-mode href=infrastructure.html#quirks-mode>quirks mode</a>, then let the <code id=parsing-html-fragments:document-2><a href=dom.html#document>Document</a></code> be in <a id=parsing-html-fragments:quirks-mode-2 href=infrastructure.html#quirks-mode>quirks mode</a>. 6915 Otherwise, if there is a <var id=parsing-html-fragments:concept-frag-parse-context-4><a href=#concept-frag-parse-context>context</a></var> element, and the 6916 <a id=parsing-html-fragments:node-document-2 href=https://dom.spec.whatwg.org/#concept-node-document data-x-internal=node-document>node document</a> of the <var id=parsing-html-fragments:concept-frag-parse-context-5><a href=#concept-frag-parse-context>context</a></var> element is in 6917 <a id=parsing-html-fragments:limited-quirks-mode href=infrastructure.html#limited-quirks-mode>limited-quirks mode</a>, then let the <code id=parsing-html-fragments:document-3><a href=dom.html#document>Document</a></code> be in <a id=parsing-html-fragments:limited-quirks-mode-2 href=infrastructure.html#limited-quirks-mode>limited-quirks 6918 mode</a>. Otherwise, leave the <code id=parsing-html-fragments:document-4><a href=dom.html#document>Document</a></code> in <a id=parsing-html-fragments:no-quirks-mode href=infrastructure.html#no-quirks-mode>no-quirks mode</a>.</p> 6919 6920 <li> 6921 6922 <p>Create a new <a href=#html-parser id=parsing-html-fragments:html-parser>HTML parser</a>, and associate it with the just created 6923 <code id=parsing-html-fragments:document-5><a href=dom.html#document>Document</a></code> node.</p> 6924 6925 <li> 6926 6927 <p>If there is a <var id=parsing-html-fragments:concept-frag-parse-context-6><a href=#concept-frag-parse-context>context</a></var> element, run these 6928 substeps:</p> 6929 6930 <ol><li> 6931 6932 <p>Set the state of the <a href=#html-parser id=parsing-html-fragments:html-parser-2>HTML parser</a>'s <a href=#tokenization id=parsing-html-fragments:tokenization>tokenization</a> stage as 6933 follows:</p> 6934 6935 <dl class=switch><dt>If it is a <code id=parsing-html-fragments:the-title-element><a href=semantics.html#the-title-element>title</a></code> or <code id=parsing-html-fragments:the-textarea-element><a href=forms.html#the-textarea-element>textarea</a></code> element<dd>Switch the tokenizer to the <a href=#rcdata-state id=parsing-html-fragments:rcdata-state>RCDATA state</a>.<dt>If it is a <code id=parsing-html-fragments:the-style-element><a href=semantics.html#the-style-element>style</a></code>, <code id=parsing-html-fragments:xmp><a href=obsolete.html#xmp>xmp</a></code>, <code id=parsing-html-fragments:the-iframe-element><a href=embedded-content.html#the-iframe-element>iframe</a></code>, 6936 <code id=parsing-html-fragments:noembed><a href=obsolete.html#noembed>noembed</a></code>, or <code id=parsing-html-fragments:noframes><a href=obsolete.html#noframes>noframes</a></code> element<dd>Switch the tokenizer to the <a href=#rawtext-state id=parsing-html-fragments:rawtext-state>RAWTEXT state</a>.<dt>If it is a <code id=parsing-html-fragments:the-script-element><a href=scripting.html#the-script-element>script</a></code> element<dd>Switch the tokenizer to the <a href=#script-data-state id=parsing-html-fragments:script-data-state>script data state</a>.<dt>If it is a <code id=parsing-html-fragments:the-noscript-element><a href=scripting.html#the-noscript-element>noscript</a></code> element<dd>If the <a href=#scripting-flag id=parsing-html-fragments:scripting-flag>scripting flag</a> is enabled, switch the tokenizer to the <a href=#rawtext-state id=parsing-html-fragments:rawtext-state-2>RAWTEXT 6937 state</a>. Otherwise, leave the tokenizer in the <a href=#data-state id=parsing-html-fragments:data-state>data state</a>.<dt>If it is a <code id=parsing-html-fragments:plaintext><a href=obsolete.html#plaintext>plaintext</a></code> element<dd>Switch the tokenizer to the <a href=#plaintext-state id=parsing-html-fragments:plaintext-state>PLAINTEXT state</a>.<dt>Otherwise<dd>Leave the tokenizer in the <a href=#data-state id=parsing-html-fragments:data-state-2>data state</a>.</dl> 6938 6939 <p class=note>For performance reasons, an implementation that does not report errors and 6940 that uses the actual state machine described in this specification directly could use the 6941 PLAINTEXT state instead of the RAWTEXT and script data states where those are mentioned in the 6942 list above. Except for rules regarding parse errors, they are equivalent, since there is no 6943 <a href=#appropriate-end-tag-token id=parsing-html-fragments:appropriate-end-tag-token>appropriate end tag token</a> in the fragment case, yet they involve far fewer state 6944 transitions.</p> 6945 6946 <li> 6947 6948 <p>Let <var>root</var> be a new <code id=parsing-html-fragments:the-html-element><a href=semantics.html#the-html-element>html</a></code> element with no attributes.</p> 6949 6950 <li> 6951 6952 <p>Append the element <var>root</var> to the <code id=parsing-html-fragments:document-6><a href=dom.html#document>Document</a></code> node created 6953 above.</p> 6954 6955 <li> 6956 6957 <p>Set up the parser's <a href=#stack-of-open-elements id=parsing-html-fragments:stack-of-open-elements>stack of open elements</a> so that it contains just the single 6958 element <var>root</var>.</p> 6959 6960 <li> 6961 6962 <p>If the <var id=parsing-html-fragments:concept-frag-parse-context-7><a href=#concept-frag-parse-context>context</a></var> element is a 6963 <code id=parsing-html-fragments:the-template-element><a href=scripting.html#the-template-element>template</a></code> element, push "<a href=#parsing-main-intemplate id=parsing-html-fragments:parsing-main-intemplate>in 6964 template</a>" onto the <a href=#stack-of-template-insertion-modes id=parsing-html-fragments:stack-of-template-insertion-modes>stack of template insertion modes</a> so that it is the new 6965 <a href=#current-template-insertion-mode id=parsing-html-fragments:current-template-insertion-mode>current template insertion mode</a>.</p> 6966 6967 <li> 6968 6969 <p>Create a start tag token whose name is the local name of <var id=parsing-html-fragments:concept-frag-parse-context-8><a href=#concept-frag-parse-context>context</a></var> and whose attributes are the attributes of 6970 <var id=parsing-html-fragments:concept-frag-parse-context-9><a href=#concept-frag-parse-context>context</a></var>.</p> 6971 6972 <p>Let this start tag token be the start tag token of the <var id=parsing-html-fragments:concept-frag-parse-context-10><a href=#concept-frag-parse-context>context</a></var> node, e.g. for the purposes of determining 6973 if it is an <a href=#html-integration-point id=parsing-html-fragments:html-integration-point>HTML integration point</a>.</p> 6974 6975 <li> 6976 6977 <p><a href=#reset-the-insertion-mode-appropriately id=parsing-html-fragments:reset-the-insertion-mode-appropriately>Reset the parser's insertion mode 6978 appropriately</a>.</p> 6979 6980 <p class=note>The parser will reference the <var id=parsing-html-fragments:concept-frag-parse-context-11><a href=#concept-frag-parse-context>context</a></var> element as part of that algorithm.</p> 6981 6982 <li> 6983 6984 <p>Set the parser's <a href=#form-element-pointer id=parsing-html-fragments:form-element-pointer><code>form</code> element pointer</a> to the nearest node to the 6985 <var id=parsing-html-fragments:concept-frag-parse-context-12><a href=#concept-frag-parse-context>context</a></var> element that is a <code id=parsing-html-fragments:the-form-element><a href=forms.html#the-form-element>form</a></code> 6986 element (going straight up the ancestor chain, and including the element itself, if it is a 6987 <code id=parsing-html-fragments:the-form-element-2><a href=forms.html#the-form-element>form</a></code> element), if any. (If there is no such <code id=parsing-html-fragments:the-form-element-3><a href=forms.html#the-form-element>form</a></code> element, the 6988 <a href=#form-element-pointer id=parsing-html-fragments:form-element-pointer-2><code>form</code> element pointer</a> keeps its initial value, null.)</p> 6989 6990 </ol> 6991 6992 <li> 6993 6994 <p>Place the <var>input</var> into the <a href=#input-stream id=parsing-html-fragments:input-stream>input stream</a> for the <a href=#html-parser id=parsing-html-fragments:html-parser-3>HTML 6995 parser</a> just created. The encoding <a href=#concept-encoding-confidence id=parsing-html-fragments:concept-encoding-confidence>confidence</a> is <i>irrelevant</i>.</p> 6996 6997 <li> 6998 6999 <p>Start the parser and let it run until it has consumed all the characters just inserted into 7000 the input stream.</p> 7001 7002 <li> 7003 7004 <p>If there is a <var id=parsing-html-fragments:concept-frag-parse-context-13><a href=#concept-frag-parse-context>context</a></var> element, return the child 7005 nodes of <var>root</var>, in <a id=parsing-html-fragments:tree-order href=infrastructure.html#tree-order>tree order</a>.</p> 7006 7007 <p>Otherwise, return the children of the <code id=parsing-html-fragments:document-7><a href=dom.html#document>Document</a></code> object, in <a id=parsing-html-fragments:tree-order-2 href=infrastructure.html#tree-order>tree 7008 order</a>.</p> 7009 7010 </ol> 7011 7012 7013 7014 7015 7016 <h3 id=named-character-references>12.5 <dfn>Named character references</dfn></h3> 7017 7018 <p>This table lists the character reference names that are supported by HTML, and the code points 7019 to which they refer. It is referenced by the previous sections.</p> 7020 7021 <div id=named-character-references-table> 7022 <table><thead><tr><th> Name <th> Character(s) <th> Glyph <tbody><tr id=entity-Aacute><td> <code>Aacute;</code> <td> U+000C1 <td> <span class=glyph></span> <tr id=entity-Aacute-legacy class=impl><td> <code>Aacute</code> <td> U+000C1 <td> <span></span> <tr id=entity-aacute><td> <code>aacute;</code> <td> U+000E1 <td> <span class=glyph></span> <tr id=entity-aacute-legacy class=impl><td> <code>aacute</code> <td> U+000E1 <td> <span></span> <tr id=entity-Abreve><td> <code>Abreve;</code> <td> U+00102 <td> <span class=glyph></span> <tr id=entity-abreve><td> <code>abreve;</code> <td> U+00103 <td> <span class=glyph></span> <tr id=entity-ac><td> <code>ac;</code> <td> U+0223E <td> <span class=glyph></span> <tr id=entity-acd><td> <code>acd;</code> <td> U+0223F <td> <span class=glyph></span> <tr id=entity-acE><td> <code>acE;</code> <td> U+0223E U+00333 <td> <span class="glyph compound"></span> <tr id=entity-Acirc><td> <code>Acirc;</code> <td> U+000C2 <td> <span class=glyph></span> <tr id=entity-Acirc-legacy class=impl><td> <code>Acirc</code> <td> U+000C2 <td> <span></span> <tr id=entity-acirc><td> <code>acirc;</code> <td> U+000E2 <td> <span class=glyph></span> <tr id=entity-acirc-legacy class=impl><td> <code>acirc</code> <td> U+000E2 <td> <span></span> <tr id=entity-acute><td> <code>acute;</code> <td> U+000B4 <td> <span class=glyph></span> <tr id=entity-acute-legacy class=impl><td> <code>acute</code> <td> U+000B4 <td> <span></span> <tr id=entity-Acy><td> <code>Acy;</code> <td> U+00410 <td> <span class=glyph></span> <tr id=entity-acy><td> <code>acy;</code> <td> U+00430 <td> <span class=glyph></span> <tr id=entity-AElig><td> <code>AElig;</code> <td> U+000C6 <td> <span class=glyph></span> <tr id=entity-AElig-legacy class=impl><td> <code>AElig</code> <td> U+000C6 <td> <span></span> <tr id=entity-aelig><td> <code>aelig;</code> <td> U+000E6 <td> <span class=glyph></span> <tr id=entity-aelig-legacy class=impl><td> <code>aelig</code> <td> U+000E6 <td> <span></span> <tr id=entity-af><td> <code>af;</code> <td> U+02061 <td> <span class=glyph></span> <tr id=entity-Afr><td> <code>Afr;</code> <td> U+1D504 <td> <span class=glyph></span> <tr id=entity-afr><td> <code>afr;</code> <td> U+1D51E <td> <span class=glyph></span> <tr id=entity-Agrave><td> <code>Agrave;</code> <td> U+000C0 <td> <span class=glyph></span> <tr id=entity-Agrave-legacy class=impl><td> <code>Agrave</code> <td> U+000C0 <td> <span></span> <tr id=entity-agrave><td> <code>agrave;</code> <td> U+000E0 <td> <span class=glyph></span> <tr id=entity-agrave-legacy class=impl><td> <code>agrave</code> <td> U+000E0 <td> <span></span> <tr id=entity-alefsym><td> <code>alefsym;</code> <td> U+02135 <td> <span class=glyph></span> <tr id=entity-aleph><td> <code>aleph;</code> <td> U+02135 <td> <span class=glyph></span> <tr id=entity-Alpha><td> <code>Alpha;</code> <td> U+00391 <td> <span class=glyph></span> <tr id=entity-alpha><td> <code>alpha;</code> <td> U+003B1 <td> <span class=glyph></span> <tr id=entity-Amacr><td> <code>Amacr;</code> <td> U+00100 <td> <span class=glyph></span> <tr id=entity-amacr><td> <code>amacr;</code> <td> U+00101 <td> <span class=glyph></span> <tr id=entity-amalg><td> <code>amalg;</code> <td> U+02A3F <td> <span class=glyph></span> <tr id=entity-AMP><td> <code>AMP;</code> <td> U+00026 <td> <span class=glyph>&</span> <tr id=entity-AMP-legacy class=impl><td> <code>AMP</code> <td> U+00026 <td> <span>&</span> <tr id=entity-amp><td> <code>amp;</code> <td> U+00026 <td> <span class=glyph>&</span> <tr id=entity-amp-legacy class=impl><td> <code>amp</code> <td> U+00026 <td> <span>&</span> <tr id=entity-And><td> <code>And;</code> <td> U+02A53 <td> <span class=glyph></span> <tr id=entity-and><td> <code>and;</code> <td> U+02227 <td> <span class=glyph></span> <tr id=entity-andand><td> <code>andand;</code> <td> U+02A55 <td> <span class=glyph></span> <tr id=entity-andd><td> <code>andd;</code> <td> U+02A5C <td> <span class=glyph></span> <tr id=entity-andslope><td> <code>andslope;</code> <td> U+02A58 <td> <span class=glyph></span> <tr id=entity-andv><td> <code>andv;</code> <td> U+02A5A <td> <span class=glyph></span> <tr id=entity-ang><td> <code>ang;</code> <td> U+02220 <td> <span class=glyph></span> <tr id=entity-ange><td> <code>ange;</code> <td> U+029A4 <td> <span class=glyph></span> <tr id=entity-angle><td> <code>angle;</code> <td> U+02220 <td> <span class=glyph></span> <tr id=entity-angmsd><td> <code>angmsd;</code> <td> U+02221 <td> <span class=glyph></span> <tr id=entity-angmsdaa><td> <code>angmsdaa;</code> <td> U+029A8 <td> <span class=glyph></span> <tr id=entity-angmsdab><td> <code>angmsdab;</code> <td> U+029A9 <td> <span class=glyph></span> <tr id=entity-angmsdac><td> <code>angmsdac;</code> <td> U+029AA <td> <span class=glyph></span> <tr id=entity-angmsdad><td> <code>angmsdad;</code> <td> U+029AB <td> <span class=glyph></span> <tr id=entity-angmsdae><td> <code>angmsdae;</code> <td> U+029AC <td> <span class=glyph></span> <tr id=entity-angmsdaf><td> <code>angmsdaf;</code> <td> U+029AD <td> <span class=glyph></span> <tr id=entity-angmsdag><td> <code>angmsdag;</code> <td> U+029AE <td> <span class=glyph></span> <tr id=entity-angmsdah><td> <code>angmsdah;</code> <td> U+029AF <td> <span class=glyph></span> <tr id=entity-angrt><td> <code>angrt;</code> <td> U+0221F <td> <span class=glyph></span> <tr id=entity-angrtvb><td> <code>angrtvb;</code> <td> U+022BE <td> <span class=glyph></span> <tr id=entity-angrtvbd><td> <code>angrtvbd;</code> <td> U+0299D <td> <span class=glyph></span> <tr id=entity-angsph><td> <code>angsph;</code> <td> U+02222 <td> <span class=glyph></span> <tr id=entity-angst><td> <code>angst;</code> <td> U+000C5 <td> <span class=glyph></span> <tr id=entity-angzarr><td> <code>angzarr;</code> <td> U+0237C <td> <span class=glyph></span> <tr id=entity-Aogon><td> <code>Aogon;</code> <td> U+00104 <td> <span class=glyph></span> <tr id=entity-aogon><td> <code>aogon;</code> <td> U+00105 <td> <span class=glyph></span> <tr id=entity-Aopf><td> <code>Aopf;</code> <td> U+1D538 <td> <span class=glyph></span> <tr id=entity-aopf><td> <code>aopf;</code> <td> U+1D552 <td> <span class=glyph></span> <tr id=entity-ap><td> <code>ap;</code> <td> U+02248 <td> <span class=glyph></span> <tr id=entity-apacir><td> <code>apacir;</code> <td> U+02A6F <td> <span class=glyph></span> <tr id=entity-apE><td> <code>apE;</code> <td> U+02A70 <td> <span class=glyph></span> <tr id=entity-ape><td> <code>ape;</code> <td> U+0224A <td> <span class=glyph></span> <tr id=entity-apid><td> <code>apid;</code> <td> U+0224B <td> <span class=glyph></span> <tr id=entity-apos><td> <code>apos;</code> <td> U+00027 <td> <span class=glyph>'</span> <tr id=entity-ApplyFunction><td> <code>ApplyFunction;</code> <td> U+02061 <td> <span class=glyph></span> <tr id=entity-approx><td> <code>approx;</code> <td> U+02248 <td> <span class=glyph></span> <tr id=entity-approxeq><td> <code>approxeq;</code> <td> U+0224A <td> <span class=glyph></span> <tr id=entity-Aring><td> <code>Aring;</code> <td> U+000C5 <td> <span class=glyph></span> <tr id=entity-Aring-legacy class=impl><td> <code>Aring</code> <td> U+000C5 <td> <span></span> <tr id=entity-aring><td> <code>aring;</code> <td> U+000E5 <td> <span class=glyph></span> <tr id=entity-aring-legacy class=impl><td> <code>aring</code> <td> U+000E5 <td> <span></span> <tr id=entity-Ascr><td> <code>Ascr;</code> <td> U+1D49C <td> <span class=glyph></span> <tr id=entity-ascr><td> <code>ascr;</code> <td> U+1D4B6 <td> <span class=glyph></span> <tr id=entity-Assign><td> <code>Assign;</code> <td> U+02254 <td> <span class=glyph></span> <tr id=entity-ast><td> <code>ast;</code> <td> U+0002A <td> <span class=glyph>*</span> <tr id=entity-asymp><td> <code>asymp;</code> <td> U+02248 <td> <span class=glyph></span> <tr id=entity-asympeq><td> <code>asympeq;</code> <td> U+0224D <td> <span class=glyph></span> <tr id=entity-Atilde><td> <code>Atilde;</code> <td> U+000C3 <td> <span class=glyph></span> <tr id=entity-Atilde-legacy class=impl><td> <code>Atilde</code> <td> U+000C3 <td> <span></span> <tr id=entity-atilde><td> <code>atilde;</code> <td> U+000E3 <td> <span class=glyph></span> <tr id=entity-atilde-legacy class=impl><td> <code>atilde</code> <td> U+000E3 <td> <span></span> <tr id=entity-Auml><td> <code>Auml;</code> <td> U+000C4 <td> <span class=glyph></span> <tr id=entity-Auml-legacy class=impl><td> <code>Auml</code> <td> U+000C4 <td> <span></span> <tr id=entity-auml><td> <code>auml;</code> <td> U+000E4 <td> <span class=glyph></span> <tr id=entity-auml-legacy class=impl><td> <code>auml</code> <td> U+000E4 <td> <span></span> <tr id=entity-awconint><td> <code>awconint;</code> <td> U+02233 <td> <span class=glyph></span> <tr id=entity-awint><td> <code>awint;</code> <td> U+02A11 <td> <span class=glyph></span> <tr id=entity-backcong><td> <code>backcong;</code> <td> U+0224C <td> <span class=glyph></span> <tr id=entity-backepsilon><td> <code>backepsilon;</code> <td> U+003F6 <td> <span class=glyph></span> <tr id=entity-backprime><td> <code>backprime;</code> <td> U+02035 <td> <span class=glyph></span> <tr id=entity-backsim><td> <code>backsim;</code> <td> U+0223D <td> <span class=glyph></span> <tr id=entity-backsimeq><td> <code>backsimeq;</code> <td> U+022CD <td> <span class=glyph></span> <tr id=entity-Backslash><td> <code>Backslash;</code> <td> U+02216 <td> <span class=glyph></span> <tr id=entity-Barv><td> <code>Barv;</code> <td> U+02AE7 <td> <span class=glyph></span> <tr id=entity-barvee><td> <code>barvee;</code> <td> U+022BD <td> <span class=glyph></span> <tr id=entity-Barwed><td> <code>Barwed;</code> <td> U+02306 <td> <span class=glyph></span> <tr id=entity-barwed><td> <code>barwed;</code> <td> U+02305 <td> <span class=glyph></span> <tr id=entity-barwedge><td> <code>barwedge;</code> <td> U+02305 <td> <span class=glyph></span> <tr id=entity-bbrk><td> <code>bbrk;</code> <td> U+023B5 <td> <span class=glyph></span> <tr id=entity-bbrktbrk><td> <code>bbrktbrk;</code> <td> U+023B6 <td> <span class=glyph></span> <tr id=entity-bcong><td> <code>bcong;</code> <td> U+0224C <td> <span class=glyph></span> <tr id=entity-Bcy><td> <code>Bcy;</code> <td> U+00411 <td> <span class=glyph></span> <tr id=entity-bcy><td> <code>bcy;</code> <td> U+00431 <td> <span class=glyph></span> <tr id=entity-bdquo><td> <code>bdquo;</code> <td> U+0201E <td> <span class=glyph></span> <tr id=entity-becaus><td> <code>becaus;</code> <td> U+02235 <td> <span class=glyph></span> <tr id=entity-Because><td> <code>Because;</code> <td> U+02235 <td> <span class=glyph></span> <tr id=entity-because><td> <code>because;</code> <td> U+02235 <td> <span class=glyph></span> <tr id=entity-bemptyv><td> <code>bemptyv;</code> <td> U+029B0 <td> <span class=glyph></span> <tr id=entity-bepsi><td> <code>bepsi;</code> <td> U+003F6 <td> <span class=glyph></span> <tr id=entity-bernou><td> <code>bernou;</code> <td> U+0212C <td> <span class=glyph></span> <tr id=entity-Bernoullis><td> <code>Bernoullis;</code> <td> U+0212C <td> <span class=glyph></span> <tr id=entity-Beta><td> <code>Beta;</code> <td> U+00392 <td> <span class=glyph></span> <tr id=entity-beta><td> <code>beta;</code> <td> U+003B2 <td> <span class=glyph></span> <tr id=entity-beth><td> <code>beth;</code> <td> U+02136 <td> <span class=glyph></span> <tr id=entity-between><td> <code>between;</code> <td> U+0226C <td> <span class=glyph></span> <tr id=entity-Bfr><td> <code>Bfr;</code> <td> U+1D505 <td> <span class=glyph></span> <tr id=entity-bfr><td> <code>bfr;</code> <td> U+1D51F <td> <span class=glyph></span> <tr id=entity-bigcap><td> <code>bigcap;</code> <td> U+022C2 <td> <span class=glyph></span> <tr id=entity-bigcirc><td> <code>bigcirc;</code> <td> U+025EF <td> <span class=glyph></span> <tr id=entity-bigcup><td> <code>bigcup;</code> <td> U+022C3 <td> <span class=glyph></span> <tr id=entity-bigodot><td> <code>bigodot;</code> <td> U+02A00 <td> <span class=glyph></span> <tr id=entity-bigoplus><td> <code>bigoplus;</code> <td> U+02A01 <td> <span class=glyph></span> <tr id=entity-bigotimes><td> <code>bigotimes;</code> <td> U+02A02 <td> <span class=glyph></span> <tr id=entity-bigsqcup><td> <code>bigsqcup;</code> <td> U+02A06 <td> <span class=glyph></span> <tr id=entity-bigstar><td> <code>bigstar;</code> <td> U+02605 <td> <span class=glyph></span> <tr id=entity-bigtriangledown><td> <code>bigtriangledown;</code> <td> U+025BD <td> <span class=glyph></span> <tr id=entity-bigtriangleup><td> <code>bigtriangleup;</code> <td> U+025B3 <td> <span class=glyph></span> <tr id=entity-biguplus><td> <code>biguplus;</code> <td> U+02A04 <td> <span class=glyph></span> <tr id=entity-bigvee><td> <code>bigvee;</code> <td> U+022C1 <td> <span class=glyph></span> <tr id=entity-bigwedge><td> <code>bigwedge;</code> <td> U+022C0 <td> <span class=glyph></span> <tr id=entity-bkarow><td> <code>bkarow;</code> <td> U+0290D <td> <span class=glyph></span> <tr id=entity-blacklozenge><td> <code>blacklozenge;</code> <td> U+029EB <td> <span class=glyph></span> <tr id=entity-blacksquare><td> <code>blacksquare;</code> <td> U+025AA <td> <span class=glyph></span> <tr id=entity-blacktriangle><td> <code>blacktriangle;</code> <td> U+025B4 <td> <span class=glyph></span> <tr id=entity-blacktriangledown><td> <code>blacktriangledown;</code> <td> U+025BE <td> <span class=glyph></span> <tr id=entity-blacktriangleleft><td> <code>blacktriangleleft;</code> <td> U+025C2 <td> <span class=glyph></span> <tr id=entity-blacktriangleright><td> <code>blacktriangleright;</code> <td> U+025B8 <td> <span class=glyph></span> <tr id=entity-blank><td> <code>blank;</code> <td> U+02423 <td> <span class=glyph></span> <tr id=entity-blk12><td> <code>blk12;</code> <td> U+02592 <td> <span class=glyph></span> <tr id=entity-blk14><td> <code>blk14;</code> <td> U+02591 <td> <span class=glyph></span> <tr id=entity-blk34><td> <code>blk34;</code> <td> U+02593 <td> <span class=glyph></span> <tr id=entity-block><td> <code>block;</code> <td> U+02588 <td> <span class=glyph></span> <tr id=entity-bne><td> <code>bne;</code> <td> U+0003D U+020E5 <td> <span class="glyph compound">=</span> <tr id=entity-bnequiv><td> <code>bnequiv;</code> <td> U+02261 U+020E5 <td> <span class="glyph compound"></span> <tr id=entity-bNot><td> <code>bNot;</code> <td> U+02AED <td> <span class=glyph></span> <tr id=entity-bnot><td> <code>bnot;</code> <td> U+02310 <td> <span class=glyph></span> <tr id=entity-Bopf><td> <code>Bopf;</code> <td> U+1D539 <td> <span class=glyph></span> <tr id=entity-bopf><td> <code>bopf;</code> <td> U+1D553 <td> <span class=glyph></span> <tr id=entity-bot><td> <code>bot;</code> <td> U+022A5 <td> <span class=glyph></span> <tr id=entity-bottom><td> <code>bottom;</code> <td> U+022A5 <td> <span class=glyph></span> <tr id=entity-bowtie><td> <code>bowtie;</code> <td> U+022C8 <td> <span class=glyph></span> <tr id=entity-boxbox><td> <code>boxbox;</code> <td> U+029C9 <td> <span class=glyph></span> <tr id=entity-boxDL><td> <code>boxDL;</code> <td> U+02557 <td> <span class=glyph></span> <tr id=entity-boxDl><td> <code>boxDl;</code> <td> U+02556 <td> <span class=glyph></span> <tr id=entity-boxdL><td> <code>boxdL;</code> <td> U+02555 <td> <span class=glyph></span> <tr id=entity-boxdl><td> <code>boxdl;</code> <td> U+02510 <td> <span class=glyph></span> <tr id=entity-boxDR><td> <code>boxDR;</code> <td> U+02554 <td> <span class=glyph></span> <tr id=entity-boxDr><td> <code>boxDr;</code> <td> U+02553 <td> <span class=glyph></span> <tr id=entity-boxdR><td> <code>boxdR;</code> <td> U+02552 <td> <span class=glyph></span> <tr id=entity-boxdr><td> <code>boxdr;</code> <td> U+0250C <td> <span class=glyph></span> <tr id=entity-boxH><td> <code>boxH;</code> <td> U+02550 <td> <span class=glyph></span> <tr id=entity-boxh><td> <code>boxh;</code> <td> U+02500 <td> <span class=glyph></span> <tr id=entity-boxHD><td> <code>boxHD;</code> <td> U+02566 <td> <span class=glyph></span> <tr id=entity-boxHd><td> <code>boxHd;</code> <td> U+02564 <td> <span class=glyph></span> <tr id=entity-boxhD><td> <code>boxhD;</code> <td> U+02565 <td> <span class=glyph></span> <tr id=entity-boxhd><td> <code>boxhd;</code> <td> U+0252C <td> <span class=glyph></span> <tr id=entity-boxHU><td> <code>boxHU;</code> <td> U+02569 <td> <span class=glyph></span> <tr id=entity-boxHu><td> <code>boxHu;</code> <td> U+02567 <td> <span class=glyph></span> <tr id=entity-boxhU><td> <code>boxhU;</code> <td> U+02568 <td> <span class=glyph></span> <tr id=entity-boxhu><td> <code>boxhu;</code> <td> U+02534 <td> <span class=glyph></span> <tr id=entity-boxminus><td> <code>boxminus;</code> <td> U+0229F <td> <span class=glyph></span> <tr id=entity-boxplus><td> <code>boxplus;</code> <td> U+0229E <td> <span class=glyph></span> <tr id=entity-boxtimes><td> <code>boxtimes;</code> <td> U+022A0 <td> <span class=glyph></span> <tr id=entity-boxUL><td> <code>boxUL;</code> <td> U+0255D <td> <span class=glyph></span> <tr id=entity-boxUl><td> <code>boxUl;</code> <td> U+0255C <td> <span class=glyph></span> <tr id=entity-boxuL><td> <code>boxuL;</code> <td> U+0255B <td> <span class=glyph></span> <tr id=entity-boxul><td> <code>boxul;</code> <td> U+02518 <td> <span class=glyph></span> <tr id=entity-boxUR><td> <code>boxUR;</code> <td> U+0255A <td> <span class=glyph></span> <tr id=entity-boxUr><td> <code>boxUr;</code> <td> U+02559 <td> <span class=glyph></span> <tr id=entity-boxuR><td> <code>boxuR;</code> <td> U+02558 <td> <span class=glyph></span> <tr id=entity-boxur><td> <code>boxur;</code> <td> U+02514 <td> <span class=glyph></span> <tr id=entity-boxV><td> <code>boxV;</code> <td> U+02551 <td> <span class=glyph></span> <tr id=entity-boxv><td> <code>boxv;</code> <td> U+02502 <td> <span class=glyph></span> <tr id=entity-boxVH><td> <code>boxVH;</code> <td> U+0256C <td> <span class=glyph></span> <tr id=entity-boxVh><td> <code>boxVh;</code> <td> U+0256B <td> <span class=glyph></span> <tr id=entity-boxvH><td> <code>boxvH;</code> <td> U+0256A <td> <span class=glyph></span> <tr id=entity-boxvh><td> <code>boxvh;</code> <td> U+0253C <td> <span class=glyph></span> <tr id=entity-boxVL><td> <code>boxVL;</code> <td> U+02563 <td> <span class=glyph></span> <tr id=entity-boxVl><td> <code>boxVl;</code> <td> U+02562 <td> <span class=glyph></span> <tr id=entity-boxvL><td> <code>boxvL;</code> <td> U+02561 <td> <span class=glyph></span> <tr id=entity-boxvl><td> <code>boxvl;</code> <td> U+02524 <td> <span class=glyph></span> <tr id=entity-boxVR><td> <code>boxVR;</code> <td> U+02560 <td> <span class=glyph></span> <tr id=entity-boxVr><td> <code>boxVr;</code> <td> U+0255F <td> <span class=glyph></span> <tr id=entity-boxvR><td> <code>boxvR;</code> <td> U+0255E <td> <span class=glyph></span> <tr id=entity-boxvr><td> <code>boxvr;</code> <td> U+0251C <td> <span class=glyph></span> <tr id=entity-bprime><td> <code>bprime;</code> <td> U+02035 <td> <span class=glyph></span> <tr id=entity-Breve><td> <code>Breve;</code> <td> U+002D8 <td> <span class=glyph></span> <tr id=entity-breve><td> <code>breve;</code> <td> U+002D8 <td> <span class=glyph></span> <tr id=entity-brvbar><td> <code>brvbar;</code> <td> U+000A6 <td> <span class=glyph></span> <tr id=entity-brvbar-legacy class=impl><td> <code>brvbar</code> <td> U+000A6 <td> <span></span> <tr id=entity-Bscr><td> <code>Bscr;</code> <td> U+0212C <td> <span class=glyph></span> <tr id=entity-bscr><td> <code>bscr;</code> <td> U+1D4B7 <td> <span class=glyph></span> <tr id=entity-bsemi><td> <code>bsemi;</code> <td> U+0204F <td> <span class=glyph></span> <tr id=entity-bsim><td> <code>bsim;</code> <td> U+0223D <td> <span class=glyph></span> <tr id=entity-bsime><td> <code>bsime;</code> <td> U+022CD <td> <span class=glyph></span> <tr id=entity-bsol><td> <code>bsol;</code> <td> U+0005C <td> <span class=glyph>\</span> <tr id=entity-bsolb><td> <code>bsolb;</code> <td> U+029C5 <td> <span class=glyph></span> <tr id=entity-bsolhsub><td> <code>bsolhsub;</code> <td> U+027C8 <td> <span class=glyph></span> <tr id=entity-bull><td> <code>bull;</code> <td> U+02022 <td> <span class=glyph></span> <tr id=entity-bullet><td> <code>bullet;</code> <td> U+02022 <td> <span class=glyph></span> <tr id=entity-bump><td> <code>bump;</code> <td> U+0224E <td> <span class=glyph></span> <tr id=entity-bumpE><td> <code>bumpE;</code> <td> U+02AAE <td> <span class=glyph></span> <tr id=entity-bumpe><td> <code>bumpe;</code> <td> U+0224F <td> <span class=glyph></span> <tr id=entity-Bumpeq><td> <code>Bumpeq;</code> <td> U+0224E <td> <span class=glyph></span> <tr id=entity-bumpeq><td> <code>bumpeq;</code> <td> U+0224F <td> <span class=glyph></span> <tr id=entity-Cacute><td> <code>Cacute;</code> <td> U+00106 <td> <span class=glyph></span> <tr id=entity-cacute><td> <code>cacute;</code> <td> U+00107 <td> <span class=glyph></span> <tr id=entity-Cap><td> <code>Cap;</code> <td> U+022D2 <td> <span class=glyph></span> <tr id=entity-cap><td> <code>cap;</code> <td> U+02229 <td> <span class=glyph></span> <tr id=entity-capand><td> <code>capand;</code> <td> U+02A44 <td> <span class=glyph></span> <tr id=entity-capbrcup><td> <code>capbrcup;</code> <td> U+02A49 <td> <span class=glyph></span> <tr id=entity-capcap><td> <code>capcap;</code> <td> U+02A4B <td> <span class=glyph></span> <tr id=entity-capcup><td> <code>capcup;</code> <td> U+02A47 <td> <span class=glyph></span> <tr id=entity-capdot><td> <code>capdot;</code> <td> U+02A40 <td> <span class=glyph></span> <tr id=entity-CapitalDifferentialD><td> <code>CapitalDifferentialD;</code> <td> U+02145 <td> <span class=glyph></span> <tr id=entity-caps><td> <code>caps;</code> <td> U+02229 U+0FE00 <td> <span class="glyph compound"></span> <tr id=entity-caret><td> <code>caret;</code> <td> U+02041 <td> <span class=glyph></span> <tr id=entity-caron><td> <code>caron;</code> <td> U+002C7 <td> <span class=glyph></span> <tr id=entity-Cayleys><td> <code>Cayleys;</code> <td> U+0212D <td> <span class=glyph></span> <tr id=entity-ccaps><td> <code>ccaps;</code> <td> U+02A4D <td> <span class=glyph></span> <tr id=entity-Ccaron><td> <code>Ccaron;</code> <td> U+0010C <td> <span class=glyph></span> <tr id=entity-ccaron><td> <code>ccaron;</code> <td> U+0010D <td> <span class=glyph></span> <tr id=entity-Ccedil><td> <code>Ccedil;</code> <td> U+000C7 <td> <span class=glyph></span> <tr id=entity-Ccedil-legacy class=impl><td> <code>Ccedil</code> <td> U+000C7 <td> <span></span> <tr id=entity-ccedil><td> <code>ccedil;</code> <td> U+000E7 <td> <span class=glyph></span> <tr id=entity-ccedil-legacy class=impl><td> <code>ccedil</code> <td> U+000E7 <td> <span></span> <tr id=entity-Ccirc><td> <code>Ccirc;</code> <td> U+00108 <td> <span class=glyph></span> <tr id=entity-ccirc><td> <code>ccirc;</code> <td> U+00109 <td> <span class=glyph></span> <tr id=entity-Cconint><td> <code>Cconint;</code> <td> U+02230 <td> <span class=glyph></span> <tr id=entity-ccups><td> <code>ccups;</code> <td> U+02A4C <td> <span class=glyph></span> <tr id=entity-ccupssm><td> <code>ccupssm;</code> <td> U+02A50 <td> <span class=glyph></span> <tr id=entity-Cdot><td> <code>Cdot;</code> <td> U+0010A <td> <span class=glyph></span> <tr id=entity-cdot><td> <code>cdot;</code> <td> U+0010B <td> <span class=glyph></span> <tr id=entity-cedil><td> <code>cedil;</code> <td> U+000B8 <td> <span class=glyph></span> <tr id=entity-cedil-legacy class=impl><td> <code>cedil</code> <td> U+000B8 <td> <span></span> <tr id=entity-Cedilla><td> <code>Cedilla;</code> <td> U+000B8 <td> <span class=glyph></span> <tr id=entity-cemptyv><td> <code>cemptyv;</code> <td> U+029B2 <td> <span class=glyph></span> <tr id=entity-cent><td> <code>cent;</code> <td> U+000A2 <td> <span class=glyph></span> <tr id=entity-cent-legacy class=impl><td> <code>cent</code> <td> U+000A2 <td> <span></span> <tr id=entity-CenterDot><td> <code>CenterDot;</code> <td> U+000B7 <td> <span class=glyph></span> <tr id=entity-centerdot><td> <code>centerdot;</code> <td> U+000B7 <td> <span class=glyph></span> <tr id=entity-Cfr><td> <code>Cfr;</code> <td> U+0212D <td> <span class=glyph></span> <tr id=entity-cfr><td> <code>cfr;</code> <td> U+1D520 <td> <span class=glyph></span> <tr id=entity-CHcy><td> <code>CHcy;</code> <td> U+00427 <td> <span class=glyph></span> <tr id=entity-chcy><td> <code>chcy;</code> <td> U+00447 <td> <span class=glyph></span> <tr id=entity-check><td> <code>check;</code> <td> U+02713 <td> <span class=glyph></span> <tr id=entity-checkmark><td> <code>checkmark;</code> <td> U+02713 <td> <span class=glyph></span> <tr id=entity-Chi><td> <code>Chi;</code> <td> U+003A7 <td> <span class=glyph></span> <tr id=entity-chi><td> <code>chi;</code> <td> U+003C7 <td> <span class=glyph></span> <tr id=entity-cir><td> <code>cir;</code> <td> U+025CB <td> <span class=glyph></span> <tr id=entity-circ><td> <code>circ;</code> <td> U+002C6 <td> <span class=glyph></span> <tr id=entity-circeq><td> <code>circeq;</code> <td> U+02257 <td> <span class=glyph></span> <tr id=entity-circlearrowleft><td> <code>circlearrowleft;</code> <td> U+021BA <td> <span class=glyph></span> <tr id=entity-circlearrowright><td> <code>circlearrowright;</code> <td> U+021BB <td> <span class=glyph></span> <tr id=entity-circledast><td> <code>circledast;</code> <td> U+0229B <td> <span class=glyph></span> <tr id=entity-circledcirc><td> <code>circledcirc;</code> <td> U+0229A <td> <span class=glyph></span> <tr id=entity-circleddash><td> <code>circleddash;</code> <td> U+0229D <td> <span class=glyph></span> <tr id=entity-CircleDot><td> <code>CircleDot;</code> <td> U+02299 <td> <span class=glyph></span> <tr id=entity-circledR><td> <code>circledR;</code> <td> U+000AE <td> <span class=glyph></span> <tr id=entity-circledS><td> <code>circledS;</code> <td> U+024C8 <td> <span class=glyph></span> <tr id=entity-CircleMinus><td> <code>CircleMinus;</code> <td> U+02296 <td> <span class=glyph></span> <tr id=entity-CirclePlus><td> <code>CirclePlus;</code> <td> U+02295 <td> <span class=glyph></span> <tr id=entity-CircleTimes><td> <code>CircleTimes;</code> <td> U+02297 <td> <span class=glyph></span> <tr id=entity-cirE><td> <code>cirE;</code> <td> U+029C3 <td> <span class=glyph></span> <tr id=entity-cire><td> <code>cire;</code> <td> U+02257 <td> <span class=glyph></span> <tr id=entity-cirfnint><td> <code>cirfnint;</code> <td> U+02A10 <td> <span class=glyph></span> <tr id=entity-cirmid><td> <code>cirmid;</code> <td> U+02AEF <td> <span class=glyph></span> <tr id=entity-cirscir><td> <code>cirscir;</code> <td> U+029C2 <td> <span class=glyph></span> <tr id=entity-ClockwiseContourIntegral><td> <code>ClockwiseContourIntegral;</code> <td> U+02232 <td> <span class=glyph></span> <tr id=entity-CloseCurlyDoubleQuote><td> <code>CloseCurlyDoubleQuote;</code> <td> U+0201D <td> <span class=glyph></span> <tr id=entity-CloseCurlyQuote><td> <code>CloseCurlyQuote;</code> <td> U+02019 <td> <span class=glyph></span> <tr id=entity-clubs><td> <code>clubs;</code> <td> U+02663 <td> <span class=glyph></span> <tr id=entity-clubsuit><td> <code>clubsuit;</code> <td> U+02663 <td> <span class=glyph></span> <tr id=entity-Colon><td> <code>Colon;</code> <td> U+02237 <td> <span class=glyph></span> <tr id=entity-colon><td> <code>colon;</code> <td> U+0003A <td> <span class=glyph>:</span> <tr id=entity-Colone><td> <code>Colone;</code> <td> U+02A74 <td> <span class=glyph></span> <tr id=entity-colone><td> <code>colone;</code> <td> U+02254 <td> <span class=glyph></span> <tr id=entity-coloneq><td> <code>coloneq;</code> <td> U+02254 <td> <span class=glyph></span> <tr id=entity-comma><td> <code>comma;</code> <td> U+0002C <td> <span class=glyph>,</span> <tr id=entity-commat><td> <code>commat;</code> <td> U+00040 <td> <span class=glyph>@</span> <tr id=entity-comp><td> <code>comp;</code> <td> U+02201 <td> <span class=glyph></span> <tr id=entity-compfn><td> <code>compfn;</code> <td> U+02218 <td> <span class=glyph></span> <tr id=entity-complement><td> <code>complement;</code> <td> U+02201 <td> <span class=glyph></span> <tr id=entity-complexes><td> <code>complexes;</code> <td> U+02102 <td> <span class=glyph></span> <tr id=entity-cong><td> <code>cong;</code> <td> U+02245 <td> <span class=glyph></span> <tr id=entity-congdot><td> <code>congdot;</code> <td> U+02A6D <td> <span class=glyph></span> <tr id=entity-Congruent><td> <code>Congruent;</code> <td> U+02261 <td> <span class=glyph></span> <tr id=entity-Conint><td> <code>Conint;</code> <td> U+0222F <td> <span class=glyph></span> <tr id=entity-conint><td> <code>conint;</code> <td> U+0222E <td> <span class=glyph></span> <tr id=entity-ContourIntegral><td> <code>ContourIntegral;</code> <td> U+0222E <td> <span class=glyph></span> <tr id=entity-Copf><td> <code>Copf;</code> <td> U+02102 <td> <span class=glyph></span> <tr id=entity-copf><td> <code>copf;</code> <td> U+1D554 <td> <span class=glyph></span> <tr id=entity-coprod><td> <code>coprod;</code> <td> U+02210 <td> <span class=glyph></span> <tr id=entity-Coproduct><td> <code>Coproduct;</code> <td> U+02210 <td> <span class=glyph></span> <tr id=entity-COPY><td> <code>COPY;</code> <td> U+000A9 <td> <span class=glyph></span> <tr id=entity-COPY-legacy class=impl><td> <code>COPY</code> <td> U+000A9 <td> <span></span> <tr id=entity-copy><td> <code>copy;</code> <td> U+000A9 <td> <span class=glyph></span> <tr id=entity-copy-legacy class=impl><td> <code>copy</code> <td> U+000A9 <td> <span></span> <tr id=entity-copysr><td> <code>copysr;</code> <td> U+02117 <td> <span class=glyph></span> <tr id=entity-CounterClockwiseContourIntegral><td> <code>CounterClockwiseContourIntegral;</code> <td> U+02233 <td> <span class=glyph></span> <tr id=entity-crarr><td> <code>crarr;</code> <td> U+021B5 <td> <span class=glyph></span> <tr id=entity-Cross><td> <code>Cross;</code> <td> U+02A2F <td> <span class=glyph></span> <tr id=entity-cross><td> <code>cross;</code> <td> U+02717 <td> <span class=glyph></span> <tr id=entity-Cscr><td> <code>Cscr;</code> <td> U+1D49E <td> <span class=glyph></span> <tr id=entity-cscr><td> <code>cscr;</code> <td> U+1D4B8 <td> <span class=glyph></span> <tr id=entity-csub><td> <code>csub;</code> <td> U+02ACF <td> <span class=glyph></span> <tr id=entity-csube><td> <code>csube;</code> <td> U+02AD1 <td> <span class=glyph></span> <tr id=entity-csup><td> <code>csup;</code> <td> U+02AD0 <td> <span class=glyph></span> <tr id=entity-csupe><td> <code>csupe;</code> <td> U+02AD2 <td> <span class=glyph></span> <tr id=entity-ctdot><td> <code>ctdot;</code> <td> U+022EF <td> <span class=glyph></span> <tr id=entity-cudarrl><td> <code>cudarrl;</code> <td> U+02938 <td> <span class=glyph></span> <tr id=entity-cudarrr><td> <code>cudarrr;</code> <td> U+02935 <td> <span class=glyph></span> <tr id=entity-cuepr><td> <code>cuepr;</code> <td> U+022DE <td> <span class=glyph></span> <tr id=entity-cuesc><td> <code>cuesc;</code> <td> U+022DF <td> <span class=glyph></span> <tr id=entity-cularr><td> <code>cularr;</code> <td> U+021B6 <td> <span class=glyph></span> <tr id=entity-cularrp><td> <code>cularrp;</code> <td> U+0293D <td> <span class=glyph></span> <tr id=entity-Cup><td> <code>Cup;</code> <td> U+022D3 <td> <span class=glyph></span> <tr id=entity-cup><td> <code>cup;</code> <td> U+0222A <td> <span class=glyph></span> <tr id=entity-cupbrcap><td> <code>cupbrcap;</code> <td> U+02A48 <td> <span class=glyph></span> <tr id=entity-CupCap><td> <code>CupCap;</code> <td> U+0224D <td> <span class=glyph></span> <tr id=entity-cupcap><td> <code>cupcap;</code> <td> U+02A46 <td> <span class=glyph></span> <tr id=entity-cupcup><td> <code>cupcup;</code> <td> U+02A4A <td> <span class=glyph></span> <tr id=entity-cupdot><td> <code>cupdot;</code> <td> U+0228D <td> <span class=glyph></span> <tr id=entity-cupor><td> <code>cupor;</code> <td> U+02A45 <td> <span class=glyph></span> <tr id=entity-cups><td> <code>cups;</code> <td> U+0222A U+0FE00 <td> <span class="glyph compound"></span> <tr id=entity-curarr><td> <code>curarr;</code> <td> U+021B7 <td> <span class=glyph></span> <tr id=entity-curarrm><td> <code>curarrm;</code> <td> U+0293C <td> <span class=glyph></span> <tr id=entity-curlyeqprec><td> <code>curlyeqprec;</code> <td> U+022DE <td> <span class=glyph></span> <tr id=entity-curlyeqsucc><td> <code>curlyeqsucc;</code> <td> U+022DF <td> <span class=glyph></span> <tr id=entity-curlyvee><td> <code>curlyvee;</code> <td> U+022CE <td> <span class=glyph></span> <tr id=entity-curlywedge><td> <code>curlywedge;</code> <td> U+022CF <td> <span class=glyph></span> <tr id=entity-curren><td> <code>curren;</code> <td> U+000A4 <td> <span class=glyph></span> <tr id=entity-curren-legacy class=impl><td> <code>curren</code> <td> U+000A4 <td> <span></span> <tr id=entity-curvearrowleft><td> <code>curvearrowleft;</code> <td> U+021B6 <td> <span class=glyph></span> <tr id=entity-curvearrowright><td> <code>curvearrowright;</code> <td> U+021B7 <td> <span class=glyph></span> <tr id=entity-cuvee><td> <code>cuvee;</code> <td> U+022CE <td> <span class=glyph></span> <tr id=entity-cuwed><td> <code>cuwed;</code> <td> U+022CF <td> <span class=glyph></span> <tr id=entity-cwconint><td> <code>cwconint;</code> <td> U+02232 <td> <span class=glyph></span> <tr id=entity-cwint><td> <code>cwint;</code> <td> U+02231 <td> <span class=glyph></span> <tr id=entity-cylcty><td> <code>cylcty;</code> <td> U+0232D <td> <span class=glyph></span> <tr id=entity-Dagger><td> <code>Dagger;</code> <td> U+02021 <td> <span class=glyph></span> <tr id=entity-dagger><td> <code>dagger;</code> <td> U+02020 <td> <span class=glyph></span> <tr id=entity-daleth><td> <code>daleth;</code> <td> U+02138 <td> <span class=glyph></span> <tr id=entity-Darr><td> <code>Darr;</code> <td> U+021A1 <td> <span class=glyph></span> <tr id=entity-dArr><td> <code>dArr;</code> <td> U+021D3 <td> <span class=glyph></span> <tr id=entity-darr><td> <code>darr;</code> <td> U+02193 <td> <span class=glyph></span> <tr id=entity-dash><td> <code>dash;</code> <td> U+02010 <td> <span class=glyph></span> <tr id=entity-Dashv><td> <code>Dashv;</code> <td> U+02AE4 <td> <span class=glyph></span> <tr id=entity-dashv><td> <code>dashv;</code> <td> U+022A3 <td> <span class=glyph></span> <tr id=entity-dbkarow><td> <code>dbkarow;</code> <td> U+0290F <td> <span class=glyph></span> <tr id=entity-dblac><td> <code>dblac;</code> <td> U+002DD <td> <span class=glyph></span> <tr id=entity-Dcaron><td> <code>Dcaron;</code> <td> U+0010E <td> <span class=glyph></span> <tr id=entity-dcaron><td> <code>dcaron;</code> <td> U+0010F <td> <span class=glyph></span> <tr id=entity-Dcy><td> <code>Dcy;</code> <td> U+00414 <td> <span class=glyph></span> <tr id=entity-dcy><td> <code>dcy;</code> <td> U+00434 <td> <span class=glyph></span> <tr id=entity-DD><td> <code>DD;</code> <td> U+02145 <td> <span class=glyph></span> <tr id=entity-dd><td> <code>dd;</code> <td> U+02146 <td> <span class=glyph></span> <tr id=entity-ddagger><td> <code>ddagger;</code> <td> U+02021 <td> <span class=glyph></span> <tr id=entity-ddarr><td> <code>ddarr;</code> <td> U+021CA <td> <span class=glyph></span> <tr id=entity-DDotrahd><td> <code>DDotrahd;</code> <td> U+02911 <td> <span class=glyph></span> <tr id=entity-ddotseq><td> <code>ddotseq;</code> <td> U+02A77 <td> <span class=glyph></span> <tr id=entity-deg><td> <code>deg;</code> <td> U+000B0 <td> <span class=glyph></span> <tr id=entity-deg-legacy class=impl><td> <code>deg</code> <td> U+000B0 <td> <span></span> <tr id=entity-Del><td> <code>Del;</code> <td> U+02207 <td> <span class=glyph></span> <tr id=entity-Delta><td> <code>Delta;</code> <td> U+00394 <td> <span class=glyph></span> <tr id=entity-delta><td> <code>delta;</code> <td> U+003B4 <td> <span class=glyph></span> <tr id=entity-demptyv><td> <code>demptyv;</code> <td> U+029B1 <td> <span class=glyph></span> <tr id=entity-dfisht><td> <code>dfisht;</code> <td> U+0297F <td> <span class=glyph></span> <tr id=entity-Dfr><td> <code>Dfr;</code> <td> U+1D507 <td> <span class=glyph></span> <tr id=entity-dfr><td> <code>dfr;</code> <td> U+1D521 <td> <span class=glyph></span> <tr id=entity-dHar><td> <code>dHar;</code> <td> U+02965 <td> <span class=glyph></span> <tr id=entity-dharl><td> <code>dharl;</code> <td> U+021C3 <td> <span class=glyph></span> <tr id=entity-dharr><td> <code>dharr;</code> <td> U+021C2 <td> <span class=glyph></span> <tr id=entity-DiacriticalAcute><td> <code>DiacriticalAcute;</code> <td> U+000B4 <td> <span class=glyph></span> <tr id=entity-DiacriticalDot><td> <code>DiacriticalDot;</code> <td> U+002D9 <td> <span class=glyph></span> <tr id=entity-DiacriticalDoubleAcute><td> <code>DiacriticalDoubleAcute;</code> <td> U+002DD <td> <span class=glyph></span> <tr id=entity-DiacriticalGrave><td> <code>DiacriticalGrave;</code> <td> U+00060 <td> <span class=glyph>`</span> <tr id=entity-DiacriticalTilde><td> <code>DiacriticalTilde;</code> <td> U+002DC <td> <span class=glyph></span> <tr id=entity-diam><td> <code>diam;</code> <td> U+022C4 <td> <span class=glyph></span> <tr id=entity-Diamond><td> <code>Diamond;</code> <td> U+022C4 <td> <span class=glyph></span> <tr id=entity-diamond><td> <code>diamond;</code> <td> U+022C4 <td> <span class=glyph></span> <tr id=entity-diamondsuit><td> <code>diamondsuit;</code> <td> U+02666 <td> <span class=glyph></span> <tr id=entity-diams><td> <code>diams;</code> <td> U+02666 <td> <span class=glyph></span> <tr id=entity-die><td> <code>die;</code> <td> U+000A8 <td> <span class=glyph></span> <tr id=entity-DifferentialD><td> <code>DifferentialD;</code> <td> U+02146 <td> <span class=glyph></span> <tr id=entity-digamma><td> <code>digamma;</code> <td> U+003DD <td> <span class=glyph></span> <tr id=entity-disin><td> <code>disin;</code> <td> U+022F2 <td> <span class=glyph></span> <tr id=entity-div><td> <code>div;</code> <td> U+000F7 <td> <span class=glyph></span> <tr id=entity-divide><td> <code>divide;</code> <td> U+000F7 <td> <span class=glyph></span> <tr id=entity-divide-legacy class=impl><td> <code>divide</code> <td> U+000F7 <td> <span></span> <tr id=entity-divideontimes><td> <code>divideontimes;</code> <td> U+022C7 <td> <span class=glyph></span> <tr id=entity-divonx><td> <code>divonx;</code> <td> U+022C7 <td> <span class=glyph></span> <tr id=entity-DJcy><td> <code>DJcy;</code> <td> U+00402 <td> <span class=glyph></span> <tr id=entity-djcy><td> <code>djcy;</code> <td> U+00452 <td> <span class=glyph></span> <tr id=entity-dlcorn><td> <code>dlcorn;</code> <td> U+0231E <td> <span class=glyph></span> <tr id=entity-dlcrop><td> <code>dlcrop;</code> <td> U+0230D <td> <span class=glyph></span> <tr id=entity-dollar><td> <code>dollar;</code> <td> U+00024 <td> <span class=glyph>$</span> <tr id=entity-Dopf><td> <code>Dopf;</code> <td> U+1D53B <td> <span class=glyph></span> <tr id=entity-dopf><td> <code>dopf;</code> <td> U+1D555 <td> <span class=glyph></span> <tr id=entity-Dot><td> <code>Dot;</code> <td> U+000A8 <td> <span class=glyph></span> <tr id=entity-dot><td> <code>dot;</code> <td> U+002D9 <td> <span class=glyph></span> <tr id=entity-DotDot><td> <code>DotDot;</code> <td> U+020DC <td> <span class="glyph composition"></span> <tr id=entity-doteq><td> <code>doteq;</code> <td> U+02250 <td> <span class=glyph></span> <tr id=entity-doteqdot><td> <code>doteqdot;</code> <td> U+02251 <td> <span class=glyph></span> <tr id=entity-DotEqual><td> <code>DotEqual;</code> <td> U+02250 <td> <span class=glyph></span> <tr id=entity-dotminus><td> <code>dotminus;</code> <td> U+02238 <td> <span class=glyph></span> <tr id=entity-dotplus><td> <code>dotplus;</code> <td> U+02214 <td> <span class=glyph></span> <tr id=entity-dotsquare><td> <code>dotsquare;</code> <td> U+022A1 <td> <span class=glyph></span> <tr id=entity-doublebarwedge><td> <code>doublebarwedge;</code> <td> U+02306 <td> <span class=glyph></span> <tr id=entity-DoubleContourIntegral><td> <code>DoubleContourIntegral;</code> <td> U+0222F <td> <span class=glyph></span> <tr id=entity-DoubleDot><td> <code>DoubleDot;</code> <td> U+000A8 <td> <span class=glyph></span> <tr id=entity-DoubleDownArrow><td> <code>DoubleDownArrow;</code> <td> U+021D3 <td> <span class=glyph></span> <tr id=entity-DoubleLeftArrow><td> <code>DoubleLeftArrow;</code> <td> U+021D0 <td> <span class=glyph></span> <tr id=entity-DoubleLeftRightArrow><td> <code>DoubleLeftRightArrow;</code> <td> U+021D4 <td> <span class=glyph></span> <tr id=entity-DoubleLeftTee><td> <code>DoubleLeftTee;</code> <td> U+02AE4 <td> <span class=glyph></span> <tr id=entity-DoubleLongLeftArrow><td> <code>DoubleLongLeftArrow;</code> <td> U+027F8 <td> <span class=glyph></span> <tr id=entity-DoubleLongLeftRightArrow><td> <code>DoubleLongLeftRightArrow;</code> <td> U+027FA <td> <span class=glyph></span> <tr id=entity-DoubleLongRightArrow><td> <code>DoubleLongRightArrow;</code> <td> U+027F9 <td> <span class=glyph></span> <tr id=entity-DoubleRightArrow><td> <code>DoubleRightArrow;</code> <td> U+021D2 <td> <span class=glyph></span> <tr id=entity-DoubleRightTee><td> <code>DoubleRightTee;</code> <td> U+022A8 <td> <span class=glyph></span> <tr id=entity-DoubleUpArrow><td> <code>DoubleUpArrow;</code> <td> U+021D1 <td> <span class=glyph></span> <tr id=entity-DoubleUpDownArrow><td> <code>DoubleUpDownArrow;</code> <td> U+021D5 <td> <span class=glyph></span> <tr id=entity-DoubleVerticalBar><td> <code>DoubleVerticalBar;</code> <td> U+02225 <td> <span class=glyph></span> <tr id=entity-DownArrow><td> <code>DownArrow;</code> <td> U+02193 <td> <span class=glyph></span> <tr id=entity-Downarrow><td> <code>Downarrow;</code> <td> U+021D3 <td> <span class=glyph></span> <tr id=entity-downarrow><td> <code>downarrow;</code> <td> U+02193 <td> <span class=glyph></span> <tr id=entity-DownArrowBar><td> <code>DownArrowBar;</code> <td> U+02913 <td> <span class=glyph></span> <tr id=entity-DownArrowUpArrow><td> <code>DownArrowUpArrow;</code> <td> U+021F5 <td> <span class=glyph></span> <tr id=entity-DownBreve><td> <code>DownBreve;</code> <td> U+00311 <td> <span class="glyph composition"></span> <tr id=entity-downdownarrows><td> <code>downdownarrows;</code> <td> U+021CA <td> <span class=glyph></span> <tr id=entity-downharpoonleft><td> <code>downharpoonleft;</code> <td> U+021C3 <td> <span class=glyph></span> <tr id=entity-downharpoonright><td> <code>downharpoonright;</code> <td> U+021C2 <td> <span class=glyph></span> <tr id=entity-DownLeftRightVector><td> <code>DownLeftRightVector;</code> <td> U+02950 <td> <span class=glyph></span> <tr id=entity-DownLeftTeeVector><td> <code>DownLeftTeeVector;</code> <td> U+0295E <td> <span class=glyph></span> <tr id=entity-DownLeftVector><td> <code>DownLeftVector;</code> <td> U+021BD <td> <span class=glyph></span> <tr id=entity-DownLeftVectorBar><td> <code>DownLeftVectorBar;</code> <td> U+02956 <td> <span class=glyph></span> <tr id=entity-DownRightTeeVector><td> <code>DownRightTeeVector;</code> <td> U+0295F <td> <span class=glyph></span> <tr id=entity-DownRightVector><td> <code>DownRightVector;</code> <td> U+021C1 <td> <span class=glyph></span> <tr id=entity-DownRightVectorBar><td> <code>DownRightVectorBar;</code> <td> U+02957 <td> <span class=glyph></span> <tr id=entity-DownTee><td> <code>DownTee;</code> <td> U+022A4 <td> <span class=glyph></span> <tr id=entity-DownTeeArrow><td> <code>DownTeeArrow;</code> <td> U+021A7 <td> <span class=glyph></span> <tr id=entity-drbkarow><td> <code>drbkarow;</code> <td> U+02910 <td> <span class=glyph></span> <tr id=entity-drcorn><td> <code>drcorn;</code> <td> U+0231F <td> <span class=glyph></span> <tr id=entity-drcrop><td> <code>drcrop;</code> <td> U+0230C <td> <span class=glyph></span> <tr id=entity-Dscr><td> <code>Dscr;</code> <td> U+1D49F <td> <span class=glyph></span> <tr id=entity-dscr><td> <code>dscr;</code> <td> U+1D4B9 <td> <span class=glyph></span> <tr id=entity-DScy><td> <code>DScy;</code> <td> U+00405 <td> <span class=glyph></span> <tr id=entity-dscy><td> <code>dscy;</code> <td> U+00455 <td> <span class=glyph></span> <tr id=entity-dsol><td> <code>dsol;</code> <td> U+029F6 <td> <span class=glyph></span> <tr id=entity-Dstrok><td> <code>Dstrok;</code> <td> U+00110 <td> <span class=glyph></span> <tr id=entity-dstrok><td> <code>dstrok;</code> <td> U+00111 <td> <span class=glyph></span> <tr id=entity-dtdot><td> <code>dtdot;</code> <td> U+022F1 <td> <span class=glyph></span> <tr id=entity-dtri><td> <code>dtri;</code> <td> U+025BF <td> <span class=glyph></span> <tr id=entity-dtrif><td> <code>dtrif;</code> <td> U+025BE <td> <span class=glyph></span> <tr id=entity-duarr><td> <code>duarr;</code> <td> U+021F5 <td> <span class=glyph></span> <tr id=entity-duhar><td> <code>duhar;</code> <td> U+0296F <td> <span class=glyph></span> <tr id=entity-dwangle><td> <code>dwangle;</code> <td> U+029A6 <td> <span class=glyph></span> <tr id=entity-DZcy><td> <code>DZcy;</code> <td> U+0040F <td> <span class=glyph></span> <tr id=entity-dzcy><td> <code>dzcy;</code> <td> U+0045F <td> <span class=glyph></span> <tr id=entity-dzigrarr><td> <code>dzigrarr;</code> <td> U+027FF <td> <span class=glyph></span> <tr id=entity-Eacute><td> <code>Eacute;</code> <td> U+000C9 <td> <span class=glyph></span> <tr id=entity-Eacute-legacy class=impl><td> <code>Eacute</code> <td> U+000C9 <td> <span></span> <tr id=entity-eacute><td> <code>eacute;</code> <td> U+000E9 <td> <span class=glyph></span> <tr id=entity-eacute-legacy class=impl><td> <code>eacute</code> <td> U+000E9 <td> <span></span> <tr id=entity-easter><td> <code>easter;</code> <td> U+02A6E <td> <span class=glyph></span> <tr id=entity-Ecaron><td> <code>Ecaron;</code> <td> U+0011A <td> <span class=glyph></span> <tr id=entity-ecaron><td> <code>ecaron;</code> <td> U+0011B <td> <span class=glyph></span> <tr id=entity-ecir><td> <code>ecir;</code> <td> U+02256 <td> <span class=glyph></span> <tr id=entity-Ecirc><td> <code>Ecirc;</code> <td> U+000CA <td> <span class=glyph></span> <tr id=entity-Ecirc-legacy class=impl><td> <code>Ecirc</code> <td> U+000CA <td> <span></span> <tr id=entity-ecirc><td> <code>ecirc;</code> <td> U+000EA <td> <span class=glyph></span> <tr id=entity-ecirc-legacy class=impl><td> <code>ecirc</code> <td> U+000EA <td> <span></span> <tr id=entity-ecolon><td> <code>ecolon;</code> <td> U+02255 <td> <span class=glyph></span> <tr id=entity-Ecy><td> <code>Ecy;</code> <td> U+0042D <td> <span class=glyph></span> <tr id=entity-ecy><td> <code>ecy;</code> <td> U+0044D <td> <span class=glyph></span> <tr id=entity-eDDot><td> <code>eDDot;</code> <td> U+02A77 <td> <span class=glyph></span> <tr id=entity-Edot><td> <code>Edot;</code> <td> U+00116 <td> <span class=glyph></span> <tr id=entity-eDot><td> <code>eDot;</code> <td> U+02251 <td> <span class=glyph></span> <tr id=entity-edot><td> <code>edot;</code> <td> U+00117 <td> <span class=glyph></span> <tr id=entity-ee><td> <code>ee;</code> <td> U+02147 <td> <span class=glyph></span> <tr id=entity-efDot><td> <code>efDot;</code> <td> U+02252 <td> <span class=glyph></span> <tr id=entity-Efr><td> <code>Efr;</code> <td> U+1D508 <td> <span class=glyph></span> <tr id=entity-efr><td> <code>efr;</code> <td> U+1D522 <td> <span class=glyph></span> <tr id=entity-eg><td> <code>eg;</code> <td> U+02A9A <td> <span class=glyph></span> <tr id=entity-Egrave><td> <code>Egrave;</code> <td> U+000C8 <td> <span class=glyph></span> <tr id=entity-Egrave-legacy class=impl><td> <code>Egrave</code> <td> U+000C8 <td> <span></span> <tr id=entity-egrave><td> <code>egrave;</code> <td> U+000E8 <td> <span class=glyph></span> <tr id=entity-egrave-legacy class=impl><td> <code>egrave</code> <td> U+000E8 <td> <span></span> <tr id=entity-egs><td> <code>egs;</code> <td> U+02A96 <td> <span class=glyph></span> <tr id=entity-egsdot><td> <code>egsdot;</code> <td> U+02A98 <td> <span class=glyph></span> <tr id=entity-el><td> <code>el;</code> <td> U+02A99 <td> <span class=glyph></span> <tr id=entity-Element><td> <code>Element;</code> <td> U+02208 <td> <span class=glyph></span> <tr id=entity-elinters><td> <code>elinters;</code> <td> U+023E7 <td> <span class=glyph></span> <tr id=entity-ell><td> <code>ell;</code> <td> U+02113 <td> <span class=glyph></span> <tr id=entity-els><td> <code>els;</code> <td> U+02A95 <td> <span class=glyph></span> <tr id=entity-elsdot><td> <code>elsdot;</code> <td> U+02A97 <td> <span class=glyph></span> <tr id=entity-Emacr><td> <code>Emacr;</code> <td> U+00112 <td> <span class=glyph></span> <tr id=entity-emacr><td> <code>emacr;</code> <td> U+00113 <td> <span class=glyph></span> <tr id=entity-empty><td> <code>empty;</code> <td> U+02205 <td> <span class=glyph></span> <tr id=entity-emptyset><td> <code>emptyset;</code> <td> U+02205 <td> <span class=glyph></span> <tr id=entity-EmptySmallSquare><td> <code>EmptySmallSquare;</code> <td> U+025FB <td> <span class=glyph></span> <tr id=entity-emptyv><td> <code>emptyv;</code> <td> U+02205 <td> <span class=glyph></span> <tr id=entity-EmptyVerySmallSquare><td> <code>EmptyVerySmallSquare;</code> <td> U+025AB <td> <span class=glyph></span> <tr id=entity-emsp><td> <code>emsp;</code> <td> U+02003 <td> <span class=glyph></span> <tr id=entity-emsp13><td> <code>emsp13;</code> <td> U+02004 <td> <span class=glyph></span> <tr id=entity-emsp14><td> <code>emsp14;</code> <td> U+02005 <td> <span class=glyph></span> <tr id=entity-ENG><td> <code>ENG;</code> <td> U+0014A <td> <span class=glyph></span> <tr id=entity-eng><td> <code>eng;</code> <td> U+0014B <td> <span class=glyph></span> <tr id=entity-ensp><td> <code>ensp;</code> <td> U+02002 <td> <span class=glyph></span> <tr id=entity-Eogon><td> <code>Eogon;</code> <td> U+00118 <td> <span class=glyph></span> <tr id=entity-eogon><td> <code>eogon;</code> <td> U+00119 <td> <span class=glyph></span> <tr id=entity-Eopf><td> <code>Eopf;</code> <td> U+1D53C <td> <span class=glyph></span> <tr id=entity-eopf><td> <code>eopf;</code> <td> U+1D556 <td> <span class=glyph></span> <tr id=entity-epar><td> <code>epar;</code> <td> U+022D5 <td> <span class=glyph></span> <tr id=entity-eparsl><td> <code>eparsl;</code> <td> U+029E3 <td> <span class=glyph></span> <tr id=entity-eplus><td> <code>eplus;</code> <td> U+02A71 <td> <span class=glyph></span> <tr id=entity-epsi><td> <code>epsi;</code> <td> U+003B5 <td> <span class=glyph></span> <tr id=entity-Epsilon><td> <code>Epsilon;</code> <td> U+00395 <td> <span class=glyph></span> <tr id=entity-epsilon><td> <code>epsilon;</code> <td> U+003B5 <td> <span class=glyph></span> <tr id=entity-epsiv><td> <code>epsiv;</code> <td> U+003F5 <td> <span class=glyph></span> <tr id=entity-eqcirc><td> <code>eqcirc;</code> <td> U+02256 <td> <span class=glyph></span> <tr id=entity-eqcolon><td> <code>eqcolon;</code> <td> U+02255 <td> <span class=glyph></span> <tr id=entity-eqsim><td> <code>eqsim;</code> <td> U+02242 <td> <span class=glyph></span> <tr id=entity-eqslantgtr><td> <code>eqslantgtr;</code> <td> U+02A96 <td> <span class=glyph></span> <tr id=entity-eqslantless><td> <code>eqslantless;</code> <td> U+02A95 <td> <span class=glyph></span> <tr id=entity-Equal><td> <code>Equal;</code> <td> U+02A75 <td> <span class=glyph></span> <tr id=entity-equals><td> <code>equals;</code> <td> U+0003D <td> <span class=glyph>=</span> <tr id=entity-EqualTilde><td> <code>EqualTilde;</code> <td> U+02242 <td> <span class=glyph></span> <tr id=entity-equest><td> <code>equest;</code> <td> U+0225F <td> <span class=glyph></span> <tr id=entity-Equilibrium><td> <code>Equilibrium;</code> <td> U+021CC <td> <span class=glyph></span> <tr id=entity-equiv><td> <code>equiv;</code> <td> U+02261 <td> <span class=glyph></span> <tr id=entity-equivDD><td> <code>equivDD;</code> <td> U+02A78 <td> <span class=glyph></span> <tr id=entity-eqvparsl><td> <code>eqvparsl;</code> <td> U+029E5 <td> <span class=glyph></span> <tr id=entity-erarr><td> <code>erarr;</code> <td> U+02971 <td> <span class=glyph></span> <tr id=entity-erDot><td> <code>erDot;</code> <td> U+02253 <td> <span class=glyph></span> <tr id=entity-Escr><td> <code>Escr;</code> <td> U+02130 <td> <span class=glyph></span> <tr id=entity-escr><td> <code>escr;</code> <td> U+0212F <td> <span class=glyph></span> <tr id=entity-esdot><td> <code>esdot;</code> <td> U+02250 <td> <span class=glyph></span> <tr id=entity-Esim><td> <code>Esim;</code> <td> U+02A73 <td> <span class=glyph></span> <tr id=entity-esim><td> <code>esim;</code> <td> U+02242 <td> <span class=glyph></span> <tr id=entity-Eta><td> <code>Eta;</code> <td> U+00397 <td> <span class=glyph></span> <tr id=entity-eta><td> <code>eta;</code> <td> U+003B7 <td> <span class=glyph></span> <tr id=entity-ETH><td> <code>ETH;</code> <td> U+000D0 <td> <span class=glyph></span> <tr id=entity-ETH-legacy class=impl><td> <code>ETH</code> <td> U+000D0 <td> <span></span> <tr id=entity-eth><td> <code>eth;</code> <td> U+000F0 <td> <span class=glyph></span> <tr id=entity-eth-legacy class=impl><td> <code>eth</code> <td> U+000F0 <td> <span></span> <tr id=entity-Euml><td> <code>Euml;</code> <td> U+000CB <td> <span class=glyph></span> <tr id=entity-Euml-legacy class=impl><td> <code>Euml</code> <td> U+000CB <td> <span></span> <tr id=entity-euml><td> <code>euml;</code> <td> U+000EB <td> <span class=glyph></span> <tr id=entity-euml-legacy class=impl><td> <code>euml</code> <td> U+000EB <td> <span></span> <tr id=entity-euro><td> <code>euro;</code> <td> U+020AC <td> <span class=glyph></span> <tr id=entity-excl><td> <code>excl;</code> <td> U+00021 <td> <span class=glyph>!</span> <tr id=entity-exist><td> <code>exist;</code> <td> U+02203 <td> <span class=glyph></span> <tr id=entity-Exists><td> <code>Exists;</code> <td> U+02203 <td> <span class=glyph></span> <tr id=entity-expectation><td> <code>expectation;</code> <td> U+02130 <td> <span class=glyph></span> <tr id=entity-ExponentialE><td> <code>ExponentialE;</code> <td> U+02147 <td> <span class=glyph></span> <tr id=entity-exponentiale><td> <code>exponentiale;</code> <td> U+02147 <td> <span class=glyph></span> <tr id=entity-fallingdotseq><td> <code>fallingdotseq;</code> <td> U+02252 <td> <span class=glyph></span> <tr id=entity-Fcy><td> <code>Fcy;</code> <td> U+00424 <td> <span class=glyph></span> <tr id=entity-fcy><td> <code>fcy;</code> <td> U+00444 <td> <span class=glyph></span> <tr id=entity-female><td> <code>female;</code> <td> U+02640 <td> <span class=glyph></span> <tr id=entity-ffilig><td> <code>ffilig;</code> <td> U+0FB03 <td> <span class=glyph></span> <tr id=entity-fflig><td> <code>fflig;</code> <td> U+0FB00 <td> <span class=glyph></span> <tr id=entity-ffllig><td> <code>ffllig;</code> <td> U+0FB04 <td> <span class=glyph></span> <tr id=entity-Ffr><td> <code>Ffr;</code> <td> U+1D509 <td> <span class=glyph></span> <tr id=entity-ffr><td> <code>ffr;</code> <td> U+1D523 <td> <span class=glyph></span> <tr id=entity-filig><td> <code>filig;</code> <td> U+0FB01 <td> <span class=glyph></span> <tr id=entity-FilledSmallSquare><td> <code>FilledSmallSquare;</code> <td> U+025FC <td> <span class=glyph></span> <tr id=entity-FilledVerySmallSquare><td> <code>FilledVerySmallSquare;</code> <td> U+025AA <td> <span class=glyph></span> <tr id=entity-fjlig><td> <code>fjlig;</code> <td> U+00066 U+0006A <td> <span class="glyph compound">fj</span> <tr id=entity-flat><td> <code>flat;</code> <td> U+0266D <td> <span class=glyph></span> <tr id=entity-fllig><td> <code>fllig;</code> <td> U+0FB02 <td> <span class=glyph></span> <tr id=entity-fltns><td> <code>fltns;</code> <td> U+025B1 <td> <span class=glyph></span> <tr id=entity-fnof><td> <code>fnof;</code> <td> U+00192 <td> <span class=glyph></span> <tr id=entity-Fopf><td> <code>Fopf;</code> <td> U+1D53D <td> <span class=glyph></span> <tr id=entity-fopf><td> <code>fopf;</code> <td> U+1D557 <td> <span class=glyph></span> <tr id=entity-ForAll><td> <code>ForAll;</code> <td> U+02200 <td> <span class=glyph></span> <tr id=entity-forall><td> <code>forall;</code> <td> U+02200 <td> <span class=glyph></span> <tr id=entity-fork><td> <code>fork;</code> <td> U+022D4 <td> <span class=glyph></span> <tr id=entity-forkv><td> <code>forkv;</code> <td> U+02AD9 <td> <span class=glyph></span> <tr id=entity-Fouriertrf><td> <code>Fouriertrf;</code> <td> U+02131 <td> <span class=glyph></span> <tr id=entity-fpartint><td> <code>fpartint;</code> <td> U+02A0D <td> <span class=glyph></span> <tr id=entity-frac12><td> <code>frac12;</code> <td> U+000BD <td> <span class=glyph></span> <tr id=entity-frac12-legacy class=impl><td> <code>frac12</code> <td> U+000BD <td> <span></span> <tr id=entity-frac13><td> <code>frac13;</code> <td> U+02153 <td> <span class=glyph></span> <tr id=entity-frac14><td> <code>frac14;</code> <td> U+000BC <td> <span class=glyph></span> <tr id=entity-frac14-legacy class=impl><td> <code>frac14</code> <td> U+000BC <td> <span></span> <tr id=entity-frac15><td> <code>frac15;</code> <td> U+02155 <td> <span class=glyph></span> <tr id=entity-frac16><td> <code>frac16;</code> <td> U+02159 <td> <span class=glyph></span> <tr id=entity-frac18><td> <code>frac18;</code> <td> U+0215B <td> <span class=glyph></span> <tr id=entity-frac23><td> <code>frac23;</code> <td> U+02154 <td> <span class=glyph></span> <tr id=entity-frac25><td> <code>frac25;</code> <td> U+02156 <td> <span class=glyph></span> <tr id=entity-frac34><td> <code>frac34;</code> <td> U+000BE <td> <span class=glyph></span> <tr id=entity-frac34-legacy class=impl><td> <code>frac34</code> <td> U+000BE <td> <span></span> <tr id=entity-frac35><td> <code>frac35;</code> <td> U+02157 <td> <span class=glyph></span> <tr id=entity-frac38><td> <code>frac38;</code> <td> U+0215C <td> <span class=glyph></span> <tr id=entity-frac45><td> <code>frac45;</code> <td> U+02158 <td> <span class=glyph></span> <tr id=entity-frac56><td> <code>frac56;</code> <td> U+0215A <td> <span class=glyph></span> <tr id=entity-frac58><td> <code>frac58;</code> <td> U+0215D <td> <span class=glyph></span> <tr id=entity-frac78><td> <code>frac78;</code> <td> U+0215E <td> <span class=glyph></span> <tr id=entity-frasl><td> <code>frasl;</code> <td> U+02044 <td> <span class=glyph></span> <tr id=entity-frown><td> <code>frown;</code> <td> U+02322 <td> <span class=glyph></span> <tr id=entity-Fscr><td> <code>Fscr;</code> <td> U+02131 <td> <span class=glyph></span> <tr id=entity-fscr><td> <code>fscr;</code> <td> U+1D4BB <td> <span class=glyph></span> <tr id=entity-gacute><td> <code>gacute;</code> <td> U+001F5 <td> <span class=glyph></span> <tr id=entity-Gamma><td> <code>Gamma;</code> <td> U+00393 <td> <span class=glyph></span> <tr id=entity-gamma><td> <code>gamma;</code> <td> U+003B3 <td> <span class=glyph></span> <tr id=entity-Gammad><td> <code>Gammad;</code> <td> U+003DC <td> <span class=glyph></span> <tr id=entity-gammad><td> <code>gammad;</code> <td> U+003DD <td> <span class=glyph></span> <tr id=entity-gap><td> <code>gap;</code> <td> U+02A86 <td> <span class=glyph></span> <tr id=entity-Gbreve><td> <code>Gbreve;</code> <td> U+0011E <td> <span class=glyph></span> <tr id=entity-gbreve><td> <code>gbreve;</code> <td> U+0011F <td> <span class=glyph></span> <tr id=entity-Gcedil><td> <code>Gcedil;</code> <td> U+00122 <td> <span class=glyph></span> <tr id=entity-Gcirc><td> <code>Gcirc;</code> <td> U+0011C <td> <span class=glyph></span> <tr id=entity-gcirc><td> <code>gcirc;</code> <td> U+0011D <td> <span class=glyph></span> <tr id=entity-Gcy><td> <code>Gcy;</code> <td> U+00413 <td> <span class=glyph></span> <tr id=entity-gcy><td> <code>gcy;</code> <td> U+00433 <td> <span class=glyph></span> <tr id=entity-Gdot><td> <code>Gdot;</code> <td> U+00120 <td> <span class=glyph></span> <tr id=entity-gdot><td> <code>gdot;</code> <td> U+00121 <td> <span class=glyph></span> <tr id=entity-gE><td> <code>gE;</code> <td> U+02267 <td> <span class=glyph></span> <tr id=entity-ge><td> <code>ge;</code> <td> U+02265 <td> <span class=glyph></span> <tr id=entity-gEl><td> <code>gEl;</code> <td> U+02A8C <td> <span class=glyph></span> <tr id=entity-gel><td> <code>gel;</code> <td> U+022DB <td> <span class=glyph></span> <tr id=entity-geq><td> <code>geq;</code> <td> U+02265 <td> <span class=glyph></span> <tr id=entity-geqq><td> <code>geqq;</code> <td> U+02267 <td> <span class=glyph></span> <tr id=entity-geqslant><td> <code>geqslant;</code> <td> U+02A7E <td> <span class=glyph></span> <tr id=entity-ges><td> <code>ges;</code> <td> U+02A7E <td> <span class=glyph></span> <tr id=entity-gescc><td> <code>gescc;</code> <td> U+02AA9 <td> <span class=glyph></span> <tr id=entity-gesdot><td> <code>gesdot;</code> <td> U+02A80 <td> <span class=glyph></span> <tr id=entity-gesdoto><td> <code>gesdoto;</code> <td> U+02A82 <td> <span class=glyph></span> <tr id=entity-gesdotol><td> <code>gesdotol;</code> <td> U+02A84 <td> <span class=glyph></span> <tr id=entity-gesl><td> <code>gesl;</code> <td> U+022DB U+0FE00 <td> <span class="glyph compound"></span> <tr id=entity-gesles><td> <code>gesles;</code> <td> U+02A94 <td> <span class=glyph></span> <tr id=entity-Gfr><td> <code>Gfr;</code> <td> U+1D50A <td> <span class=glyph></span> <tr id=entity-gfr><td> <code>gfr;</code> <td> U+1D524 <td> <span class=glyph></span> <tr id=entity-Gg><td> <code>Gg;</code> <td> U+022D9 <td> <span class=glyph></span> <tr id=entity-gg><td> <code>gg;</code> <td> U+0226B <td> <span class=glyph></span> <tr id=entity-ggg><td> <code>ggg;</code> <td> U+022D9 <td> <span class=glyph></span> <tr id=entity-gimel><td> <code>gimel;</code> <td> U+02137 <td> <span class=glyph></span> <tr id=entity-GJcy><td> <code>GJcy;</code> <td> U+00403 <td> <span class=glyph></span> <tr id=entity-gjcy><td> <code>gjcy;</code> <td> U+00453 <td> <span class=glyph></span> <tr id=entity-gl><td> <code>gl;</code> <td> U+02277 <td> <span class=glyph></span> <tr id=entity-gla><td> <code>gla;</code> <td> U+02AA5 <td> <span class=glyph></span> <tr id=entity-glE><td> <code>glE;</code> <td> U+02A92 <td> <span class=glyph></span> <tr id=entity-glj><td> <code>glj;</code> <td> U+02AA4 <td> <span class=glyph></span> <tr id=entity-gnap><td> <code>gnap;</code> <td> U+02A8A <td> <span class=glyph></span> <tr id=entity-gnapprox><td> <code>gnapprox;</code> <td> U+02A8A <td> <span class=glyph></span> <tr id=entity-gnE><td> <code>gnE;</code> <td> U+02269 <td> <span class=glyph></span> <tr id=entity-gne><td> <code>gne;</code> <td> U+02A88 <td> <span class=glyph></span> <tr id=entity-gneq><td> <code>gneq;</code> <td> U+02A88 <td> <span class=glyph></span> <tr id=entity-gneqq><td> <code>gneqq;</code> <td> U+02269 <td> <span class=glyph></span> <tr id=entity-gnsim><td> <code>gnsim;</code> <td> U+022E7 <td> <span class=glyph></span> <tr id=entity-Gopf><td> <code>Gopf;</code> <td> U+1D53E <td> <span class=glyph></span> <tr id=entity-gopf><td> <code>gopf;</code> <td> U+1D558 <td> <span class=glyph></span> <tr id=entity-grave><td> <code>grave;</code> <td> U+00060 <td> <span class=glyph>`</span> <tr id=entity-GreaterEqual><td> <code>GreaterEqual;</code> <td> U+02265 <td> <span class=glyph></span> <tr id=entity-GreaterEqualLess><td> <code>GreaterEqualLess;</code> <td> U+022DB <td> <span class=glyph></span> <tr id=entity-GreaterFullEqual><td> <code>GreaterFullEqual;</code> <td> U+02267 <td> <span class=glyph></span> <tr id=entity-GreaterGreater><td> <code>GreaterGreater;</code> <td> U+02AA2 <td> <span class=glyph></span> <tr id=entity-GreaterLess><td> <code>GreaterLess;</code> <td> U+02277 <td> <span class=glyph></span> <tr id=entity-GreaterSlantEqual><td> <code>GreaterSlantEqual;</code> <td> U+02A7E <td> <span class=glyph></span> <tr id=entity-GreaterTilde><td> <code>GreaterTilde;</code> <td> U+02273 <td> <span class=glyph></span> <tr id=entity-Gscr><td> <code>Gscr;</code> <td> U+1D4A2 <td> <span class=glyph></span> <tr id=entity-gscr><td> <code>gscr;</code> <td> U+0210A <td> <span class=glyph></span> <tr id=entity-gsim><td> <code>gsim;</code> <td> U+02273 <td> <span class=glyph></span> <tr id=entity-gsime><td> <code>gsime;</code> <td> U+02A8E <td> <span class=glyph></span> <tr id=entity-gsiml><td> <code>gsiml;</code> <td> U+02A90 <td> <span class=glyph></span> <tr id=entity-GT><td> <code>GT;</code> <td> U+0003E <td> <span class=glyph>></span> <tr id=entity-GT-legacy class=impl><td> <code>GT</code> <td> U+0003E <td> <span>></span> <tr id=entity-Gt><td> <code>Gt;</code> <td> U+0226B <td> <span class=glyph></span> <tr id=entity-gt><td> <code>gt;</code> <td> U+0003E <td> <span class=glyph>></span> <tr id=entity-gt-legacy class=impl><td> <code>gt</code> <td> U+0003E <td> <span>></span> <tr id=entity-gtcc><td> <code>gtcc;</code> <td> U+02AA7 <td> <span class=glyph></span> <tr id=entity-gtcir><td> <code>gtcir;</code> <td> U+02A7A <td> <span class=glyph></span> <tr id=entity-gtdot><td> <code>gtdot;</code> <td> U+022D7 <td> <span class=glyph></span> <tr id=entity-gtlPar><td> <code>gtlPar;</code> <td> U+02995 <td> <span class=glyph></span> <tr id=entity-gtquest><td> <code>gtquest;</code> <td> U+02A7C <td> <span class=glyph></span> <tr id=entity-gtrapprox><td> <code>gtrapprox;</code> <td> U+02A86 <td> <span class=glyph></span> <tr id=entity-gtrarr><td> <code>gtrarr;</code> <td> U+02978 <td> <span class=glyph></span> <tr id=entity-gtrdot><td> <code>gtrdot;</code> <td> U+022D7 <td> <span class=glyph></span> <tr id=entity-gtreqless><td> <code>gtreqless;</code> <td> U+022DB <td> <span class=glyph></span> <tr id=entity-gtreqqless><td> <code>gtreqqless;</code> <td> U+02A8C <td> <span class=glyph></span> <tr id=entity-gtrless><td> <code>gtrless;</code> <td> U+02277 <td> <span class=glyph></span> <tr id=entity-gtrsim><td> <code>gtrsim;</code> <td> U+02273 <td> <span class=glyph></span> <tr id=entity-gvertneqq><td> <code>gvertneqq;</code> <td> U+02269 U+0FE00 <td> <span class="glyph compound"></span> <tr id=entity-gvnE><td> <code>gvnE;</code> <td> U+02269 U+0FE00 <td> <span class="glyph compound"></span> <tr id=entity-Hacek><td> <code>Hacek;</code> <td> U+002C7 <td> <span class=glyph></span> <tr id=entity-hairsp><td> <code>hairsp;</code> <td> U+0200A <td> <span class=glyph></span> <tr id=entity-half><td> <code>half;</code> <td> U+000BD <td> <span class=glyph></span> <tr id=entity-hamilt><td> <code>hamilt;</code> <td> U+0210B <td> <span class=glyph></span> <tr id=entity-HARDcy><td> <code>HARDcy;</code> <td> U+0042A <td> <span class=glyph></span> <tr id=entity-hardcy><td> <code>hardcy;</code> <td> U+0044A <td> <span class=glyph></span> <tr id=entity-hArr><td> <code>hArr;</code> <td> U+021D4 <td> <span class=glyph></span> <tr id=entity-harr><td> <code>harr;</code> <td> U+02194 <td> <span class=glyph></span> <tr id=entity-harrcir><td> <code>harrcir;</code> <td> U+02948 <td> <span class=glyph></span> <tr id=entity-harrw><td> <code>harrw;</code> <td> U+021AD <td> <span class=glyph></span> <tr id=entity-Hat><td> <code>Hat;</code> <td> U+0005E <td> <span class=glyph>^</span> <tr id=entity-hbar><td> <code>hbar;</code> <td> U+0210F <td> <span class=glyph></span> <tr id=entity-Hcirc><td> <code>Hcirc;</code> <td> U+00124 <td> <span class=glyph></span> <tr id=entity-hcirc><td> <code>hcirc;</code> <td> U+00125 <td> <span class=glyph></span> <tr id=entity-hearts><td> <code>hearts;</code> <td> U+02665 <td> <span class=glyph></span> <tr id=entity-heartsuit><td> <code>heartsuit;</code> <td> U+02665 <td> <span class=glyph></span> <tr id=entity-hellip><td> <code>hellip;</code> <td> U+02026 <td> <span class=glyph></span> <tr id=entity-hercon><td> <code>hercon;</code> <td> U+022B9 <td> <span class=glyph></span> <tr id=entity-Hfr><td> <code>Hfr;</code> <td> U+0210C <td> <span class=glyph></span> <tr id=entity-hfr><td> <code>hfr;</code> <td> U+1D525 <td> <span class=glyph></span> <tr id=entity-HilbertSpace><td> <code>HilbertSpace;</code> <td> U+0210B <td> <span class=glyph></span> <tr id=entity-hksearow><td> <code>hksearow;</code> <td> U+02925 <td> <span class=glyph></span> <tr id=entity-hkswarow><td> <code>hkswarow;</code> <td> U+02926 <td> <span class=glyph></span> <tr id=entity-hoarr><td> <code>hoarr;</code> <td> U+021FF <td> <span class=glyph></span> <tr id=entity-homtht><td> <code>homtht;</code> <td> U+0223B <td> <span class=glyph></span> <tr id=entity-hookleftarrow><td> <code>hookleftarrow;</code> <td> U+021A9 <td> <span class=glyph></span> <tr id=entity-hookrightarrow><td> <code>hookrightarrow;</code> <td> U+021AA <td> <span class=glyph></span> <tr id=entity-Hopf><td> <code>Hopf;</code> <td> U+0210D <td> <span class=glyph></span> <tr id=entity-hopf><td> <code>hopf;</code> <td> U+1D559 <td> <span class=glyph></span> <tr id=entity-horbar><td> <code>horbar;</code> <td> U+02015 <td> <span class=glyph></span> <tr id=entity-HorizontalLine><td> <code>HorizontalLine;</code> <td> U+02500 <td> <span class=glyph></span> <tr id=entity-Hscr><td> <code>Hscr;</code> <td> U+0210B <td> <span class=glyph></span> <tr id=entity-hscr><td> <code>hscr;</code> <td> U+1D4BD <td> <span class=glyph></span> <tr id=entity-hslash><td> <code>hslash;</code> <td> U+0210F <td> <span class=glyph></span> <tr id=entity-Hstrok><td> <code>Hstrok;</code> <td> U+00126 <td> <span class=glyph></span> <tr id=entity-hstrok><td> <code>hstrok;</code> <td> U+00127 <td> <span class=glyph></span> <tr id=entity-HumpDownHump><td> <code>HumpDownHump;</code> <td> U+0224E <td> <span class=glyph></span> <tr id=entity-HumpEqual><td> <code>HumpEqual;</code> <td> U+0224F <td> <span class=glyph></span> <tr id=entity-hybull><td> <code>hybull;</code> <td> U+02043 <td> <span class=glyph></span> <tr id=entity-hyphen><td> <code>hyphen;</code> <td> U+02010 <td> <span class=glyph></span> <tr id=entity-Iacute><td> <code>Iacute;</code> <td> U+000CD <td> <span class=glyph></span> <tr id=entity-Iacute-legacy class=impl><td> <code>Iacute</code> <td> U+000CD <td> <span></span> <tr id=entity-iacute><td> <code>iacute;</code> <td> U+000ED <td> <span class=glyph></span> <tr id=entity-iacute-legacy class=impl><td> <code>iacute</code> <td> U+000ED <td> <span></span> <tr id=entity-ic><td> <code>ic;</code> <td> U+02063 <td> <span class=glyph></span> <tr id=entity-Icirc><td> <code>Icirc;</code> <td> U+000CE <td> <span class=glyph></span> <tr id=entity-Icirc-legacy class=impl><td> <code>Icirc</code> <td> U+000CE <td> <span></span> <tr id=entity-icirc><td> <code>icirc;</code> <td> U+000EE <td> <span class=glyph></span> <tr id=entity-icirc-legacy class=impl><td> <code>icirc</code> <td> U+000EE <td> <span></span> <tr id=entity-Icy><td> <code>Icy;</code> <td> U+00418 <td> <span class=glyph></span> <tr id=entity-icy><td> <code>icy;</code> <td> U+00438 <td> <span class=glyph></span> <tr id=entity-Idot><td> <code>Idot;</code> <td> U+00130 <td> <span class=glyph></span> <tr id=entity-IEcy><td> <code>IEcy;</code> <td> U+00415 <td> <span class=glyph></span> <tr id=entity-iecy><td> <code>iecy;</code> <td> U+00435 <td> <span class=glyph></span> <tr id=entity-iexcl><td> <code>iexcl;</code> <td> U+000A1 <td> <span class=glyph></span> <tr id=entity-iexcl-legacy class=impl><td> <code>iexcl</code> <td> U+000A1 <td> <span></span> <tr id=entity-iff><td> <code>iff;</code> <td> U+021D4 <td> <span class=glyph></span> <tr id=entity-Ifr><td> <code>Ifr;</code> <td> U+02111 <td> <span class=glyph></span> <tr id=entity-ifr><td> <code>ifr;</code> <td> U+1D526 <td> <span class=glyph></span> <tr id=entity-Igrave><td> <code>Igrave;</code> <td> U+000CC <td> <span class=glyph></span> <tr id=entity-Igrave-legacy class=impl><td> <code>Igrave</code> <td> U+000CC <td> <span></span> <tr id=entity-igrave><td> <code>igrave;</code> <td> U+000EC <td> <span class=glyph></span> <tr id=entity-igrave-legacy class=impl><td> <code>igrave</code> <td> U+000EC <td> <span></span> <tr id=entity-ii><td> <code>ii;</code> <td> U+02148 <td> <span class=glyph></span> <tr id=entity-iiiint><td> <code>iiiint;</code> <td> U+02A0C <td> <span class=glyph></span> <tr id=entity-iiint><td> <code>iiint;</code> <td> U+0222D <td> <span class=glyph></span> <tr id=entity-iinfin><td> <code>iinfin;</code> <td> U+029DC <td> <span class=glyph></span> <tr id=entity-iiota><td> <code>iiota;</code> <td> U+02129 <td> <span class=glyph></span> <tr id=entity-IJlig><td> <code>IJlig;</code> <td> U+00132 <td> <span class=glyph></span> <tr id=entity-ijlig><td> <code>ijlig;</code> <td> U+00133 <td> <span class=glyph></span> <tr id=entity-Im><td> <code>Im;</code> <td> U+02111 <td> <span class=glyph></span> <tr id=entity-Imacr><td> <code>Imacr;</code> <td> U+0012A <td> <span class=glyph></span> <tr id=entity-imacr><td> <code>imacr;</code> <td> U+0012B <td> <span class=glyph></span> <tr id=entity-image><td> <code>image;</code> <td> U+02111 <td> <span class=glyph></span> <tr id=entity-ImaginaryI><td> <code>ImaginaryI;</code> <td> U+02148 <td> <span class=glyph></span> <tr id=entity-imagline><td> <code>imagline;</code> <td> U+02110 <td> <span class=glyph></span> <tr id=entity-imagpart><td> <code>imagpart;</code> <td> U+02111 <td> <span class=glyph></span> <tr id=entity-imath><td> <code>imath;</code> <td> U+00131 <td> <span class=glyph></span> <tr id=entity-imof><td> <code>imof;</code> <td> U+022B7 <td> <span class=glyph></span> <tr id=entity-imped><td> <code>imped;</code> <td> U+001B5 <td> <span class=glyph></span> <tr id=entity-Implies><td> <code>Implies;</code> <td> U+021D2 <td> <span class=glyph></span> <tr id=entity-in><td> <code>in;</code> <td> U+02208 <td> <span class=glyph></span> <tr id=entity-incare><td> <code>incare;</code> <td> U+02105 <td> <span class=glyph></span> <tr id=entity-infin><td> <code>infin;</code> <td> U+0221E <td> <span class=glyph></span> <tr id=entity-infintie><td> <code>infintie;</code> <td> U+029DD <td> <span class=glyph></span> <tr id=entity-inodot><td> <code>inodot;</code> <td> U+00131 <td> <span class=glyph></span> <tr id=entity-Int><td> <code>Int;</code> <td> U+0222C <td> <span class=glyph></span> <tr id=entity-int><td> <code>int;</code> <td> U+0222B <td> <span class=glyph></span> <tr id=entity-intcal><td> <code>intcal;</code> <td> U+022BA <td> <span class=glyph></span> <tr id=entity-integers><td> <code>integers;</code> <td> U+02124 <td> <span class=glyph></span> <tr id=entity-Integral><td> <code>Integral;</code> <td> U+0222B <td> <span class=glyph></span> <tr id=entity-intercal><td> <code>intercal;</code> <td> U+022BA <td> <span class=glyph></span> <tr id=entity-Intersection><td> <code>Intersection;</code> <td> U+022C2 <td> <span class=glyph></span> <tr id=entity-intlarhk><td> <code>intlarhk;</code> <td> U+02A17 <td> <span class=glyph></span> <tr id=entity-intprod><td> <code>intprod;</code> <td> U+02A3C <td> <span class=glyph></span> <tr id=entity-InvisibleComma><td> <code>InvisibleComma;</code> <td> U+02063 <td> <span class=glyph></span> <tr id=entity-InvisibleTimes><td> <code>InvisibleTimes;</code> <td> U+02062 <td> <span class=glyph></span> <tr id=entity-IOcy><td> <code>IOcy;</code> <td> U+00401 <td> <span class=glyph></span> <tr id=entity-iocy><td> <code>iocy;</code> <td> U+00451 <td> <span class=glyph></span> <tr id=entity-Iogon><td> <code>Iogon;</code> <td> U+0012E <td> <span class=glyph></span> <tr id=entity-iogon><td> <code>iogon;</code> <td> U+0012F <td> <span class=glyph></span> <tr id=entity-Iopf><td> <code>Iopf;</code> <td> U+1D540 <td> <span class=glyph></span> <tr id=entity-iopf><td> <code>iopf;</code> <td> U+1D55A <td> <span class=glyph></span> <tr id=entity-Iota><td> <code>Iota;</code> <td> U+00399 <td> <span class=glyph></span> <tr id=entity-iota><td> <code>iota;</code> <td> U+003B9 <td> <span class=glyph></span> <tr id=entity-iprod><td> <code>iprod;</code> <td> U+02A3C <td> <span class=glyph></span> <tr id=entity-iquest><td> <code>iquest;</code> <td> U+000BF <td> <span class=glyph></span> <tr id=entity-iquest-legacy class=impl><td> <code>iquest</code> <td> U+000BF <td> <span></span> <tr id=entity-Iscr><td> <code>Iscr;</code> <td> U+02110 <td> <span class=glyph></span> <tr id=entity-iscr><td> <code>iscr;</code> <td> U+1D4BE <td> <span class=glyph></span> <tr id=entity-isin><td> <code>isin;</code> <td> U+02208 <td> <span class=glyph></span> <tr id=entity-isindot><td> <code>isindot;</code> <td> U+022F5 <td> <span class=glyph></span> <tr id=entity-isinE><td> <code>isinE;</code> <td> U+022F9 <td> <span class=glyph></span> <tr id=entity-isins><td> <code>isins;</code> <td> U+022F4 <td> <span class=glyph></span> <tr id=entity-isinsv><td> <code>isinsv;</code> <td> U+022F3 <td> <span class=glyph></span> <tr id=entity-isinv><td> <code>isinv;</code> <td> U+02208 <td> <span class=glyph></span> <tr id=entity-it><td> <code>it;</code> <td> U+02062 <td> <span class=glyph></span> <tr id=entity-Itilde><td> <code>Itilde;</code> <td> U+00128 <td> <span class=glyph></span> <tr id=entity-itilde><td> <code>itilde;</code> <td> U+00129 <td> <span class=glyph></span> <tr id=entity-Iukcy><td> <code>Iukcy;</code> <td> U+00406 <td> <span class=glyph></span> <tr id=entity-iukcy><td> <code>iukcy;</code> <td> U+00456 <td> <span class=glyph></span> <tr id=entity-Iuml><td> <code>Iuml;</code> <td> U+000CF <td> <span class=glyph></span> <tr id=entity-Iuml-legacy class=impl><td> <code>Iuml</code> <td> U+000CF <td> <span></span> <tr id=entity-iuml><td> <code>iuml;</code> <td> U+000EF <td> <span class=glyph></span> <tr id=entity-iuml-legacy class=impl><td> <code>iuml</code> <td> U+000EF <td> <span></span> <tr id=entity-Jcirc><td> <code>Jcirc;</code> <td> U+00134 <td> <span class=glyph></span> <tr id=entity-jcirc><td> <code>jcirc;</code> <td> U+00135 <td> <span class=glyph></span> <tr id=entity-Jcy><td> <code>Jcy;</code> <td> U+00419 <td> <span class=glyph></span> <tr id=entity-jcy><td> <code>jcy;</code> <td> U+00439 <td> <span class=glyph></span> <tr id=entity-Jfr><td> <code>Jfr;</code> <td> U+1D50D <td> <span class=glyph></span> <tr id=entity-jfr><td> <code>jfr;</code> <td> U+1D527 <td> <span class=glyph></span> <tr id=entity-jmath><td> <code>jmath;</code> <td> U+00237 <td> <span class=glyph></span> <tr id=entity-Jopf><td> <code>Jopf;</code> <td> U+1D541 <td> <span class=glyph></span> <tr id=entity-jopf><td> <code>jopf;</code> <td> U+1D55B <td> <span class=glyph></span> <tr id=entity-Jscr><td> <code>Jscr;</code> <td> U+1D4A5 <td> <span class=glyph></span> <tr id=entity-jscr><td> <code>jscr;</code> <td> U+1D4BF <td> <span class=glyph></span> <tr id=entity-Jsercy><td> <code>Jsercy;</code> <td> U+00408 <td> <span class=glyph></span> <tr id=entity-jsercy><td> <code>jsercy;</code> <td> U+00458 <td> <span class=glyph></span> <tr id=entity-Jukcy><td> <code>Jukcy;</code> <td> U+00404 <td> <span class=glyph></span> <tr id=entity-jukcy><td> <code>jukcy;</code> <td> U+00454 <td> <span class=glyph></span> <tr id=entity-Kappa><td> <code>Kappa;</code> <td> U+0039A <td> <span class=glyph></span> <tr id=entity-kappa><td> <code>kappa;</code> <td> U+003BA <td> <span class=glyph></span> <tr id=entity-kappav><td> <code>kappav;</code> <td> U+003F0 <td> <span class=glyph></span> <tr id=entity-Kcedil><td> <code>Kcedil;</code> <td> U+00136 <td> <span class=glyph></span> <tr id=entity-kcedil><td> <code>kcedil;</code> <td> U+00137 <td> <span class=glyph></span> <tr id=entity-Kcy><td> <code>Kcy;</code> <td> U+0041A <td> <span class=glyph></span> <tr id=entity-kcy><td> <code>kcy;</code> <td> U+0043A <td> <span class=glyph></span> <tr id=entity-Kfr><td> <code>Kfr;</code> <td> U+1D50E <td> <span class=glyph></span> <tr id=entity-kfr><td> <code>kfr;</code> <td> U+1D528 <td> <span class=glyph></span> <tr id=entity-kgreen><td> <code>kgreen;</code> <td> U+00138 <td> <span class=glyph></span> <tr id=entity-KHcy><td> <code>KHcy;</code> <td> U+00425 <td> <span class=glyph></span> <tr id=entity-khcy><td> <code>khcy;</code> <td> U+00445 <td> <span class=glyph></span> <tr id=entity-KJcy><td> <code>KJcy;</code> <td> U+0040C <td> <span class=glyph></span> <tr id=entity-kjcy><td> <code>kjcy;</code> <td> U+0045C <td> <span class=glyph></span> <tr id=entity-Kopf><td> <code>Kopf;</code> <td> U+1D542 <td> <span class=glyph></span> <tr id=entity-kopf><td> <code>kopf;</code> <td> U+1D55C <td> <span class=glyph></span> <tr id=entity-Kscr><td> <code>Kscr;</code> <td> U+1D4A6 <td> <span class=glyph></span> <tr id=entity-kscr><td> <code>kscr;</code> <td> U+1D4C0 <td> <span class=glyph></span> <tr id=entity-lAarr><td> <code>lAarr;</code> <td> U+021DA <td> <span class=glyph></span> <tr id=entity-Lacute><td> <code>Lacute;</code> <td> U+00139 <td> <span class=glyph></span> <tr id=entity-lacute><td> <code>lacute;</code> <td> U+0013A <td> <span class=glyph></span> <tr id=entity-laemptyv><td> <code>laemptyv;</code> <td> U+029B4 <td> <span class=glyph></span> <tr id=entity-lagran><td> <code>lagran;</code> <td> U+02112 <td> <span class=glyph></span> <tr id=entity-Lambda><td> <code>Lambda;</code> <td> U+0039B <td> <span class=glyph></span> <tr id=entity-lambda><td> <code>lambda;</code> <td> U+003BB <td> <span class=glyph></span> <tr id=entity-Lang><td> <code>Lang;</code> <td> U+027EA <td> <span class=glyph></span> <tr id=entity-lang><td> <code>lang;</code> <td> U+027E8 <td> <span class=glyph></span> <tr id=entity-langd><td> <code>langd;</code> <td> U+02991 <td> <span class=glyph></span> <tr id=entity-langle><td> <code>langle;</code> <td> U+027E8 <td> <span class=glyph></span> <tr id=entity-lap><td> <code>lap;</code> <td> U+02A85 <td> <span class=glyph></span> <tr id=entity-Laplacetrf><td> <code>Laplacetrf;</code> <td> U+02112 <td> <span class=glyph></span> <tr id=entity-laquo><td> <code>laquo;</code> <td> U+000AB <td> <span class=glyph></span> <tr id=entity-laquo-legacy class=impl><td> <code>laquo</code> <td> U+000AB <td> <span></span> <tr id=entity-Larr><td> <code>Larr;</code> <td> U+0219E <td> <span class=glyph></span> <tr id=entity-lArr><td> <code>lArr;</code> <td> U+021D0 <td> <span class=glyph></span> <tr id=entity-larr><td> <code>larr;</code> <td> U+02190 <td> <span class=glyph></span> <tr id=entity-larrb><td> <code>larrb;</code> <td> U+021E4 <td> <span class=glyph></span> <tr id=entity-larrbfs><td> <code>larrbfs;</code> <td> U+0291F <td> <span class=glyph></span> <tr id=entity-larrfs><td> <code>larrfs;</code> <td> U+0291D <td> <span class=glyph></span> <tr id=entity-larrhk><td> <code>larrhk;</code> <td> U+021A9 <td> <span class=glyph></span> <tr id=entity-larrlp><td> <code>larrlp;</code> <td> U+021AB <td> <span class=glyph></span> <tr id=entity-larrpl><td> <code>larrpl;</code> <td> U+02939 <td> <span class=glyph></span> <tr id=entity-larrsim><td> <code>larrsim;</code> <td> U+02973 <td> <span class=glyph></span> <tr id=entity-larrtl><td> <code>larrtl;</code> <td> U+021A2 <td> <span class=glyph></span> <tr id=entity-lat><td> <code>lat;</code> <td> U+02AAB <td> <span class=glyph></span> <tr id=entity-lAtail><td> <code>lAtail;</code> <td> U+0291B <td> <span class=glyph></span> <tr id=entity-latail><td> <code>latail;</code> <td> U+02919 <td> <span class=glyph></span> <tr id=entity-late><td> <code>late;</code> <td> U+02AAD <td> <span class=glyph></span> <tr id=entity-lates><td> <code>lates;</code> <td> U+02AAD U+0FE00 <td> <span class="glyph compound"></span> <tr id=entity-lBarr><td> <code>lBarr;</code> <td> U+0290E <td> <span class=glyph></span> <tr id=entity-lbarr><td> <code>lbarr;</code> <td> U+0290C <td> <span class=glyph></span> <tr id=entity-lbbrk><td> <code>lbbrk;</code> <td> U+02772 <td> <span class=glyph></span> <tr id=entity-lbrace><td> <code>lbrace;</code> <td> U+0007B <td> <span class=glyph>{</span> <tr id=entity-lbrack><td> <code>lbrack;</code> <td> U+0005B <td> <span class=glyph>[</span> <tr id=entity-lbrke><td> <code>lbrke;</code> <td> U+0298B <td> <span class=glyph></span> <tr id=entity-lbrksld><td> <code>lbrksld;</code> <td> U+0298F <td> <span class=glyph></span> <tr id=entity-lbrkslu><td> <code>lbrkslu;</code> <td> U+0298D <td> <span class=glyph></span> <tr id=entity-Lcaron><td> <code>Lcaron;</code> <td> U+0013D <td> <span class=glyph></span> <tr id=entity-lcaron><td> <code>lcaron;</code> <td> U+0013E <td> <span class=glyph></span> <tr id=entity-Lcedil><td> <code>Lcedil;</code> <td> U+0013B <td> <span class=glyph></span> <tr id=entity-lcedil><td> <code>lcedil;</code> <td> U+0013C <td> <span class=glyph></span> <tr id=entity-lceil><td> <code>lceil;</code> <td> U+02308 <td> <span class=glyph></span> <tr id=entity-lcub><td> <code>lcub;</code> <td> U+0007B <td> <span class=glyph>{</span> <tr id=entity-Lcy><td> <code>Lcy;</code> <td> U+0041B <td> <span class=glyph></span> <tr id=entity-lcy><td> <code>lcy;</code> <td> U+0043B <td> <span class=glyph></span> <tr id=entity-ldca><td> <code>ldca;</code> <td> U+02936 <td> <span class=glyph></span> <tr id=entity-ldquo><td> <code>ldquo;</code> <td> U+0201C <td> <span class=glyph></span> <tr id=entity-ldquor><td> <code>ldquor;</code> <td> U+0201E <td> <span class=glyph></span> <tr id=entity-ldrdhar><td> <code>ldrdhar;</code> <td> U+02967 <td> <span class=glyph></span> <tr id=entity-ldrushar><td> <code>ldrushar;</code> <td> U+0294B <td> <span class=glyph></span> <tr id=entity-ldsh><td> <code>ldsh;</code> <td> U+021B2 <td> <span class=glyph></span> <tr id=entity-lE><td> <code>lE;</code> <td> U+02266 <td> <span class=glyph></span> <tr id=entity-le><td> <code>le;</code> <td> U+02264 <td> <span class=glyph></span> <tr id=entity-LeftAngleBracket><td> <code>LeftAngleBracket;</code> <td> U+027E8 <td> <span class=glyph></span> <tr id=entity-LeftArrow><td> <code>LeftArrow;</code> <td> U+02190 <td> <span class=glyph></span> <tr id=entity-Leftarrow><td> <code>Leftarrow;</code> <td> U+021D0 <td> <span class=glyph></span> <tr id=entity-leftarrow><td> <code>leftarrow;</code> <td> U+02190 <td> <span class=glyph></span> <tr id=entity-LeftArrowBar><td> <code>LeftArrowBar;</code> <td> U+021E4 <td> <span class=glyph></span> <tr id=entity-LeftArrowRightArrow><td> <code>LeftArrowRightArrow;</code> <td> U+021C6 <td> <span class=glyph></span> <tr id=entity-leftarrowtail><td> <code>leftarrowtail;</code> <td> U+021A2 <td> <span class=glyph></span> <tr id=entity-LeftCeiling><td> <code>LeftCeiling;</code> <td> U+02308 <td> <span class=glyph></span> <tr id=entity-LeftDoubleBracket><td> <code>LeftDoubleBracket;</code> <td> U+027E6 <td> <span class=glyph></span> <tr id=entity-LeftDownTeeVector><td> <code>LeftDownTeeVector;</code> <td> U+02961 <td> <span class=glyph></span> <tr id=entity-LeftDownVector><td> <code>LeftDownVector;</code> <td> U+021C3 <td> <span class=glyph></span> <tr id=entity-LeftDownVectorBar><td> <code>LeftDownVectorBar;</code> <td> U+02959 <td> <span class=glyph></span> <tr id=entity-LeftFloor><td> <code>LeftFloor;</code> <td> U+0230A <td> <span class=glyph></span> <tr id=entity-leftharpoondown><td> <code>leftharpoondown;</code> <td> U+021BD <td> <span class=glyph></span> <tr id=entity-leftharpoonup><td> <code>leftharpoonup;</code> <td> U+021BC <td> <span class=glyph></span> <tr id=entity-leftleftarrows><td> <code>leftleftarrows;</code> <td> U+021C7 <td> <span class=glyph></span> <tr id=entity-LeftRightArrow><td> <code>LeftRightArrow;</code> <td> U+02194 <td> <span class=glyph></span> <tr id=entity-Leftrightarrow><td> <code>Leftrightarrow;</code> <td> U+021D4 <td> <span class=glyph></span> <tr id=entity-leftrightarrow><td> <code>leftrightarrow;</code> <td> U+02194 <td> <span class=glyph></span> <tr id=entity-leftrightarrows><td> <code>leftrightarrows;</code> <td> U+021C6 <td> <span class=glyph></span> <tr id=entity-leftrightharpoons><td> <code>leftrightharpoons;</code> <td> U+021CB <td> <span class=glyph></span> <tr id=entity-leftrightsquigarrow><td> <code>leftrightsquigarrow;</code> <td> U+021AD <td> <span class=glyph></span> <tr id=entity-LeftRightVector><td> <code>LeftRightVector;</code> <td> U+0294E <td> <span class=glyph></span> <tr id=entity-LeftTee><td> <code>LeftTee;</code> <td> U+022A3 <td> <span class=glyph></span> <tr id=entity-LeftTeeArrow><td> <code>LeftTeeArrow;</code> <td> U+021A4 <td> <span class=glyph></span> <tr id=entity-LeftTeeVector><td> <code>LeftTeeVector;</code> <td> U+0295A <td> <span class=glyph></span> <tr id=entity-leftthreetimes><td> <code>leftthreetimes;</code> <td> U+022CB <td> <span class=glyph></span> <tr id=entity-LeftTriangle><td> <code>LeftTriangle;</code> <td> U+022B2 <td> <span class=glyph></span> <tr id=entity-LeftTriangleBar><td> <code>LeftTriangleBar;</code> <td> U+029CF <td> <span class=glyph></span> <tr id=entity-LeftTriangleEqual><td> <code>LeftTriangleEqual;</code> <td> U+022B4 <td> <span class=glyph></span> <tr id=entity-LeftUpDownVector><td> <code>LeftUpDownVector;</code> <td> U+02951 <td> <span class=glyph></span> <tr id=entity-LeftUpTeeVector><td> <code>LeftUpTeeVector;</code> <td> U+02960 <td> <span class=glyph></span> <tr id=entity-LeftUpVector><td> <code>LeftUpVector;</code> <td> U+021BF <td> <span class=glyph></span> <tr id=entity-LeftUpVectorBar><td> <code>LeftUpVectorBar;</code> <td> U+02958 <td> <span class=glyph></span> <tr id=entity-LeftVector><td> <code>LeftVector;</code> <td> U+021BC <td> <span class=glyph></span> <tr id=entity-LeftVectorBar><td> <code>LeftVectorBar;</code> <td> U+02952 <td> <span class=glyph></span> <tr id=entity-lEg><td> <code>lEg;</code> <td> U+02A8B <td> <span class=glyph></span> <tr id=entity-leg><td> <code>leg;</code> <td> U+022DA <td> <span class=glyph></span> <tr id=entity-leq><td> <code>leq;</code> <td> U+02264 <td> <span class=glyph></span> <tr id=entity-leqq><td> <code>leqq;</code> <td> U+02266 <td> <span class=glyph></span> <tr id=entity-leqslant><td> <code>leqslant;</code> <td> U+02A7D <td> <span class=glyph></span> <tr id=entity-les><td> <code>les;</code> <td> U+02A7D <td> <span class=glyph></span> <tr id=entity-lescc><td> <code>lescc;</code> <td> U+02AA8 <td> <span class=glyph></span> <tr id=entity-lesdot><td> <code>lesdot;</code> <td> U+02A7F <td> <span class=glyph></span> <tr id=entity-lesdoto><td> <code>lesdoto;</code> <td> U+02A81 <td> <span class=glyph></span> <tr id=entity-lesdotor><td> <code>lesdotor;</code> <td> U+02A83 <td> <span class=glyph></span> <tr id=entity-lesg><td> <code>lesg;</code> <td> U+022DA U+0FE00 <td> <span class="glyph compound"></span> <tr id=entity-lesges><td> <code>lesges;</code> <td> U+02A93 <td> <span class=glyph></span> <tr id=entity-lessapprox><td> <code>lessapprox;</code> <td> U+02A85 <td> <span class=glyph></span> <tr id=entity-lessdot><td> <code>lessdot;</code> <td> U+022D6 <td> <span class=glyph></span> <tr id=entity-lesseqgtr><td> <code>lesseqgtr;</code> <td> U+022DA <td> <span class=glyph></span> <tr id=entity-lesseqqgtr><td> <code>lesseqqgtr;</code> <td> U+02A8B <td> <span class=glyph></span> <tr id=entity-LessEqualGreater><td> <code>LessEqualGreater;</code> <td> U+022DA <td> <span class=glyph></span> <tr id=entity-LessFullEqual><td> <code>LessFullEqual;</code> <td> U+02266 <td> <span class=glyph></span> <tr id=entity-LessGreater><td> <code>LessGreater;</code> <td> U+02276 <td> <span class=glyph></span> <tr id=entity-lessgtr><td> <code>lessgtr;</code> <td> U+02276 <td> <span class=glyph></span> <tr id=entity-LessLess><td> <code>LessLess;</code> <td> U+02AA1 <td> <span class=glyph></span> <tr id=entity-lesssim><td> <code>lesssim;</code> <td> U+02272 <td> <span class=glyph></span> <tr id=entity-LessSlantEqual><td> <code>LessSlantEqual;</code> <td> U+02A7D <td> <span class=glyph></span> <tr id=entity-LessTilde><td> <code>LessTilde;</code> <td> U+02272 <td> <span class=glyph></span> <tr id=entity-lfisht><td> <code>lfisht;</code> <td> U+0297C <td> <span class=glyph></span> <tr id=entity-lfloor><td> <code>lfloor;</code> <td> U+0230A <td> <span class=glyph></span> <tr id=entity-Lfr><td> <code>Lfr;</code> <td> U+1D50F <td> <span class=glyph></span> <tr id=entity-lfr><td> <code>lfr;</code> <td> U+1D529 <td> <span class=glyph></span> <tr id=entity-lg><td> <code>lg;</code> <td> U+02276 <td> <span class=glyph></span> <tr id=entity-lgE><td> <code>lgE;</code> <td> U+02A91 <td> <span class=glyph></span> <tr id=entity-lHar><td> <code>lHar;</code> <td> U+02962 <td> <span class=glyph></span> <tr id=entity-lhard><td> <code>lhard;</code> <td> U+021BD <td> <span class=glyph></span> <tr id=entity-lharu><td> <code>lharu;</code> <td> U+021BC <td> <span class=glyph></span> <tr id=entity-lharul><td> <code>lharul;</code> <td> U+0296A <td> <span class=glyph></span> <tr id=entity-lhblk><td> <code>lhblk;</code> <td> U+02584 <td> <span class=glyph></span> <tr id=entity-LJcy><td> <code>LJcy;</code> <td> U+00409 <td> <span class=glyph></span> <tr id=entity-ljcy><td> <code>ljcy;</code> <td> U+00459 <td> <span class=glyph></span> <tr id=entity-Ll><td> <code>Ll;</code> <td> U+022D8 <td> <span class=glyph></span> <tr id=entity-ll><td> <code>ll;</code> <td> U+0226A <td> <span class=glyph></span> <tr id=entity-llarr><td> <code>llarr;</code> <td> U+021C7 <td> <span class=glyph></span> <tr id=entity-llcorner><td> <code>llcorner;</code> <td> U+0231E <td> <span class=glyph></span> <tr id=entity-Lleftarrow><td> <code>Lleftarrow;</code> <td> U+021DA <td> <span class=glyph></span> <tr id=entity-llhard><td> <code>llhard;</code> <td> U+0296B <td> <span class=glyph></span> <tr id=entity-lltri><td> <code>lltri;</code> <td> U+025FA <td> <span class=glyph></span> <tr id=entity-Lmidot><td> <code>Lmidot;</code> <td> U+0013F <td> <span class=glyph></span> <tr id=entity-lmidot><td> <code>lmidot;</code> <td> U+00140 <td> <span class=glyph></span> <tr id=entity-lmoust><td> <code>lmoust;</code> <td> U+023B0 <td> <span class=glyph></span> <tr id=entity-lmoustache><td> <code>lmoustache;</code> <td> U+023B0 <td> <span class=glyph></span> <tr id=entity-lnap><td> <code>lnap;</code> <td> U+02A89 <td> <span class=glyph></span> <tr id=entity-lnapprox><td> <code>lnapprox;</code> <td> U+02A89 <td> <span class=glyph></span> <tr id=entity-lnE><td> <code>lnE;</code> <td> U+02268 <td> <span class=glyph></span> <tr id=entity-lne><td> <code>lne;</code> <td> U+02A87 <td> <span class=glyph></span> <tr id=entity-lneq><td> <code>lneq;</code> <td> U+02A87 <td> <span class=glyph></span> <tr id=entity-lneqq><td> <code>lneqq;</code> <td> U+02268 <td> <span class=glyph></span> <tr id=entity-lnsim><td> <code>lnsim;</code> <td> U+022E6 <td> <span class=glyph></span> <tr id=entity-loang><td> <code>loang;</code> <td> U+027EC <td> <span class=glyph></span> <tr id=entity-loarr><td> <code>loarr;</code> <td> U+021FD <td> <span class=glyph></span> <tr id=entity-lobrk><td> <code>lobrk;</code> <td> U+027E6 <td> <span class=glyph></span> <tr id=entity-LongLeftArrow><td> <code>LongLeftArrow;</code> <td> U+027F5 <td> <span class=glyph></span> <tr id=entity-Longleftarrow><td> <code>Longleftarrow;</code> <td> U+027F8 <td> <span class=glyph></span> <tr id=entity-longleftarrow><td> <code>longleftarrow;</code> <td> U+027F5 <td> <span class=glyph></span> <tr id=entity-LongLeftRightArrow><td> <code>LongLeftRightArrow;</code> <td> U+027F7 <td> <span class=glyph></span> <tr id=entity-Longleftrightarrow><td> <code>Longleftrightarrow;</code> <td> U+027FA <td> <span class=glyph></span> <tr id=entity-longleftrightarrow><td> <code>longleftrightarrow;</code> <td> U+027F7 <td> <span class=glyph></span> <tr id=entity-longmapsto><td> <code>longmapsto;</code> <td> U+027FC <td> <span class=glyph></span> <tr id=entity-LongRightArrow><td> <code>LongRightArrow;</code> <td> U+027F6 <td> <span class=glyph></span> <tr id=entity-Longrightarrow><td> <code>Longrightarrow;</code> <td> U+027F9 <td> <span class=glyph></span> <tr id=entity-longrightarrow><td> <code>longrightarrow;</code> <td> U+027F6 <td> <span class=glyph></span> <tr id=entity-looparrowleft><td> <code>looparrowleft;</code> <td> U+021AB <td> <span class=glyph></span> <tr id=entity-looparrowright><td> <code>looparrowright;</code> <td> U+021AC <td> <span class=glyph></span> <tr id=entity-lopar><td> <code>lopar;</code> <td> U+02985 <td> <span class=glyph></span> <tr id=entity-Lopf><td> <code>Lopf;</code> <td> U+1D543 <td> <span class=glyph></span> <tr id=entity-lopf><td> <code>lopf;</code> <td> U+1D55D <td> <span class=glyph></span> <tr id=entity-loplus><td> <code>loplus;</code> <td> U+02A2D <td> <span class=glyph></span> <tr id=entity-lotimes><td> <code>lotimes;</code> <td> U+02A34 <td> <span class=glyph></span> <tr id=entity-lowast><td> <code>lowast;</code> <td> U+02217 <td> <span class=glyph></span> <tr id=entity-lowbar><td> <code>lowbar;</code> <td> U+0005F <td> <span class=glyph>_</span> <tr id=entity-LowerLeftArrow><td> <code>LowerLeftArrow;</code> <td> U+02199 <td> <span class=glyph></span> <tr id=entity-LowerRightArrow><td> <code>LowerRightArrow;</code> <td> U+02198 <td> <span class=glyph></span> <tr id=entity-loz><td> <code>loz;</code> <td> U+025CA <td> <span class=glyph></span> <tr id=entity-lozenge><td> <code>lozenge;</code> <td> U+025CA <td> <span class=glyph></span> <tr id=entity-lozf><td> <code>lozf;</code> <td> U+029EB <td> <span class=glyph></span> <tr id=entity-lpar><td> <code>lpar;</code> <td> U+00028 <td> <span class=glyph>(</span> <tr id=entity-lparlt><td> <code>lparlt;</code> <td> U+02993 <td> <span class=glyph></span> <tr id=entity-lrarr><td> <code>lrarr;</code> <td> U+021C6 <td> <span class=glyph></span> <tr id=entity-lrcorner><td> <code>lrcorner;</code> <td> U+0231F <td> <span class=glyph></span> <tr id=entity-lrhar><td> <code>lrhar;</code> <td> U+021CB <td> <span class=glyph></span> <tr id=entity-lrhard><td> <code>lrhard;</code> <td> U+0296D <td> <span class=glyph></span> <tr id=entity-lrm><td> <code>lrm;</code> <td> U+0200E <td> <span class=glyph></span> <tr id=entity-lrtri><td> <code>lrtri;</code> <td> U+022BF <td> <span class=glyph></span> <tr id=entity-lsaquo><td> <code>lsaquo;</code> <td> U+02039 <td> <span class=glyph></span> <tr id=entity-Lscr><td> <code>Lscr;</code> <td> U+02112 <td> <span class=glyph></span> <tr id=entity-lscr><td> <code>lscr;</code> <td> U+1D4C1 <td> <span class=glyph></span> <tr id=entity-Lsh><td> <code>Lsh;</code> <td> U+021B0 <td> <span class=glyph></span> <tr id=entity-lsh><td> <code>lsh;</code> <td> U+021B0 <td> <span class=glyph></span> <tr id=entity-lsim><td> <code>lsim;</code> <td> U+02272 <td> <span class=glyph></span> <tr id=entity-lsime><td> <code>lsime;</code> <td> U+02A8D <td> <span class=glyph></span> <tr id=entity-lsimg><td> <code>lsimg;</code> <td> U+02A8F <td> <span class=glyph></span> <tr id=entity-lsqb><td> <code>lsqb;</code> <td> U+0005B <td> <span class=glyph>[</span> <tr id=entity-lsquo><td> <code>lsquo;</code> <td> U+02018 <td> <span class=glyph></span> <tr id=entity-lsquor><td> <code>lsquor;</code> <td> U+0201A <td> <span class=glyph></span> <tr id=entity-Lstrok><td> <code>Lstrok;</code> <td> U+00141 <td> <span class=glyph></span> <tr id=entity-lstrok><td> <code>lstrok;</code> <td> U+00142 <td> <span class=glyph></span> <tr id=entity-LT><td> <code>LT;</code> <td> U+0003C <td> <span class=glyph><</span> <tr id=entity-LT-legacy class=impl><td> <code>LT</code> <td> U+0003C <td> <span><</span> <tr id=entity-Lt><td> <code>Lt;</code> <td> U+0226A <td> <span class=glyph></span> <tr id=entity-lt><td> <code>lt;</code> <td> U+0003C <td> <span class=glyph><</span> <tr id=entity-lt-legacy class=impl><td> <code>lt</code> <td> U+0003C <td> <span><</span> <tr id=entity-ltcc><td> <code>ltcc;</code> <td> U+02AA6 <td> <span class=glyph></span> <tr id=entity-ltcir><td> <code>ltcir;</code> <td> U+02A79 <td> <span class=glyph></span> <tr id=entity-ltdot><td> <code>ltdot;</code> <td> U+022D6 <td> <span class=glyph></span> <tr id=entity-lthree><td> <code>lthree;</code> <td> U+022CB <td> <span class=glyph></span> <tr id=entity-ltimes><td> <code>ltimes;</code> <td> U+022C9 <td> <span class=glyph></span> <tr id=entity-ltlarr><td> <code>ltlarr;</code> <td> U+02976 <td> <span class=glyph></span> <tr id=entity-ltquest><td> <code>ltquest;</code> <td> U+02A7B <td> <span class=glyph></span> <tr id=entity-ltri><td> <code>ltri;</code> <td> U+025C3 <td> <span class=glyph></span> <tr id=entity-ltrie><td> <code>ltrie;</code> <td> U+022B4 <td> <span class=glyph></span> <tr id=entity-ltrif><td> <code>ltrif;</code> <td> U+025C2 <td> <span class=glyph></span> <tr id=entity-ltrPar><td> <code>ltrPar;</code> <td> U+02996 <td> <span class=glyph></span> <tr id=entity-lurdshar><td> <code>lurdshar;</code> <td> U+0294A <td> <span class=glyph></span> <tr id=entity-luruhar><td> <code>luruhar;</code> <td> U+02966 <td> <span class=glyph></span> <tr id=entity-lvertneqq><td> <code>lvertneqq;</code> <td> U+02268 U+0FE00 <td> <span class="glyph compound"></span> <tr id=entity-lvnE><td> <code>lvnE;</code> <td> U+02268 U+0FE00 <td> <span class="glyph compound"></span> <tr id=entity-macr><td> <code>macr;</code> <td> U+000AF <td> <span class=glyph></span> <tr id=entity-macr-legacy class=impl><td> <code>macr</code> <td> U+000AF <td> <span></span> <tr id=entity-male><td> <code>male;</code> <td> U+02642 <td> <span class=glyph></span> <tr id=entity-malt><td> <code>malt;</code> <td> U+02720 <td> <span class=glyph></span> <tr id=entity-maltese><td> <code>maltese;</code> <td> U+02720 <td> <span class=glyph></span> <tr id=entity-Map><td> <code>Map;</code> <td> U+02905 <td> <span class=glyph></span> <tr id=entity-map><td> <code>map;</code> <td> U+021A6 <td> <span class=glyph></span> <tr id=entity-mapsto><td> <code>mapsto;</code> <td> U+021A6 <td> <span class=glyph></span> <tr id=entity-mapstodown><td> <code>mapstodown;</code> <td> U+021A7 <td> <span class=glyph></span> <tr id=entity-mapstoleft><td> <code>mapstoleft;</code> <td> U+021A4 <td> <span class=glyph></span> <tr id=entity-mapstoup><td> <code>mapstoup;</code> <td> U+021A5 <td> <span class=glyph></span> <tr id=entity-marker><td> <code>marker;</code> <td> U+025AE <td> <span class=glyph></span> <tr id=entity-mcomma><td> <code>mcomma;</code> <td> U+02A29 <td> <span class=glyph></span> <tr id=entity-Mcy><td> <code>Mcy;</code> <td> U+0041C <td> <span class=glyph></span> <tr id=entity-mcy><td> <code>mcy;</code> <td> U+0043C <td> <span class=glyph></span> <tr id=entity-mdash><td> <code>mdash;</code> <td> U+02014 <td> <span class=glyph></span> <tr id=entity-mDDot><td> <code>mDDot;</code> <td> U+0223A <td> <span class=glyph></span> <tr id=entity-measuredangle><td> <code>measuredangle;</code> <td> U+02221 <td> <span class=glyph></span> <tr id=entity-MediumSpace><td> <code>MediumSpace;</code> <td> U+0205F <td> <span class=glyph></span> <tr id=entity-Mellintrf><td> <code>Mellintrf;</code> <td> U+02133 <td> <span class=glyph></span> <tr id=entity-Mfr><td> <code>Mfr;</code> <td> U+1D510 <td> <span class=glyph></span> <tr id=entity-mfr><td> <code>mfr;</code> <td> U+1D52A <td> <span class=glyph></span> <tr id=entity-mho><td> <code>mho;</code> <td> U+02127 <td> <span class=glyph></span> <tr id=entity-micro><td> <code>micro;</code> <td> U+000B5 <td> <span class=glyph></span> <tr id=entity-micro-legacy class=impl><td> <code>micro</code> <td> U+000B5 <td> <span></span> <tr id=entity-mid><td> <code>mid;</code> <td> U+02223 <td> <span class=glyph></span> <tr id=entity-midast><td> <code>midast;</code> <td> U+0002A <td> <span class=glyph>*</span> <tr id=entity-midcir><td> <code>midcir;</code> <td> U+02AF0 <td> <span class=glyph></span> <tr id=entity-middot><td> <code>middot;</code> <td> U+000B7 <td> <span class=glyph></span> <tr id=entity-middot-legacy class=impl><td> <code>middot</code> <td> U+000B7 <td> <span></span> <tr id=entity-minus><td> <code>minus;</code> <td> U+02212 <td> <span class=glyph></span> <tr id=entity-minusb><td> <code>minusb;</code> <td> U+0229F <td> <span class=glyph></span> <tr id=entity-minusd><td> <code>minusd;</code> <td> U+02238 <td> <span class=glyph></span> <tr id=entity-minusdu><td> <code>minusdu;</code> <td> U+02A2A <td> <span class=glyph></span> <tr id=entity-MinusPlus><td> <code>MinusPlus;</code> <td> U+02213 <td> <span class=glyph></span> <tr id=entity-mlcp><td> <code>mlcp;</code> <td> U+02ADB <td> <span class=glyph></span> <tr id=entity-mldr><td> <code>mldr;</code> <td> U+02026 <td> <span class=glyph></span> <tr id=entity-mnplus><td> <code>mnplus;</code> <td> U+02213 <td> <span class=glyph></span> <tr id=entity-models><td> <code>models;</code> <td> U+022A7 <td> <span class=glyph></span> <tr id=entity-Mopf><td> <code>Mopf;</code> <td> U+1D544 <td> <span class=glyph></span> <tr id=entity-mopf><td> <code>mopf;</code> <td> U+1D55E <td> <span class=glyph></span> <tr id=entity-mp><td> <code>mp;</code> <td> U+02213 <td> <span class=glyph></span> <tr id=entity-Mscr><td> <code>Mscr;</code> <td> U+02133 <td> <span class=glyph></span> <tr id=entity-mscr><td> <code>mscr;</code> <td> U+1D4C2 <td> <span class=glyph></span> <tr id=entity-mstpos><td> <code>mstpos;</code> <td> U+0223E <td> <span class=glyph></span> <tr id=entity-Mu><td> <code>Mu;</code> <td> U+0039C <td> <span class=glyph></span> <tr id=entity-mu><td> <code>mu;</code> <td> U+003BC <td> <span class=glyph></span> <tr id=entity-multimap><td> <code>multimap;</code> <td> U+022B8 <td> <span class=glyph></span> <tr id=entity-mumap><td> <code>mumap;</code> <td> U+022B8 <td> <span class=glyph></span> <tr id=entity-nabla><td> <code>nabla;</code> <td> U+02207 <td> <span class=glyph></span> <tr id=entity-Nacute><td> <code>Nacute;</code> <td> U+00143 <td> <span class=glyph></span> <tr id=entity-nacute><td> <code>nacute;</code> <td> U+00144 <td> <span class=glyph></span> <tr id=entity-nang><td> <code>nang;</code> <td> U+02220 U+020D2 <td> <span class="glyph compound"></span> <tr id=entity-nap><td> <code>nap;</code> <td> U+02249 <td> <span class=glyph></span> <tr id=entity-napE><td> <code>napE;</code> <td> U+02A70 U+00338 <td> <span class="glyph compound"></span> <tr id=entity-napid><td> <code>napid;</code> <td> U+0224B U+00338 <td> <span class="glyph compound"></span> <tr id=entity-napos><td> <code>napos;</code> <td> U+00149 <td> <span class=glyph></span> <tr id=entity-napprox><td> <code>napprox;</code> <td> U+02249 <td> <span class=glyph></span> <tr id=entity-natur><td> <code>natur;</code> <td> U+0266E <td> <span class=glyph></span> <tr id=entity-natural><td> <code>natural;</code> <td> U+0266E <td> <span class=glyph></span> <tr id=entity-naturals><td> <code>naturals;</code> <td> U+02115 <td> <span class=glyph></span> <tr id=entity-nbsp><td> <code>nbsp;</code> <td> U+000A0 <td> <span class=glyph> </span> <tr id=entity-nbsp-legacy class=impl><td> <code>nbsp</code> <td> U+000A0 <td> <span> </span> <tr id=entity-nbump><td> <code>nbump;</code> <td> U+0224E U+00338 <td> <span class="glyph compound"></span> <tr id=entity-nbumpe><td> <code>nbumpe;</code> <td> U+0224F U+00338 <td> <span class="glyph compound"></span> <tr id=entity-ncap><td> <code>ncap;</code> <td> U+02A43 <td> <span class=glyph></span> <tr id=entity-Ncaron><td> <code>Ncaron;</code> <td> U+00147 <td> <span class=glyph></span> <tr id=entity-ncaron><td> <code>ncaron;</code> <td> U+00148 <td> <span class=glyph></span> <tr id=entity-Ncedil><td> <code>Ncedil;</code> <td> U+00145 <td> <span class=glyph></span> <tr id=entity-ncedil><td> <code>ncedil;</code> <td> U+00146 <td> <span class=glyph></span> <tr id=entity-ncong><td> <code>ncong;</code> <td> U+02247 <td> <span class=glyph></span> <tr id=entity-ncongdot><td> <code>ncongdot;</code> <td> U+02A6D U+00338 <td> <span class="glyph compound"></span> <tr id=entity-ncup><td> <code>ncup;</code> <td> U+02A42 <td> <span class=glyph></span> <tr id=entity-Ncy><td> <code>Ncy;</code> <td> U+0041D <td> <span class=glyph></span> <tr id=entity-ncy><td> <code>ncy;</code> <td> U+0043D <td> <span class=glyph></span> <tr id=entity-ndash><td> <code>ndash;</code> <td> U+02013 <td> <span class=glyph></span> <tr id=entity-ne><td> <code>ne;</code> <td> U+02260 <td> <span class=glyph></span> <tr id=entity-nearhk><td> <code>nearhk;</code> <td> U+02924 <td> <span class=glyph></span> <tr id=entity-neArr><td> <code>neArr;</code> <td> U+021D7 <td> <span class=glyph></span> <tr id=entity-nearr><td> <code>nearr;</code> <td> U+02197 <td> <span class=glyph></span> <tr id=entity-nearrow><td> <code>nearrow;</code> <td> U+02197 <td> <span class=glyph></span> <tr id=entity-nedot><td> <code>nedot;</code> <td> U+02250 U+00338 <td> <span class="glyph compound"></span> <tr id=entity-NegativeMediumSpace><td> <code>NegativeMediumSpace;</code> <td> U+0200B <td> <span class=glyph></span> <tr id=entity-NegativeThickSpace><td> <code>NegativeThickSpace;</code> <td> U+0200B <td> <span class=glyph></span> <tr id=entity-NegativeThinSpace><td> <code>NegativeThinSpace;</code> <td> U+0200B <td> <span class=glyph></span> <tr id=entity-NegativeVeryThinSpace><td> <code>NegativeVeryThinSpace;</code> <td> U+0200B <td> <span class=glyph></span> <tr id=entity-nequiv><td> <code>nequiv;</code> <td> U+02262 <td> <span class=glyph></span> <tr id=entity-nesear><td> <code>nesear;</code> <td> U+02928 <td> <span class=glyph></span> <tr id=entity-nesim><td> <code>nesim;</code> <td> U+02242 U+00338 <td> <span class="glyph compound"></span> <tr id=entity-NestedGreaterGreater><td> <code>NestedGreaterGreater;</code> <td> U+0226B <td> <span class=glyph></span> <tr id=entity-NestedLessLess><td> <code>NestedLessLess;</code> <td> U+0226A <td> <span class=glyph></span> <tr id=entity-NewLine><td> <code>NewLine;</code> <td> U+0000A <td> <span class="glyph control"></span> <tr id=entity-nexist><td> <code>nexist;</code> <td> U+02204 <td> <span class=glyph></span> <tr id=entity-nexists><td> <code>nexists;</code> <td> U+02204 <td> <span class=glyph></span> <tr id=entity-Nfr><td> <code>Nfr;</code> <td> U+1D511 <td> <span class=glyph></span> <tr id=entity-nfr><td> <code>nfr;</code> <td> U+1D52B <td> <span class=glyph></span> <tr id=entity-ngE><td> <code>ngE;</code> <td> U+02267 U+00338 <td> <span class="glyph compound"></span> <tr id=entity-nge><td> <code>nge;</code> <td> U+02271 <td> <span class=glyph></span> <tr id=entity-ngeq><td> <code>ngeq;</code> <td> U+02271 <td> <span class=glyph></span> <tr id=entity-ngeqq><td> <code>ngeqq;</code> <td> U+02267 U+00338 <td> <span class="glyph compound"></span> <tr id=entity-ngeqslant><td> <code>ngeqslant;</code> <td> U+02A7E U+00338 <td> <span class="glyph compound"></span> <tr id=entity-nges><td> <code>nges;</code> <td> U+02A7E U+00338 <td> <span class="glyph compound"></span> <tr id=entity-nGg><td> <code>nGg;</code> <td> U+022D9 U+00338 <td> <span class="glyph compound"></span> <tr id=entity-ngsim><td> <code>ngsim;</code> <td> U+02275 <td> <span class=glyph></span> <tr id=entity-nGt><td> <code>nGt;</code> <td> U+0226B U+020D2 <td> <span class="glyph compound"></span> <tr id=entity-ngt><td> <code>ngt;</code> <td> U+0226F <td> <span class=glyph></span> <tr id=entity-ngtr><td> <code>ngtr;</code> <td> U+0226F <td> <span class=glyph></span> <tr id=entity-nGtv><td> <code>nGtv;</code> <td> U+0226B U+00338 <td> <span class="glyph compound"></span> <tr id=entity-nhArr><td> <code>nhArr;</code> <td> U+021CE <td> <span class=glyph></span> <tr id=entity-nharr><td> <code>nharr;</code> <td> U+021AE <td> <span class=glyph></span> <tr id=entity-nhpar><td> <code>nhpar;</code> <td> U+02AF2 <td> <span class=glyph></span> <tr id=entity-ni><td> <code>ni;</code> <td> U+0220B <td> <span class=glyph></span> <tr id=entity-nis><td> <code>nis;</code> <td> U+022FC <td> <span class=glyph></span> <tr id=entity-nisd><td> <code>nisd;</code> <td> U+022FA <td> <span class=glyph></span> <tr id=entity-niv><td> <code>niv;</code> <td> U+0220B <td> <span class=glyph></span> <tr id=entity-NJcy><td> <code>NJcy;</code> <td> U+0040A <td> <span class=glyph></span> <tr id=entity-njcy><td> <code>njcy;</code> <td> U+0045A <td> <span class=glyph></span> <tr id=entity-nlArr><td> <code>nlArr;</code> <td> U+021CD <td> <span class=glyph></span> <tr id=entity-nlarr><td> <code>nlarr;</code> <td> U+0219A <td> <span class=glyph></span> <tr id=entity-nldr><td> <code>nldr;</code> <td> U+02025 <td> <span class=glyph></span> <tr id=entity-nlE><td> <code>nlE;</code> <td> U+02266 U+00338 <td> <span class="glyph compound"></span> <tr id=entity-nle><td> <code>nle;</code> <td> U+02270 <td> <span class=glyph></span> <tr id=entity-nLeftarrow><td> <code>nLeftarrow;</code> <td> U+021CD <td> <span class=glyph></span> <tr id=entity-nleftarrow><td> <code>nleftarrow;</code> <td> U+0219A <td> <span class=glyph></span> <tr id=entity-nLeftrightarrow><td> <code>nLeftrightarrow;</code> <td> U+021CE <td> <span class=glyph></span> <tr id=entity-nleftrightarrow><td> <code>nleftrightarrow;</code> <td> U+021AE <td> <span class=glyph></span> <tr id=entity-nleq><td> <code>nleq;</code> <td> U+02270 <td> <span class=glyph></span> <tr id=entity-nleqq><td> <code>nleqq;</code> <td> U+02266 U+00338 <td> <span class="glyph compound"></span> <tr id=entity-nleqslant><td> <code>nleqslant;</code> <td> U+02A7D U+00338 <td> <span class="glyph compound"></span> <tr id=entity-nles><td> <code>nles;</code> <td> U+02A7D U+00338 <td> <span class="glyph compound"></span> <tr id=entity-nless><td> <code>nless;</code> <td> U+0226E <td> <span class=glyph></span> <tr id=entity-nLl><td> <code>nLl;</code> <td> U+022D8 U+00338 <td> <span class="glyph compound"></span> <tr id=entity-nlsim><td> <code>nlsim;</code> <td> U+02274 <td> <span class=glyph></span> <tr id=entity-nLt><td> <code>nLt;</code> <td> U+0226A U+020D2 <td> <span class="glyph compound"></span> <tr id=entity-nlt><td> <code>nlt;</code> <td> U+0226E <td> <span class=glyph></span> <tr id=entity-nltri><td> <code>nltri;</code> <td> U+022EA <td> <span class=glyph></span> <tr id=entity-nltrie><td> <code>nltrie;</code> <td> U+022EC <td> <span class=glyph></span> <tr id=entity-nLtv><td> <code>nLtv;</code> <td> U+0226A U+00338 <td> <span class="glyph compound"></span> <tr id=entity-nmid><td> <code>nmid;</code> <td> U+02224 <td> <span class=glyph></span> <tr id=entity-NoBreak><td> <code>NoBreak;</code> <td> U+02060 <td> <span class=glyph></span> <tr id=entity-NonBreakingSpace><td> <code>NonBreakingSpace;</code> <td> U+000A0 <td> <span class=glyph> </span> <tr id=entity-Nopf><td> <code>Nopf;</code> <td> U+02115 <td> <span class=glyph></span> <tr id=entity-nopf><td> <code>nopf;</code> <td> U+1D55F <td> <span class=glyph></span> <tr id=entity-Not><td> <code>Not;</code> <td> U+02AEC <td> <span class=glyph></span> <tr id=entity-not><td> <code>not;</code> <td> U+000AC <td> <span class=glyph></span> <tr id=entity-not-legacy class=impl><td> <code>not</code> <td> U+000AC <td> <span></span> <tr id=entity-NotCongruent><td> <code>NotCongruent;</code> <td> U+02262 <td> <span class=glyph></span> <tr id=entity-NotCupCap><td> <code>NotCupCap;</code> <td> U+0226D <td> <span class=glyph></span> <tr id=entity-NotDoubleVerticalBar><td> <code>NotDoubleVerticalBar;</code> <td> U+02226 <td> <span class=glyph></span> <tr id=entity-NotElement><td> <code>NotElement;</code> <td> U+02209 <td> <span class=glyph></span> <tr id=entity-NotEqual><td> <code>NotEqual;</code> <td> U+02260 <td> <span class=glyph></span> <tr id=entity-NotEqualTilde><td> <code>NotEqualTilde;</code> <td> U+02242 U+00338 <td> <span class="glyph compound"></span> <tr id=entity-NotExists><td> <code>NotExists;</code> <td> U+02204 <td> <span class=glyph></span> <tr id=entity-NotGreater><td> <code>NotGreater;</code> <td> U+0226F <td> <span class=glyph></span> <tr id=entity-NotGreaterEqual><td> <code>NotGreaterEqual;</code> <td> U+02271 <td> <span class=glyph></span> <tr id=entity-NotGreaterFullEqual><td> <code>NotGreaterFullEqual;</code> <td> U+02267 U+00338 <td> <span class="glyph compound"></span> <tr id=entity-NotGreaterGreater><td> <code>NotGreaterGreater;</code> <td> U+0226B U+00338 <td> <span class="glyph compound"></span> <tr id=entity-NotGreaterLess><td> <code>NotGreaterLess;</code> <td> U+02279 <td> <span class=glyph></span> <tr id=entity-NotGreaterSlantEqual><td> <code>NotGreaterSlantEqual;</code> <td> U+02A7E U+00338 <td> <span class="glyph compound"></span> <tr id=entity-NotGreaterTilde><td> <code>NotGreaterTilde;</code> <td> U+02275 <td> <span class=glyph></span> <tr id=entity-NotHumpDownHump><td> <code>NotHumpDownHump;</code> <td> U+0224E U+00338 <td> <span class="glyph compound"></span> <tr id=entity-NotHumpEqual><td> <code>NotHumpEqual;</code> <td> U+0224F U+00338 <td> <span class="glyph compound"></span> <tr id=entity-notin><td> <code>notin;</code> <td> U+02209 <td> <span class=glyph></span> <tr id=entity-notindot><td> <code>notindot;</code> <td> U+022F5 U+00338 <td> <span class="glyph compound"></span> <tr id=entity-notinE><td> <code>notinE;</code> <td> U+022F9 U+00338 <td> <span class="glyph compound"></span> <tr id=entity-notinva><td> <code>notinva;</code> <td> U+02209 <td> <span class=glyph></span> <tr id=entity-notinvb><td> <code>notinvb;</code> <td> U+022F7 <td> <span class=glyph></span> <tr id=entity-notinvc><td> <code>notinvc;</code> <td> U+022F6 <td> <span class=glyph></span> <tr id=entity-NotLeftTriangle><td> <code>NotLeftTriangle;</code> <td> U+022EA <td> <span class=glyph></span> <tr id=entity-NotLeftTriangleBar><td> <code>NotLeftTriangleBar;</code> <td> U+029CF U+00338 <td> <span class="glyph compound"></span> <tr id=entity-NotLeftTriangleEqual><td> <code>NotLeftTriangleEqual;</code> <td> U+022EC <td> <span class=glyph></span> <tr id=entity-NotLess><td> <code>NotLess;</code> <td> U+0226E <td> <span class=glyph></span> <tr id=entity-NotLessEqual><td> <code>NotLessEqual;</code> <td> U+02270 <td> <span class=glyph></span> <tr id=entity-NotLessGreater><td> <code>NotLessGreater;</code> <td> U+02278 <td> <span class=glyph></span> <tr id=entity-NotLessLess><td> <code>NotLessLess;</code> <td> U+0226A U+00338 <td> <span class="glyph compound"></span> <tr id=entity-NotLessSlantEqual><td> <code>NotLessSlantEqual;</code> <td> U+02A7D U+00338 <td> <span class="glyph compound"></span> <tr id=entity-NotLessTilde><td> <code>NotLessTilde;</code> <td> U+02274 <td> <span class=glyph></span> <tr id=entity-NotNestedGreaterGreater><td> <code>NotNestedGreaterGreater;</code> <td> U+02AA2 U+00338 <td> <span class="glyph compound"></span> <tr id=entity-NotNestedLessLess><td> <code>NotNestedLessLess;</code> <td> U+02AA1 U+00338 <td> <span class="glyph compound"></span> <tr id=entity-notni><td> <code>notni;</code> <td> U+0220C <td> <span class=glyph></span> <tr id=entity-notniva><td> <code>notniva;</code> <td> U+0220C <td> <span class=glyph></span> <tr id=entity-notnivb><td> <code>notnivb;</code> <td> U+022FE <td> <span class=glyph></span> <tr id=entity-notnivc><td> <code>notnivc;</code> <td> U+022FD <td> <span class=glyph></span> <tr id=entity-NotPrecedes><td> <code>NotPrecedes;</code> <td> U+02280 <td> <span class=glyph></span> <tr id=entity-NotPrecedesEqual><td> <code>NotPrecedesEqual;</code> <td> U+02AAF U+00338 <td> <span class="glyph compound"></span> <tr id=entity-NotPrecedesSlantEqual><td> <code>NotPrecedesSlantEqual;</code> <td> U+022E0 <td> <span class=glyph></span> <tr id=entity-NotReverseElement><td> <code>NotReverseElement;</code> <td> U+0220C <td> <span class=glyph></span> <tr id=entity-NotRightTriangle><td> <code>NotRightTriangle;</code> <td> U+022EB <td> <span class=glyph></span> <tr id=entity-NotRightTriangleBar><td> <code>NotRightTriangleBar;</code> <td> U+029D0 U+00338 <td> <span class="glyph compound"></span> <tr id=entity-NotRightTriangleEqual><td> <code>NotRightTriangleEqual;</code> <td> U+022ED <td> <span class=glyph></span> <tr id=entity-NotSquareSubset><td> <code>NotSquareSubset;</code> <td> U+0228F U+00338 <td> <span class="glyph compound"></span> <tr id=entity-NotSquareSubsetEqual><td> <code>NotSquareSubsetEqual;</code> <td> U+022E2 <td> <span class=glyph></span> <tr id=entity-NotSquareSuperset><td> <code>NotSquareSuperset;</code> <td> U+02290 U+00338 <td> <span class="glyph compound"></span> <tr id=entity-NotSquareSupersetEqual><td> <code>NotSquareSupersetEqual;</code> <td> U+022E3 <td> <span class=glyph></span> <tr id=entity-NotSubset><td> <code>NotSubset;</code> <td> U+02282 U+020D2 <td> <span class="glyph compound"></span> <tr id=entity-NotSubsetEqual><td> <code>NotSubsetEqual;</code> <td> U+02288 <td> <span class=glyph></span> <tr id=entity-NotSucceeds><td> <code>NotSucceeds;</code> <td> U+02281 <td> <span class=glyph></span> <tr id=entity-NotSucceedsEqual><td> <code>NotSucceedsEqual;</code> <td> U+02AB0 U+00338 <td> <span class="glyph compound"></span> <tr id=entity-NotSucceedsSlantEqual><td> <code>NotSucceedsSlantEqual;</code> <td> U+022E1 <td> <span class=glyph></span> <tr id=entity-NotSucceedsTilde><td> <code>NotSucceedsTilde;</code> <td> U+0227F U+00338 <td> <span class="glyph compound"></span> <tr id=entity-NotSuperset><td> <code>NotSuperset;</code> <td> U+02283 U+020D2 <td> <span class="glyph compound"></span> <tr id=entity-NotSupersetEqual><td> <code>NotSupersetEqual;</code> <td> U+02289 <td> <span class=glyph></span> <tr id=entity-NotTilde><td> <code>NotTilde;</code> <td> U+02241 <td> <span class=glyph></span> <tr id=entity-NotTildeEqual><td> <code>NotTildeEqual;</code> <td> U+02244 <td> <span class=glyph></span> <tr id=entity-NotTildeFullEqual><td> <code>NotTildeFullEqual;</code> <td> U+02247 <td> <span class=glyph></span> <tr id=entity-NotTildeTilde><td> <code>NotTildeTilde;</code> <td> U+02249 <td> <span class=glyph></span> <tr id=entity-NotVerticalBar><td> <code>NotVerticalBar;</code> <td> U+02224 <td> <span class=glyph></span> <tr id=entity-npar><td> <code>npar;</code> <td> U+02226 <td> <span class=glyph></span> <tr id=entity-nparallel><td> <code>nparallel;</code> <td> U+02226 <td> <span class=glyph></span> <tr id=entity-nparsl><td> <code>nparsl;</code> <td> U+02AFD U+020E5 <td> <span class="glyph compound"></span> <tr id=entity-npart><td> <code>npart;</code> <td> U+02202 U+00338 <td> <span class="glyph compound"></span> <tr id=entity-npolint><td> <code>npolint;</code> <td> U+02A14 <td> <span class=glyph></span> <tr id=entity-npr><td> <code>npr;</code> <td> U+02280 <td> <span class=glyph></span> <tr id=entity-nprcue><td> <code>nprcue;</code> <td> U+022E0 <td> <span class=glyph></span> <tr id=entity-npre><td> <code>npre;</code> <td> U+02AAF U+00338 <td> <span class="glyph compound"></span> <tr id=entity-nprec><td> <code>nprec;</code> <td> U+02280 <td> <span class=glyph></span> <tr id=entity-npreceq><td> <code>npreceq;</code> <td> U+02AAF U+00338 <td> <span class="glyph compound"></span> <tr id=entity-nrArr><td> <code>nrArr;</code> <td> U+021CF <td> <span class=glyph></span> <tr id=entity-nrarr><td> <code>nrarr;</code> <td> U+0219B <td> <span class=glyph></span> <tr id=entity-nrarrc><td> <code>nrarrc;</code> <td> U+02933 U+00338 <td> <span class="glyph compound"></span> <tr id=entity-nrarrw><td> <code>nrarrw;</code> <td> U+0219D U+00338 <td> <span class="glyph compound"></span> <tr id=entity-nRightarrow><td> <code>nRightarrow;</code> <td> U+021CF <td> <span class=glyph></span> <tr id=entity-nrightarrow><td> <code>nrightarrow;</code> <td> U+0219B <td> <span class=glyph></span> <tr id=entity-nrtri><td> <code>nrtri;</code> <td> U+022EB <td> <span class=glyph></span> <tr id=entity-nrtrie><td> <code>nrtrie;</code> <td> U+022ED <td> <span class=glyph></span> <tr id=entity-nsc><td> <code>nsc;</code> <td> U+02281 <td> <span class=glyph></span> <tr id=entity-nsccue><td> <code>nsccue;</code> <td> U+022E1 <td> <span class=glyph></span> <tr id=entity-nsce><td> <code>nsce;</code> <td> U+02AB0 U+00338 <td> <span class="glyph compound"></span> <tr id=entity-Nscr><td> <code>Nscr;</code> <td> U+1D4A9 <td> <span class=glyph></span> <tr id=entity-nscr><td> <code>nscr;</code> <td> U+1D4C3 <td> <span class=glyph></span> <tr id=entity-nshortmid><td> <code>nshortmid;</code> <td> U+02224 <td> <span class=glyph></span> <tr id=entity-nshortparallel><td> <code>nshortparallel;</code> <td> U+02226 <td> <span class=glyph></span> <tr id=entity-nsim><td> <code>nsim;</code> <td> U+02241 <td> <span class=glyph></span> <tr id=entity-nsime><td> <code>nsime;</code> <td> U+02244 <td> <span class=glyph></span> <tr id=entity-nsimeq><td> <code>nsimeq;</code> <td> U+02244 <td> <span class=glyph></span> <tr id=entity-nsmid><td> <code>nsmid;</code> <td> U+02224 <td> <span class=glyph></span> <tr id=entity-nspar><td> <code>nspar;</code> <td> U+02226 <td> <span class=glyph></span> <tr id=entity-nsqsube><td> <code>nsqsube;</code> <td> U+022E2 <td> <span class=glyph></span> <tr id=entity-nsqsupe><td> <code>nsqsupe;</code> <td> U+022E3 <td> <span class=glyph></span> <tr id=entity-nsub><td> <code>nsub;</code> <td> U+02284 <td> <span class=glyph></span> <tr id=entity-nsubE><td> <code>nsubE;</code> <td> U+02AC5 U+00338 <td> <span class="glyph compound"></span> <tr id=entity-nsube><td> <code>nsube;</code> <td> U+02288 <td> <span class=glyph></span> <tr id=entity-nsubset><td> <code>nsubset;</code> <td> U+02282 U+020D2 <td> <span class="glyph compound"></span> <tr id=entity-nsubseteq><td> <code>nsubseteq;</code> <td> U+02288 <td> <span class=glyph></span> <tr id=entity-nsubseteqq><td> <code>nsubseteqq;</code> <td> U+02AC5 U+00338 <td> <span class="glyph compound"></span> <tr id=entity-nsucc><td> <code>nsucc;</code> <td> U+02281 <td> <span class=glyph></span> <tr id=entity-nsucceq><td> <code>nsucceq;</code> <td> U+02AB0 U+00338 <td> <span class="glyph compound"></span> <tr id=entity-nsup><td> <code>nsup;</code> <td> U+02285 <td> <span class=glyph></span> <tr id=entity-nsupE><td> <code>nsupE;</code> <td> U+02AC6 U+00338 <td> <span class="glyph compound"></span> <tr id=entity-nsupe><td> <code>nsupe;</code> <td> U+02289 <td> <span class=glyph></span> <tr id=entity-nsupset><td> <code>nsupset;</code> <td> U+02283 U+020D2 <td> <span class="glyph compound"></span> <tr id=entity-nsupseteq><td> <code>nsupseteq;</code> <td> U+02289 <td> <span class=glyph></span> <tr id=entity-nsupseteqq><td> <code>nsupseteqq;</code> <td> U+02AC6 U+00338 <td> <span class="glyph compound"></span> <tr id=entity-ntgl><td> <code>ntgl;</code> <td> U+02279 <td> <span class=glyph></span> <tr id=entity-Ntilde><td> <code>Ntilde;</code> <td> U+000D1 <td> <span class=glyph></span> <tr id=entity-Ntilde-legacy class=impl><td> <code>Ntilde</code> <td> U+000D1 <td> <span></span> <tr id=entity-ntilde><td> <code>ntilde;</code> <td> U+000F1 <td> <span class=glyph></span> <tr id=entity-ntilde-legacy class=impl><td> <code>ntilde</code> <td> U+000F1 <td> <span></span> <tr id=entity-ntlg><td> <code>ntlg;</code> <td> U+02278 <td> <span class=glyph></span> <tr id=entity-ntriangleleft><td> <code>ntriangleleft;</code> <td> U+022EA <td> <span class=glyph></span> <tr id=entity-ntrianglelefteq><td> <code>ntrianglelefteq;</code> <td> U+022EC <td> <span class=glyph></span> <tr id=entity-ntriangleright><td> <code>ntriangleright;</code> <td> U+022EB <td> <span class=glyph></span> <tr id=entity-ntrianglerighteq><td> <code>ntrianglerighteq;</code> <td> U+022ED <td> <span class=glyph></span> <tr id=entity-Nu><td> <code>Nu;</code> <td> U+0039D <td> <span class=glyph></span> <tr id=entity-nu><td> <code>nu;</code> <td> U+003BD <td> <span class=glyph></span> <tr id=entity-num><td> <code>num;</code> <td> U+00023 <td> <span class=glyph>#</span> <tr id=entity-numero><td> <code>numero;</code> <td> U+02116 <td> <span class=glyph></span> <tr id=entity-numsp><td> <code>numsp;</code> <td> U+02007 <td> <span class=glyph></span> <tr id=entity-nvap><td> <code>nvap;</code> <td> U+0224D U+020D2 <td> <span class="glyph compound"></span> <tr id=entity-nVDash><td> <code>nVDash;</code> <td> U+022AF <td> <span class=glyph></span> <tr id=entity-nVdash><td> <code>nVdash;</code> <td> U+022AE <td> <span class=glyph></span> <tr id=entity-nvDash><td> <code>nvDash;</code> <td> U+022AD <td> <span class=glyph></span> <tr id=entity-nvdash><td> <code>nvdash;</code> <td> U+022AC <td> <span class=glyph></span> <tr id=entity-nvge><td> <code>nvge;</code> <td> U+02265 U+020D2 <td> <span class="glyph compound"></span> <tr id=entity-nvgt><td> <code>nvgt;</code> <td> U+0003E U+020D2 <td> <span class="glyph compound">></span> <tr id=entity-nvHarr><td> <code>nvHarr;</code> <td> U+02904 <td> <span class=glyph></span> <tr id=entity-nvinfin><td> <code>nvinfin;</code> <td> U+029DE <td> <span class=glyph></span> <tr id=entity-nvlArr><td> <code>nvlArr;</code> <td> U+02902 <td> <span class=glyph></span> <tr id=entity-nvle><td> <code>nvle;</code> <td> U+02264 U+020D2 <td> <span class="glyph compound"></span> <tr id=entity-nvlt><td> <code>nvlt;</code> <td> U+0003C U+020D2 <td> <span class="glyph compound"><</span> <tr id=entity-nvltrie><td> <code>nvltrie;</code> <td> U+022B4 U+020D2 <td> <span class="glyph compound"></span> <tr id=entity-nvrArr><td> <code>nvrArr;</code> <td> U+02903 <td> <span class=glyph></span> <tr id=entity-nvrtrie><td> <code>nvrtrie;</code> <td> U+022B5 U+020D2 <td> <span class="glyph compound"></span> <tr id=entity-nvsim><td> <code>nvsim;</code> <td> U+0223C U+020D2 <td> <span class="glyph compound"></span> <tr id=entity-nwarhk><td> <code>nwarhk;</code> <td> U+02923 <td> <span class=glyph></span> <tr id=entity-nwArr><td> <code>nwArr;</code> <td> U+021D6 <td> <span class=glyph></span> <tr id=entity-nwarr><td> <code>nwarr;</code> <td> U+02196 <td> <span class=glyph></span> <tr id=entity-nwarrow><td> <code>nwarrow;</code> <td> U+02196 <td> <span class=glyph></span> <tr id=entity-nwnear><td> <code>nwnear;</code> <td> U+02927 <td> <span class=glyph></span> <tr id=entity-Oacute><td> <code>Oacute;</code> <td> U+000D3 <td> <span class=glyph></span> <tr id=entity-Oacute-legacy class=impl><td> <code>Oacute</code> <td> U+000D3 <td> <span></span> <tr id=entity-oacute><td> <code>oacute;</code> <td> U+000F3 <td> <span class=glyph></span> <tr id=entity-oacute-legacy class=impl><td> <code>oacute</code> <td> U+000F3 <td> <span></span> <tr id=entity-oast><td> <code>oast;</code> <td> U+0229B <td> <span class=glyph></span> <tr id=entity-ocir><td> <code>ocir;</code> <td> U+0229A <td> <span class=glyph></span> <tr id=entity-Ocirc><td> <code>Ocirc;</code> <td> U+000D4 <td> <span class=glyph></span> <tr id=entity-Ocirc-legacy class=impl><td> <code>Ocirc</code> <td> U+000D4 <td> <span></span> <tr id=entity-ocirc><td> <code>ocirc;</code> <td> U+000F4 <td> <span class=glyph></span> <tr id=entity-ocirc-legacy class=impl><td> <code>ocirc</code> <td> U+000F4 <td> <span></span> <tr id=entity-Ocy><td> <code>Ocy;</code> <td> U+0041E <td> <span class=glyph></span> <tr id=entity-ocy><td> <code>ocy;</code> <td> U+0043E <td> <span class=glyph></span> <tr id=entity-odash><td> <code>odash;</code> <td> U+0229D <td> <span class=glyph></span> <tr id=entity-Odblac><td> <code>Odblac;</code> <td> U+00150 <td> <span class=glyph></span> <tr id=entity-odblac><td> <code>odblac;</code> <td> U+00151 <td> <span class=glyph></span> <tr id=entity-odiv><td> <code>odiv;</code> <td> U+02A38 <td> <span class=glyph></span> <tr id=entity-odot><td> <code>odot;</code> <td> U+02299 <td> <span class=glyph></span> <tr id=entity-odsold><td> <code>odsold;</code> <td> U+029BC <td> <span class=glyph></span> <tr id=entity-OElig><td> <code>OElig;</code> <td> U+00152 <td> <span class=glyph></span> <tr id=entity-oelig><td> <code>oelig;</code> <td> U+00153 <td> <span class=glyph></span> <tr id=entity-ofcir><td> <code>ofcir;</code> <td> U+029BF <td> <span class=glyph></span> <tr id=entity-Ofr><td> <code>Ofr;</code> <td> U+1D512 <td> <span class=glyph></span> <tr id=entity-ofr><td> <code>ofr;</code> <td> U+1D52C <td> <span class=glyph></span> <tr id=entity-ogon><td> <code>ogon;</code> <td> U+002DB <td> <span class=glyph></span> <tr id=entity-Ograve><td> <code>Ograve;</code> <td> U+000D2 <td> <span class=glyph></span> <tr id=entity-Ograve-legacy class=impl><td> <code>Ograve</code> <td> U+000D2 <td> <span></span> <tr id=entity-ograve><td> <code>ograve;</code> <td> U+000F2 <td> <span class=glyph></span> <tr id=entity-ograve-legacy class=impl><td> <code>ograve</code> <td> U+000F2 <td> <span></span> <tr id=entity-ogt><td> <code>ogt;</code> <td> U+029C1 <td> <span class=glyph></span> <tr id=entity-ohbar><td> <code>ohbar;</code> <td> U+029B5 <td> <span class=glyph></span> <tr id=entity-ohm><td> <code>ohm;</code> <td> U+003A9 <td> <span class=glyph></span> <tr id=entity-oint><td> <code>oint;</code> <td> U+0222E <td> <span class=glyph></span> <tr id=entity-olarr><td> <code>olarr;</code> <td> U+021BA <td> <span class=glyph></span> <tr id=entity-olcir><td> <code>olcir;</code> <td> U+029BE <td> <span class=glyph></span> <tr id=entity-olcross><td> <code>olcross;</code> <td> U+029BB <td> <span class=glyph></span> <tr id=entity-oline><td> <code>oline;</code> <td> U+0203E <td> <span class=glyph></span> <tr id=entity-olt><td> <code>olt;</code> <td> U+029C0 <td> <span class=glyph></span> <tr id=entity-Omacr><td> <code>Omacr;</code> <td> U+0014C <td> <span class=glyph></span> <tr id=entity-omacr><td> <code>omacr;</code> <td> U+0014D <td> <span class=glyph></span> <tr id=entity-Omega><td> <code>Omega;</code> <td> U+003A9 <td> <span class=glyph></span> <tr id=entity-omega><td> <code>omega;</code> <td> U+003C9 <td> <span class=glyph></span> <tr id=entity-Omicron><td> <code>Omicron;</code> <td> U+0039F <td> <span class=glyph></span> <tr id=entity-omicron><td> <code>omicron;</code> <td> U+003BF <td> <span class=glyph></span> <tr id=entity-omid><td> <code>omid;</code> <td> U+029B6 <td> <span class=glyph></span> <tr id=entity-ominus><td> <code>ominus;</code> <td> U+02296 <td> <span class=glyph></span> <tr id=entity-Oopf><td> <code>Oopf;</code> <td> U+1D546 <td> <span class=glyph></span> <tr id=entity-oopf><td> <code>oopf;</code> <td> U+1D560 <td> <span class=glyph></span> <tr id=entity-opar><td> <code>opar;</code> <td> U+029B7 <td> <span class=glyph></span> <tr id=entity-OpenCurlyDoubleQuote><td> <code>OpenCurlyDoubleQuote;</code> <td> U+0201C <td> <span class=glyph></span> <tr id=entity-OpenCurlyQuote><td> <code>OpenCurlyQuote;</code> <td> U+02018 <td> <span class=glyph></span> <tr id=entity-operp><td> <code>operp;</code> <td> U+029B9 <td> <span class=glyph></span> <tr id=entity-oplus><td> <code>oplus;</code> <td> U+02295 <td> <span class=glyph></span> <tr id=entity-Or><td> <code>Or;</code> <td> U+02A54 <td> <span class=glyph></span> <tr id=entity-or><td> <code>or;</code> <td> U+02228 <td> <span class=glyph></span> <tr id=entity-orarr><td> <code>orarr;</code> <td> U+021BB <td> <span class=glyph></span> <tr id=entity-ord><td> <code>ord;</code> <td> U+02A5D <td> <span class=glyph></span> <tr id=entity-order><td> <code>order;</code> <td> U+02134 <td> <span class=glyph></span> <tr id=entity-orderof><td> <code>orderof;</code> <td> U+02134 <td> <span class=glyph></span> <tr id=entity-ordf><td> <code>ordf;</code> <td> U+000AA <td> <span class=glyph></span> <tr id=entity-ordf-legacy class=impl><td> <code>ordf</code> <td> U+000AA <td> <span></span> <tr id=entity-ordm><td> <code>ordm;</code> <td> U+000BA <td> <span class=glyph></span> <tr id=entity-ordm-legacy class=impl><td> <code>ordm</code> <td> U+000BA <td> <span></span> <tr id=entity-origof><td> <code>origof;</code> <td> U+022B6 <td> <span class=glyph></span> <tr id=entity-oror><td> <code>oror;</code> <td> U+02A56 <td> <span class=glyph></span> <tr id=entity-orslope><td> <code>orslope;</code> <td> U+02A57 <td> <span class=glyph></span> <tr id=entity-orv><td> <code>orv;</code> <td> U+02A5B <td> <span class=glyph></span> <tr id=entity-oS><td> <code>oS;</code> <td> U+024C8 <td> <span class=glyph></span> <tr id=entity-Oscr><td> <code>Oscr;</code> <td> U+1D4AA <td> <span class=glyph></span> <tr id=entity-oscr><td> <code>oscr;</code> <td> U+02134 <td> <span class=glyph></span> <tr id=entity-Oslash><td> <code>Oslash;</code> <td> U+000D8 <td> <span class=glyph></span> <tr id=entity-Oslash-legacy class=impl><td> <code>Oslash</code> <td> U+000D8 <td> <span></span> <tr id=entity-oslash><td> <code>oslash;</code> <td> U+000F8 <td> <span class=glyph></span> <tr id=entity-oslash-legacy class=impl><td> <code>oslash</code> <td> U+000F8 <td> <span></span> <tr id=entity-osol><td> <code>osol;</code> <td> U+02298 <td> <span class=glyph></span> <tr id=entity-Otilde><td> <code>Otilde;</code> <td> U+000D5 <td> <span class=glyph></span> <tr id=entity-Otilde-legacy class=impl><td> <code>Otilde</code> <td> U+000D5 <td> <span></span> <tr id=entity-otilde><td> <code>otilde;</code> <td> U+000F5 <td> <span class=glyph></span> <tr id=entity-otilde-legacy class=impl><td> <code>otilde</code> <td> U+000F5 <td> <span></span> <tr id=entity-Otimes><td> <code>Otimes;</code> <td> U+02A37 <td> <span class=glyph></span> <tr id=entity-otimes><td> <code>otimes;</code> <td> U+02297 <td> <span class=glyph></span> <tr id=entity-otimesas><td> <code>otimesas;</code> <td> U+02A36 <td> <span class=glyph></span> <tr id=entity-Ouml><td> <code>Ouml;</code> <td> U+000D6 <td> <span class=glyph></span> <tr id=entity-Ouml-legacy class=impl><td> <code>Ouml</code> <td> U+000D6 <td> <span></span> <tr id=entity-ouml><td> <code>ouml;</code> <td> U+000F6 <td> <span class=glyph></span> <tr id=entity-ouml-legacy class=impl><td> <code>ouml</code> <td> U+000F6 <td> <span></span> <tr id=entity-ovbar><td> <code>ovbar;</code> <td> U+0233D <td> <span class=glyph></span> <tr id=entity-OverBar><td> <code>OverBar;</code> <td> U+0203E <td> <span class=glyph></span> <tr id=entity-OverBrace><td> <code>OverBrace;</code> <td> U+023DE <td> <span class=glyph></span> <tr id=entity-OverBracket><td> <code>OverBracket;</code> <td> U+023B4 <td> <span class=glyph></span> <tr id=entity-OverParenthesis><td> <code>OverParenthesis;</code> <td> U+023DC <td> <span class=glyph></span> <tr id=entity-par><td> <code>par;</code> <td> U+02225 <td> <span class=glyph></span> <tr id=entity-para><td> <code>para;</code> <td> U+000B6 <td> <span class=glyph></span> <tr id=entity-para-legacy class=impl><td> <code>para</code> <td> U+000B6 <td> <span></span> <tr id=entity-parallel><td> <code>parallel;</code> <td> U+02225 <td> <span class=glyph></span> <tr id=entity-parsim><td> <code>parsim;</code> <td> U+02AF3 <td> <span class=glyph></span> <tr id=entity-parsl><td> <code>parsl;</code> <td> U+02AFD <td> <span class=glyph></span> <tr id=entity-part><td> <code>part;</code> <td> U+02202 <td> <span class=glyph></span> <tr id=entity-PartialD><td> <code>PartialD;</code> <td> U+02202 <td> <span class=glyph></span> <tr id=entity-Pcy><td> <code>Pcy;</code> <td> U+0041F <td> <span class=glyph></span> <tr id=entity-pcy><td> <code>pcy;</code> <td> U+0043F <td> <span class=glyph></span> <tr id=entity-percnt><td> <code>percnt;</code> <td> U+00025 <td> <span class=glyph>%</span> <tr id=entity-period><td> <code>period;</code> <td> U+0002E <td> <span class=glyph>.</span> <tr id=entity-permil><td> <code>permil;</code> <td> U+02030 <td> <span class=glyph></span> <tr id=entity-perp><td> <code>perp;</code> <td> U+022A5 <td> <span class=glyph></span> <tr id=entity-pertenk><td> <code>pertenk;</code> <td> U+02031 <td> <span class=glyph></span> <tr id=entity-Pfr><td> <code>Pfr;</code> <td> U+1D513 <td> <span class=glyph></span> <tr id=entity-pfr><td> <code>pfr;</code> <td> U+1D52D <td> <span class=glyph></span> <tr id=entity-Phi><td> <code>Phi;</code> <td> U+003A6 <td> <span class=glyph></span> <tr id=entity-phi><td> <code>phi;</code> <td> U+003C6 <td> <span class=glyph></span> <tr id=entity-phiv><td> <code>phiv;</code> <td> U+003D5 <td> <span class=glyph></span> <tr id=entity-phmmat><td> <code>phmmat;</code> <td> U+02133 <td> <span class=glyph></span> <tr id=entity-phone><td> <code>phone;</code> <td> U+0260E <td> <span class=glyph></span> <tr id=entity-Pi><td> <code>Pi;</code> <td> U+003A0 <td> <span class=glyph></span> <tr id=entity-pi><td> <code>pi;</code> <td> U+003C0 <td> <span class=glyph></span> <tr id=entity-pitchfork><td> <code>pitchfork;</code> <td> U+022D4 <td> <span class=glyph></span> <tr id=entity-piv><td> <code>piv;</code> <td> U+003D6 <td> <span class=glyph></span> <tr id=entity-planck><td> <code>planck;</code> <td> U+0210F <td> <span class=glyph></span> <tr id=entity-planckh><td> <code>planckh;</code> <td> U+0210E <td> <span class=glyph></span> <tr id=entity-plankv><td> <code>plankv;</code> <td> U+0210F <td> <span class=glyph></span> <tr id=entity-plus><td> <code>plus;</code> <td> U+0002B <td> <span class=glyph>+</span> <tr id=entity-plusacir><td> <code>plusacir;</code> <td> U+02A23 <td> <span class=glyph></span> <tr id=entity-plusb><td> <code>plusb;</code> <td> U+0229E <td> <span class=glyph></span> <tr id=entity-pluscir><td> <code>pluscir;</code> <td> U+02A22 <td> <span class=glyph></span> <tr id=entity-plusdo><td> <code>plusdo;</code> <td> U+02214 <td> <span class=glyph></span> <tr id=entity-plusdu><td> <code>plusdu;</code> <td> U+02A25 <td> <span class=glyph></span> <tr id=entity-pluse><td> <code>pluse;</code> <td> U+02A72 <td> <span class=glyph></span> <tr id=entity-PlusMinus><td> <code>PlusMinus;</code> <td> U+000B1 <td> <span class=glyph></span> <tr id=entity-plusmn><td> <code>plusmn;</code> <td> U+000B1 <td> <span class=glyph></span> <tr id=entity-plusmn-legacy class=impl><td> <code>plusmn</code> <td> U+000B1 <td> <span></span> <tr id=entity-plussim><td> <code>plussim;</code> <td> U+02A26 <td> <span class=glyph></span> <tr id=entity-plustwo><td> <code>plustwo;</code> <td> U+02A27 <td> <span class=glyph></span> <tr id=entity-pm><td> <code>pm;</code> <td> U+000B1 <td> <span class=glyph></span> <tr id=entity-Poincareplane><td> <code>Poincareplane;</code> <td> U+0210C <td> <span class=glyph></span> <tr id=entity-pointint><td> <code>pointint;</code> <td> U+02A15 <td> <span class=glyph></span> <tr id=entity-Popf><td> <code>Popf;</code> <td> U+02119 <td> <span class=glyph></span> <tr id=entity-popf><td> <code>popf;</code> <td> U+1D561 <td> <span class=glyph></span> <tr id=entity-pound><td> <code>pound;</code> <td> U+000A3 <td> <span class=glyph></span> <tr id=entity-pound-legacy class=impl><td> <code>pound</code> <td> U+000A3 <td> <span></span> <tr id=entity-Pr><td> <code>Pr;</code> <td> U+02ABB <td> <span class=glyph></span> <tr id=entity-pr><td> <code>pr;</code> <td> U+0227A <td> <span class=glyph></span> <tr id=entity-prap><td> <code>prap;</code> <td> U+02AB7 <td> <span class=glyph></span> <tr id=entity-prcue><td> <code>prcue;</code> <td> U+0227C <td> <span class=glyph></span> <tr id=entity-prE><td> <code>prE;</code> <td> U+02AB3 <td> <span class=glyph></span> <tr id=entity-pre><td> <code>pre;</code> <td> U+02AAF <td> <span class=glyph></span> <tr id=entity-prec><td> <code>prec;</code> <td> U+0227A <td> <span class=glyph></span> <tr id=entity-precapprox><td> <code>precapprox;</code> <td> U+02AB7 <td> <span class=glyph></span> <tr id=entity-preccurlyeq><td> <code>preccurlyeq;</code> <td> U+0227C <td> <span class=glyph></span> <tr id=entity-Precedes><td> <code>Precedes;</code> <td> U+0227A <td> <span class=glyph></span> <tr id=entity-PrecedesEqual><td> <code>PrecedesEqual;</code> <td> U+02AAF <td> <span class=glyph></span> <tr id=entity-PrecedesSlantEqual><td> <code>PrecedesSlantEqual;</code> <td> U+0227C <td> <span class=glyph></span> <tr id=entity-PrecedesTilde><td> <code>PrecedesTilde;</code> <td> U+0227E <td> <span class=glyph></span> <tr id=entity-preceq><td> <code>preceq;</code> <td> U+02AAF <td> <span class=glyph></span> <tr id=entity-precnapprox><td> <code>precnapprox;</code> <td> U+02AB9 <td> <span class=glyph></span> <tr id=entity-precneqq><td> <code>precneqq;</code> <td> U+02AB5 <td> <span class=glyph></span> <tr id=entity-precnsim><td> <code>precnsim;</code> <td> U+022E8 <td> <span class=glyph></span> <tr id=entity-precsim><td> <code>precsim;</code> <td> U+0227E <td> <span class=glyph></span> <tr id=entity-Prime><td> <code>Prime;</code> <td> U+02033 <td> <span class=glyph></span> <tr id=entity-prime><td> <code>prime;</code> <td> U+02032 <td> <span class=glyph></span> <tr id=entity-primes><td> <code>primes;</code> <td> U+02119 <td> <span class=glyph></span> <tr id=entity-prnap><td> <code>prnap;</code> <td> U+02AB9 <td> <span class=glyph></span> <tr id=entity-prnE><td> <code>prnE;</code> <td> U+02AB5 <td> <span class=glyph></span> <tr id=entity-prnsim><td> <code>prnsim;</code> <td> U+022E8 <td> <span class=glyph></span> <tr id=entity-prod><td> <code>prod;</code> <td> U+0220F <td> <span class=glyph></span> <tr id=entity-Product><td> <code>Product;</code> <td> U+0220F <td> <span class=glyph></span> <tr id=entity-profalar><td> <code>profalar;</code> <td> U+0232E <td> <span class=glyph></span> <tr id=entity-profline><td> <code>profline;</code> <td> U+02312 <td> <span class=glyph></span> <tr id=entity-profsurf><td> <code>profsurf;</code> <td> U+02313 <td> <span class=glyph></span> <tr id=entity-prop><td> <code>prop;</code> <td> U+0221D <td> <span class=glyph></span> <tr id=entity-Proportion><td> <code>Proportion;</code> <td> U+02237 <td> <span class=glyph></span> <tr id=entity-Proportional><td> <code>Proportional;</code> <td> U+0221D <td> <span class=glyph></span> <tr id=entity-propto><td> <code>propto;</code> <td> U+0221D <td> <span class=glyph></span> <tr id=entity-prsim><td> <code>prsim;</code> <td> U+0227E <td> <span class=glyph></span> <tr id=entity-prurel><td> <code>prurel;</code> <td> U+022B0 <td> <span class=glyph></span> <tr id=entity-Pscr><td> <code>Pscr;</code> <td> U+1D4AB <td> <span class=glyph></span> <tr id=entity-pscr><td> <code>pscr;</code> <td> U+1D4C5 <td> <span class=glyph></span> <tr id=entity-Psi><td> <code>Psi;</code> <td> U+003A8 <td> <span class=glyph></span> <tr id=entity-psi><td> <code>psi;</code> <td> U+003C8 <td> <span class=glyph></span> <tr id=entity-puncsp><td> <code>puncsp;</code> <td> U+02008 <td> <span class=glyph></span> <tr id=entity-Qfr><td> <code>Qfr;</code> <td> U+1D514 <td> <span class=glyph></span> <tr id=entity-qfr><td> <code>qfr;</code> <td> U+1D52E <td> <span class=glyph></span> <tr id=entity-qint><td> <code>qint;</code> <td> U+02A0C <td> <span class=glyph></span> <tr id=entity-Qopf><td> <code>Qopf;</code> <td> U+0211A <td> <span class=glyph></span> <tr id=entity-qopf><td> <code>qopf;</code> <td> U+1D562 <td> <span class=glyph></span> <tr id=entity-qprime><td> <code>qprime;</code> <td> U+02057 <td> <span class=glyph></span> <tr id=entity-Qscr><td> <code>Qscr;</code> <td> U+1D4AC <td> <span class=glyph></span> <tr id=entity-qscr><td> <code>qscr;</code> <td> U+1D4C6 <td> <span class=glyph></span> <tr id=entity-quaternions><td> <code>quaternions;</code> <td> U+0210D <td> <span class=glyph></span> <tr id=entity-quatint><td> <code>quatint;</code> <td> U+02A16 <td> <span class=glyph></span> <tr id=entity-quest><td> <code>quest;</code> <td> U+0003F <td> <span class=glyph>?</span> <tr id=entity-questeq><td> <code>questeq;</code> <td> U+0225F <td> <span class=glyph></span> <tr id=entity-QUOT><td> <code>QUOT;</code> <td> U+00022 <td> <span class=glyph>"</span> <tr id=entity-QUOT-legacy class=impl><td> <code>QUOT</code> <td> U+00022 <td> <span>"</span> <tr id=entity-quot><td> <code>quot;</code> <td> U+00022 <td> <span class=glyph>"</span> <tr id=entity-quot-legacy class=impl><td> <code>quot</code> <td> U+00022 <td> <span>"</span> <tr id=entity-rAarr><td> <code>rAarr;</code> <td> U+021DB <td> <span class=glyph></span> <tr id=entity-race><td> <code>race;</code> <td> U+0223D U+00331 <td> <span class="glyph compound"></span> <tr id=entity-Racute><td> <code>Racute;</code> <td> U+00154 <td> <span class=glyph></span> <tr id=entity-racute><td> <code>racute;</code> <td> U+00155 <td> <span class=glyph></span> <tr id=entity-radic><td> <code>radic;</code> <td> U+0221A <td> <span class=glyph></span> <tr id=entity-raemptyv><td> <code>raemptyv;</code> <td> U+029B3 <td> <span class=glyph></span> <tr id=entity-Rang><td> <code>Rang;</code> <td> U+027EB <td> <span class=glyph></span> <tr id=entity-rang><td> <code>rang;</code> <td> U+027E9 <td> <span class=glyph></span> <tr id=entity-rangd><td> <code>rangd;</code> <td> U+02992 <td> <span class=glyph></span> <tr id=entity-range><td> <code>range;</code> <td> U+029A5 <td> <span class=glyph></span> <tr id=entity-rangle><td> <code>rangle;</code> <td> U+027E9 <td> <span class=glyph></span> <tr id=entity-raquo><td> <code>raquo;</code> <td> U+000BB <td> <span class=glyph></span> <tr id=entity-raquo-legacy class=impl><td> <code>raquo</code> <td> U+000BB <td> <span></span> <tr id=entity-Rarr><td> <code>Rarr;</code> <td> U+021A0 <td> <span class=glyph></span> <tr id=entity-rArr><td> <code>rArr;</code> <td> U+021D2 <td> <span class=glyph></span> <tr id=entity-rarr><td> <code>rarr;</code> <td> U+02192 <td> <span class=glyph></span> <tr id=entity-rarrap><td> <code>rarrap;</code> <td> U+02975 <td> <span class=glyph></span> <tr id=entity-rarrb><td> <code>rarrb;</code> <td> U+021E5 <td> <span class=glyph></span> <tr id=entity-rarrbfs><td> <code>rarrbfs;</code> <td> U+02920 <td> <span class=glyph></span> <tr id=entity-rarrc><td> <code>rarrc;</code> <td> U+02933 <td> <span class=glyph></span> <tr id=entity-rarrfs><td> <code>rarrfs;</code> <td> U+0291E <td> <span class=glyph></span> <tr id=entity-rarrhk><td> <code>rarrhk;</code> <td> U+021AA <td> <span class=glyph></span> <tr id=entity-rarrlp><td> <code>rarrlp;</code> <td> U+021AC <td> <span class=glyph></span> <tr id=entity-rarrpl><td> <code>rarrpl;</code> <td> U+02945 <td> <span class=glyph></span> <tr id=entity-rarrsim><td> <code>rarrsim;</code> <td> U+02974 <td> <span class=glyph></span> <tr id=entity-Rarrtl><td> <code>Rarrtl;</code> <td> U+02916 <td> <span class=glyph></span> <tr id=entity-rarrtl><td> <code>rarrtl;</code> <td> U+021A3 <td> <span class=glyph></span> <tr id=entity-rarrw><td> <code>rarrw;</code> <td> U+0219D <td> <span class=glyph></span> <tr id=entity-rAtail><td> <code>rAtail;</code> <td> U+0291C <td> <span class=glyph></span> <tr id=entity-ratail><td> <code>ratail;</code> <td> U+0291A <td> <span class=glyph></span> <tr id=entity-ratio><td> <code>ratio;</code> <td> U+02236 <td> <span class=glyph></span> <tr id=entity-rationals><td> <code>rationals;</code> <td> U+0211A <td> <span class=glyph></span> <tr id=entity-RBarr><td> <code>RBarr;</code> <td> U+02910 <td> <span class=glyph></span> <tr id=entity-rBarr><td> <code>rBarr;</code> <td> U+0290F <td> <span class=glyph></span> <tr id=entity-rbarr><td> <code>rbarr;</code> <td> U+0290D <td> <span class=glyph></span> <tr id=entity-rbbrk><td> <code>rbbrk;</code> <td> U+02773 <td> <span class=glyph></span> <tr id=entity-rbrace><td> <code>rbrace;</code> <td> U+0007D <td> <span class=glyph>}</span> <tr id=entity-rbrack><td> <code>rbrack;</code> <td> U+0005D <td> <span class=glyph>]</span> <tr id=entity-rbrke><td> <code>rbrke;</code> <td> U+0298C <td> <span class=glyph></span> <tr id=entity-rbrksld><td> <code>rbrksld;</code> <td> U+0298E <td> <span class=glyph></span> <tr id=entity-rbrkslu><td> <code>rbrkslu;</code> <td> U+02990 <td> <span class=glyph></span> <tr id=entity-Rcaron><td> <code>Rcaron;</code> <td> U+00158 <td> <span class=glyph></span> <tr id=entity-rcaron><td> <code>rcaron;</code> <td> U+00159 <td> <span class=glyph></span> <tr id=entity-Rcedil><td> <code>Rcedil;</code> <td> U+00156 <td> <span class=glyph></span> <tr id=entity-rcedil><td> <code>rcedil;</code> <td> U+00157 <td> <span class=glyph></span> <tr id=entity-rceil><td> <code>rceil;</code> <td> U+02309 <td> <span class=glyph></span> <tr id=entity-rcub><td> <code>rcub;</code> <td> U+0007D <td> <span class=glyph>}</span> <tr id=entity-Rcy><td> <code>Rcy;</code> <td> U+00420 <td> <span class=glyph></span> <tr id=entity-rcy><td> <code>rcy;</code> <td> U+00440 <td> <span class=glyph></span> <tr id=entity-rdca><td> <code>rdca;</code> <td> U+02937 <td> <span class=glyph></span> <tr id=entity-rdldhar><td> <code>rdldhar;</code> <td> U+02969 <td> <span class=glyph></span> <tr id=entity-rdquo><td> <code>rdquo;</code> <td> U+0201D <td> <span class=glyph></span> <tr id=entity-rdquor><td> <code>rdquor;</code> <td> U+0201D <td> <span class=glyph></span> <tr id=entity-rdsh><td> <code>rdsh;</code> <td> U+021B3 <td> <span class=glyph></span> <tr id=entity-Re><td> <code>Re;</code> <td> U+0211C <td> <span class=glyph></span> <tr id=entity-real><td> <code>real;</code> <td> U+0211C <td> <span class=glyph></span> <tr id=entity-realine><td> <code>realine;</code> <td> U+0211B <td> <span class=glyph></span> <tr id=entity-realpart><td> <code>realpart;</code> <td> U+0211C <td> <span class=glyph></span> <tr id=entity-reals><td> <code>reals;</code> <td> U+0211D <td> <span class=glyph></span> <tr id=entity-rect><td> <code>rect;</code> <td> U+025AD <td> <span class=glyph></span> <tr id=entity-REG><td> <code>REG;</code> <td> U+000AE <td> <span class=glyph></span> <tr id=entity-REG-legacy class=impl><td> <code>REG</code> <td> U+000AE <td> <span></span> <tr id=entity-reg><td> <code>reg;</code> <td> U+000AE <td> <span class=glyph></span> <tr id=entity-reg-legacy class=impl><td> <code>reg</code> <td> U+000AE <td> <span></span> <tr id=entity-ReverseElement><td> <code>ReverseElement;</code> <td> U+0220B <td> <span class=glyph></span> <tr id=entity-ReverseEquilibrium><td> <code>ReverseEquilibrium;</code> <td> U+021CB <td> <span class=glyph></span> <tr id=entity-ReverseUpEquilibrium><td> <code>ReverseUpEquilibrium;</code> <td> U+0296F <td> <span class=glyph></span> <tr id=entity-rfisht><td> <code>rfisht;</code> <td> U+0297D <td> <span class=glyph></span> <tr id=entity-rfloor><td> <code>rfloor;</code> <td> U+0230B <td> <span class=glyph></span> <tr id=entity-Rfr><td> <code>Rfr;</code> <td> U+0211C <td> <span class=glyph></span> <tr id=entity-rfr><td> <code>rfr;</code> <td> U+1D52F <td> <span class=glyph></span> <tr id=entity-rHar><td> <code>rHar;</code> <td> U+02964 <td> <span class=glyph></span> <tr id=entity-rhard><td> <code>rhard;</code> <td> U+021C1 <td> <span class=glyph></span> <tr id=entity-rharu><td> <code>rharu;</code> <td> U+021C0 <td> <span class=glyph></span> <tr id=entity-rharul><td> <code>rharul;</code> <td> U+0296C <td> <span class=glyph></span> <tr id=entity-Rho><td> <code>Rho;</code> <td> U+003A1 <td> <span class=glyph></span> <tr id=entity-rho><td> <code>rho;</code> <td> U+003C1 <td> <span class=glyph></span> <tr id=entity-rhov><td> <code>rhov;</code> <td> U+003F1 <td> <span class=glyph></span> <tr id=entity-RightAngleBracket><td> <code>RightAngleBracket;</code> <td> U+027E9 <td> <span class=glyph></span> <tr id=entity-RightArrow><td> <code>RightArrow;</code> <td> U+02192 <td> <span class=glyph></span> <tr id=entity-Rightarrow><td> <code>Rightarrow;</code> <td> U+021D2 <td> <span class=glyph></span> <tr id=entity-rightarrow><td> <code>rightarrow;</code> <td> U+02192 <td> <span class=glyph></span> <tr id=entity-RightArrowBar><td> <code>RightArrowBar;</code> <td> U+021E5 <td> <span class=glyph></span> <tr id=entity-RightArrowLeftArrow><td> <code>RightArrowLeftArrow;</code> <td> U+021C4 <td> <span class=glyph></span> <tr id=entity-rightarrowtail><td> <code>rightarrowtail;</code> <td> U+021A3 <td> <span class=glyph></span> <tr id=entity-RightCeiling><td> <code>RightCeiling;</code> <td> U+02309 <td> <span class=glyph></span> <tr id=entity-RightDoubleBracket><td> <code>RightDoubleBracket;</code> <td> U+027E7 <td> <span class=glyph></span> <tr id=entity-RightDownTeeVector><td> <code>RightDownTeeVector;</code> <td> U+0295D <td> <span class=glyph></span> <tr id=entity-RightDownVector><td> <code>RightDownVector;</code> <td> U+021C2 <td> <span class=glyph></span> <tr id=entity-RightDownVectorBar><td> <code>RightDownVectorBar;</code> <td> U+02955 <td> <span class=glyph></span> <tr id=entity-RightFloor><td> <code>RightFloor;</code> <td> U+0230B <td> <span class=glyph></span> <tr id=entity-rightharpoondown><td> <code>rightharpoondown;</code> <td> U+021C1 <td> <span class=glyph></span> <tr id=entity-rightharpoonup><td> <code>rightharpoonup;</code> <td> U+021C0 <td> <span class=glyph></span> <tr id=entity-rightleftarrows><td> <code>rightleftarrows;</code> <td> U+021C4 <td> <span class=glyph></span> <tr id=entity-rightleftharpoons><td> <code>rightleftharpoons;</code> <td> U+021CC <td> <span class=glyph></span> <tr id=entity-rightrightarrows><td> <code>rightrightarrows;</code> <td> U+021C9 <td> <span class=glyph></span> <tr id=entity-rightsquigarrow><td> <code>rightsquigarrow;</code> <td> U+0219D <td> <span class=glyph></span> <tr id=entity-RightTee><td> <code>RightTee;</code> <td> U+022A2 <td> <span class=glyph></span> <tr id=entity-RightTeeArrow><td> <code>RightTeeArrow;</code> <td> U+021A6 <td> <span class=glyph></span> <tr id=entity-RightTeeVector><td> <code>RightTeeVector;</code> <td> U+0295B <td> <span class=glyph></span> <tr id=entity-rightthreetimes><td> <code>rightthreetimes;</code> <td> U+022CC <td> <span class=glyph></span> <tr id=entity-RightTriangle><td> <code>RightTriangle;</code> <td> U+022B3 <td> <span class=glyph></span> <tr id=entity-RightTriangleBar><td> <code>RightTriangleBar;</code> <td> U+029D0 <td> <span class=glyph></span> <tr id=entity-RightTriangleEqual><td> <code>RightTriangleEqual;</code> <td> U+022B5 <td> <span class=glyph></span> <tr id=entity-RightUpDownVector><td> <code>RightUpDownVector;</code> <td> U+0294F <td> <span class=glyph></span> <tr id=entity-RightUpTeeVector><td> <code>RightUpTeeVector;</code> <td> U+0295C <td> <span class=glyph></span> <tr id=entity-RightUpVector><td> <code>RightUpVector;</code> <td> U+021BE <td> <span class=glyph></span> <tr id=entity-RightUpVectorBar><td> <code>RightUpVectorBar;</code> <td> U+02954 <td> <span class=glyph></span> <tr id=entity-RightVector><td> <code>RightVector;</code> <td> U+021C0 <td> <span class=glyph></span> <tr id=entity-RightVectorBar><td> <code>RightVectorBar;</code> <td> U+02953 <td> <span class=glyph></span> <tr id=entity-ring><td> <code>ring;</code> <td> U+002DA <td> <span class=glyph></span> <tr id=entity-risingdotseq><td> <code>risingdotseq;</code> <td> U+02253 <td> <span class=glyph></span> <tr id=entity-rlarr><td> <code>rlarr;</code> <td> U+021C4 <td> <span class=glyph></span> <tr id=entity-rlhar><td> <code>rlhar;</code> <td> U+021CC <td> <span class=glyph></span> <tr id=entity-rlm><td> <code>rlm;</code> <td> U+0200F <td> <span class=glyph></span> <tr id=entity-rmoust><td> <code>rmoust;</code> <td> U+023B1 <td> <span class=glyph></span> <tr id=entity-rmoustache><td> <code>rmoustache;</code> <td> U+023B1 <td> <span class=glyph></span> <tr id=entity-rnmid><td> <code>rnmid;</code> <td> U+02AEE <td> <span class=glyph></span> <tr id=entity-roang><td> <code>roang;</code> <td> U+027ED <td> <span class=glyph></span> <tr id=entity-roarr><td> <code>roarr;</code> <td> U+021FE <td> <span class=glyph></span> <tr id=entity-robrk><td> <code>robrk;</code> <td> U+027E7 <td> <span class=glyph></span> <tr id=entity-ropar><td> <code>ropar;</code> <td> U+02986 <td> <span class=glyph></span> <tr id=entity-Ropf><td> <code>Ropf;</code> <td> U+0211D <td> <span class=glyph></span> <tr id=entity-ropf><td> <code>ropf;</code> <td> U+1D563 <td> <span class=glyph></span> <tr id=entity-roplus><td> <code>roplus;</code> <td> U+02A2E <td> <span class=glyph></span> <tr id=entity-rotimes><td> <code>rotimes;</code> <td> U+02A35 <td> <span class=glyph></span> <tr id=entity-RoundImplies><td> <code>RoundImplies;</code> <td> U+02970 <td> <span class=glyph></span> <tr id=entity-rpar><td> <code>rpar;</code> <td> U+00029 <td> <span class=glyph>)</span> <tr id=entity-rpargt><td> <code>rpargt;</code> <td> U+02994 <td> <span class=glyph></span> <tr id=entity-rppolint><td> <code>rppolint;</code> <td> U+02A12 <td> <span class=glyph></span> <tr id=entity-rrarr><td> <code>rrarr;</code> <td> U+021C9 <td> <span class=glyph></span> <tr id=entity-Rrightarrow><td> <code>Rrightarrow;</code> <td> U+021DB <td> <span class=glyph></span> <tr id=entity-rsaquo><td> <code>rsaquo;</code> <td> U+0203A <td> <span class=glyph></span> <tr id=entity-Rscr><td> <code>Rscr;</code> <td> U+0211B <td> <span class=glyph></span> <tr id=entity-rscr><td> <code>rscr;</code> <td> U+1D4C7 <td> <span class=glyph></span> <tr id=entity-Rsh><td> <code>Rsh;</code> <td> U+021B1 <td> <span class=glyph></span> <tr id=entity-rsh><td> <code>rsh;</code> <td> U+021B1 <td> <span class=glyph></span> <tr id=entity-rsqb><td> <code>rsqb;</code> <td> U+0005D <td> <span class=glyph>]</span> <tr id=entity-rsquo><td> <code>rsquo;</code> <td> U+02019 <td> <span class=glyph></span> <tr id=entity-rsquor><td> <code>rsquor;</code> <td> U+02019 <td> <span class=glyph></span> <tr id=entity-rthree><td> <code>rthree;</code> <td> U+022CC <td> <span class=glyph></span> <tr id=entity-rtimes><td> <code>rtimes;</code> <td> U+022CA <td> <span class=glyph></span> <tr id=entity-rtri><td> <code>rtri;</code> <td> U+025B9 <td> <span class=glyph></span> <tr id=entity-rtrie><td> <code>rtrie;</code> <td> U+022B5 <td> <span class=glyph></span> <tr id=entity-rtrif><td> <code>rtrif;</code> <td> U+025B8 <td> <span class=glyph></span> <tr id=entity-rtriltri><td> <code>rtriltri;</code> <td> U+029CE <td> <span class=glyph></span> <tr id=entity-RuleDelayed><td> <code>RuleDelayed;</code> <td> U+029F4 <td> <span class=glyph></span> <tr id=entity-ruluhar><td> <code>ruluhar;</code> <td> U+02968 <td> <span class=glyph></span> <tr id=entity-rx><td> <code>rx;</code> <td> U+0211E <td> <span class=glyph></span> <tr id=entity-Sacute><td> <code>Sacute;</code> <td> U+0015A <td> <span class=glyph></span> <tr id=entity-sacute><td> <code>sacute;</code> <td> U+0015B <td> <span class=glyph></span> <tr id=entity-sbquo><td> <code>sbquo;</code> <td> U+0201A <td> <span class=glyph></span> <tr id=entity-Sc><td> <code>Sc;</code> <td> U+02ABC <td> <span class=glyph></span> <tr id=entity-sc><td> <code>sc;</code> <td> U+0227B <td> <span class=glyph></span> <tr id=entity-scap><td> <code>scap;</code> <td> U+02AB8 <td> <span class=glyph></span> <tr id=entity-Scaron><td> <code>Scaron;</code> <td> U+00160 <td> <span class=glyph></span> <tr id=entity-scaron><td> <code>scaron;</code> <td> U+00161 <td> <span class=glyph></span> <tr id=entity-sccue><td> <code>sccue;</code> <td> U+0227D <td> <span class=glyph></span> <tr id=entity-scE><td> <code>scE;</code> <td> U+02AB4 <td> <span class=glyph></span> <tr id=entity-sce><td> <code>sce;</code> <td> U+02AB0 <td> <span class=glyph></span> <tr id=entity-Scedil><td> <code>Scedil;</code> <td> U+0015E <td> <span class=glyph></span> <tr id=entity-scedil><td> <code>scedil;</code> <td> U+0015F <td> <span class=glyph></span> <tr id=entity-Scirc><td> <code>Scirc;</code> <td> U+0015C <td> <span class=glyph></span> <tr id=entity-scirc><td> <code>scirc;</code> <td> U+0015D <td> <span class=glyph></span> <tr id=entity-scnap><td> <code>scnap;</code> <td> U+02ABA <td> <span class=glyph></span> <tr id=entity-scnE><td> <code>scnE;</code> <td> U+02AB6 <td> <span class=glyph></span> <tr id=entity-scnsim><td> <code>scnsim;</code> <td> U+022E9 <td> <span class=glyph></span> <tr id=entity-scpolint><td> <code>scpolint;</code> <td> U+02A13 <td> <span class=glyph></span> <tr id=entity-scsim><td> <code>scsim;</code> <td> U+0227F <td> <span class=glyph></span> <tr id=entity-Scy><td> <code>Scy;</code> <td> U+00421 <td> <span class=glyph></span> <tr id=entity-scy><td> <code>scy;</code> <td> U+00441 <td> <span class=glyph></span> <tr id=entity-sdot><td> <code>sdot;</code> <td> U+022C5 <td> <span class=glyph></span> <tr id=entity-sdotb><td> <code>sdotb;</code> <td> U+022A1 <td> <span class=glyph></span> <tr id=entity-sdote><td> <code>sdote;</code> <td> U+02A66 <td> <span class=glyph></span> <tr id=entity-searhk><td> <code>searhk;</code> <td> U+02925 <td> <span class=glyph></span> <tr id=entity-seArr><td> <code>seArr;</code> <td> U+021D8 <td> <span class=glyph></span> <tr id=entity-searr><td> <code>searr;</code> <td> U+02198 <td> <span class=glyph></span> <tr id=entity-searrow><td> <code>searrow;</code> <td> U+02198 <td> <span class=glyph></span> <tr id=entity-sect><td> <code>sect;</code> <td> U+000A7 <td> <span class=glyph></span> <tr id=entity-sect-legacy class=impl><td> <code>sect</code> <td> U+000A7 <td> <span></span> <tr id=entity-semi><td> <code>semi;</code> <td> U+0003B <td> <span class=glyph>;</span> <tr id=entity-seswar><td> <code>seswar;</code> <td> U+02929 <td> <span class=glyph></span> <tr id=entity-setminus><td> <code>setminus;</code> <td> U+02216 <td> <span class=glyph></span> <tr id=entity-setmn><td> <code>setmn;</code> <td> U+02216 <td> <span class=glyph></span> <tr id=entity-sext><td> <code>sext;</code> <td> U+02736 <td> <span class=glyph></span> <tr id=entity-Sfr><td> <code>Sfr;</code> <td> U+1D516 <td> <span class=glyph></span> <tr id=entity-sfr><td> <code>sfr;</code> <td> U+1D530 <td> <span class=glyph></span> <tr id=entity-sfrown><td> <code>sfrown;</code> <td> U+02322 <td> <span class=glyph></span> <tr id=entity-sharp><td> <code>sharp;</code> <td> U+0266F <td> <span class=glyph></span> <tr id=entity-SHCHcy><td> <code>SHCHcy;</code> <td> U+00429 <td> <span class=glyph></span> <tr id=entity-shchcy><td> <code>shchcy;</code> <td> U+00449 <td> <span class=glyph></span> <tr id=entity-SHcy><td> <code>SHcy;</code> <td> U+00428 <td> <span class=glyph></span> <tr id=entity-shcy><td> <code>shcy;</code> <td> U+00448 <td> <span class=glyph></span> <tr id=entity-ShortDownArrow><td> <code>ShortDownArrow;</code> <td> U+02193 <td> <span class=glyph></span> <tr id=entity-ShortLeftArrow><td> <code>ShortLeftArrow;</code> <td> U+02190 <td> <span class=glyph></span> <tr id=entity-shortmid><td> <code>shortmid;</code> <td> U+02223 <td> <span class=glyph></span> <tr id=entity-shortparallel><td> <code>shortparallel;</code> <td> U+02225 <td> <span class=glyph></span> <tr id=entity-ShortRightArrow><td> <code>ShortRightArrow;</code> <td> U+02192 <td> <span class=glyph></span> <tr id=entity-ShortUpArrow><td> <code>ShortUpArrow;</code> <td> U+02191 <td> <span class=glyph></span> <tr id=entity-shy><td> <code>shy;</code> <td> U+000AD <td> <span class=glyph></span> <tr id=entity-shy-legacy class=impl><td> <code>shy</code> <td> U+000AD <td> <span></span> <tr id=entity-Sigma><td> <code>Sigma;</code> <td> U+003A3 <td> <span class=glyph></span> <tr id=entity-sigma><td> <code>sigma;</code> <td> U+003C3 <td> <span class=glyph></span> <tr id=entity-sigmaf><td> <code>sigmaf;</code> <td> U+003C2 <td> <span class=glyph></span> <tr id=entity-sigmav><td> <code>sigmav;</code> <td> U+003C2 <td> <span class=glyph></span> <tr id=entity-sim><td> <code>sim;</code> <td> U+0223C <td> <span class=glyph></span> <tr id=entity-simdot><td> <code>simdot;</code> <td> U+02A6A <td> <span class=glyph></span> <tr id=entity-sime><td> <code>sime;</code> <td> U+02243 <td> <span class=glyph></span> <tr id=entity-simeq><td> <code>simeq;</code> <td> U+02243 <td> <span class=glyph></span> <tr id=entity-simg><td> <code>simg;</code> <td> U+02A9E <td> <span class=glyph></span> <tr id=entity-simgE><td> <code>simgE;</code> <td> U+02AA0 <td> <span class=glyph></span> <tr id=entity-siml><td> <code>siml;</code> <td> U+02A9D <td> <span class=glyph></span> <tr id=entity-simlE><td> <code>simlE;</code> <td> U+02A9F <td> <span class=glyph></span> <tr id=entity-simne><td> <code>simne;</code> <td> U+02246 <td> <span class=glyph></span> <tr id=entity-simplus><td> <code>simplus;</code> <td> U+02A24 <td> <span class=glyph></span> <tr id=entity-simrarr><td> <code>simrarr;</code> <td> U+02972 <td> <span class=glyph></span> <tr id=entity-slarr><td> <code>slarr;</code> <td> U+02190 <td> <span class=glyph></span> <tr id=entity-SmallCircle><td> <code>SmallCircle;</code> <td> U+02218 <td> <span class=glyph></span> <tr id=entity-smallsetminus><td> <code>smallsetminus;</code> <td> U+02216 <td> <span class=glyph></span> <tr id=entity-smashp><td> <code>smashp;</code> <td> U+02A33 <td> <span class=glyph></span> <tr id=entity-smeparsl><td> <code>smeparsl;</code> <td> U+029E4 <td> <span class=glyph></span> <tr id=entity-smid><td> <code>smid;</code> <td> U+02223 <td> <span class=glyph></span> <tr id=entity-smile><td> <code>smile;</code> <td> U+02323 <td> <span class=glyph></span> <tr id=entity-smt><td> <code>smt;</code> <td> U+02AAA <td> <span class=glyph></span> <tr id=entity-smte><td> <code>smte;</code> <td> U+02AAC <td> <span class=glyph></span> <tr id=entity-smtes><td> <code>smtes;</code> <td> U+02AAC U+0FE00 <td> <span class="glyph compound"></span> <tr id=entity-SOFTcy><td> <code>SOFTcy;</code> <td> U+0042C <td> <span class=glyph></span> <tr id=entity-softcy><td> <code>softcy;</code> <td> U+0044C <td> <span class=glyph></span> <tr id=entity-sol><td> <code>sol;</code> <td> U+0002F <td> <span class=glyph>/</span> <tr id=entity-solb><td> <code>solb;</code> <td> U+029C4 <td> <span class=glyph></span> <tr id=entity-solbar><td> <code>solbar;</code> <td> U+0233F <td> <span class=glyph></span> <tr id=entity-Sopf><td> <code>Sopf;</code> <td> U+1D54A <td> <span class=glyph></span> <tr id=entity-sopf><td> <code>sopf;</code> <td> U+1D564 <td> <span class=glyph></span> <tr id=entity-spades><td> <code>spades;</code> <td> U+02660 <td> <span class=glyph></span> <tr id=entity-spadesuit><td> <code>spadesuit;</code> <td> U+02660 <td> <span class=glyph></span> <tr id=entity-spar><td> <code>spar;</code> <td> U+02225 <td> <span class=glyph></span> <tr id=entity-sqcap><td> <code>sqcap;</code> <td> U+02293 <td> <span class=glyph></span> <tr id=entity-sqcaps><td> <code>sqcaps;</code> <td> U+02293 U+0FE00 <td> <span class="glyph compound"></span> <tr id=entity-sqcup><td> <code>sqcup;</code> <td> U+02294 <td> <span class=glyph></span> <tr id=entity-sqcups><td> <code>sqcups;</code> <td> U+02294 U+0FE00 <td> <span class="glyph compound"></span> <tr id=entity-Sqrt><td> <code>Sqrt;</code> <td> U+0221A <td> <span class=glyph></span> <tr id=entity-sqsub><td> <code>sqsub;</code> <td> U+0228F <td> <span class=glyph></span> <tr id=entity-sqsube><td> <code>sqsube;</code> <td> U+02291 <td> <span class=glyph></span> <tr id=entity-sqsubset><td> <code>sqsubset;</code> <td> U+0228F <td> <span class=glyph></span> <tr id=entity-sqsubseteq><td> <code>sqsubseteq;</code> <td> U+02291 <td> <span class=glyph></span> <tr id=entity-sqsup><td> <code>sqsup;</code> <td> U+02290 <td> <span class=glyph></span> <tr id=entity-sqsupe><td> <code>sqsupe;</code> <td> U+02292 <td> <span class=glyph></span> <tr id=entity-sqsupset><td> <code>sqsupset;</code> <td> U+02290 <td> <span class=glyph></span> <tr id=entity-sqsupseteq><td> <code>sqsupseteq;</code> <td> U+02292 <td> <span class=glyph></span> <tr id=entity-squ><td> <code>squ;</code> <td> U+025A1 <td> <span class=glyph></span> <tr id=entity-Square><td> <code>Square;</code> <td> U+025A1 <td> <span class=glyph></span> <tr id=entity-square><td> <code>square;</code> <td> U+025A1 <td> <span class=glyph></span> <tr id=entity-SquareIntersection><td> <code>SquareIntersection;</code> <td> U+02293 <td> <span class=glyph></span> <tr id=entity-SquareSubset><td> <code>SquareSubset;</code> <td> U+0228F <td> <span class=glyph></span> <tr id=entity-SquareSubsetEqual><td> <code>SquareSubsetEqual;</code> <td> U+02291 <td> <span class=glyph></span> <tr id=entity-SquareSuperset><td> <code>SquareSuperset;</code> <td> U+02290 <td> <span class=glyph></span> <tr id=entity-SquareSupersetEqual><td> <code>SquareSupersetEqual;</code> <td> U+02292 <td> <span class=glyph></span> <tr id=entity-SquareUnion><td> <code>SquareUnion;</code> <td> U+02294 <td> <span class=glyph></span> <tr id=entity-squarf><td> <code>squarf;</code> <td> U+025AA <td> <span class=glyph></span> <tr id=entity-squf><td> <code>squf;</code> <td> U+025AA <td> <span class=glyph></span> <tr id=entity-srarr><td> <code>srarr;</code> <td> U+02192 <td> <span class=glyph></span> <tr id=entity-Sscr><td> <code>Sscr;</code> <td> U+1D4AE <td> <span class=glyph></span> <tr id=entity-sscr><td> <code>sscr;</code> <td> U+1D4C8 <td> <span class=glyph></span> <tr id=entity-ssetmn><td> <code>ssetmn;</code> <td> U+02216 <td> <span class=glyph></span> <tr id=entity-ssmile><td> <code>ssmile;</code> <td> U+02323 <td> <span class=glyph></span> <tr id=entity-sstarf><td> <code>sstarf;</code> <td> U+022C6 <td> <span class=glyph></span> <tr id=entity-Star><td> <code>Star;</code> <td> U+022C6 <td> <span class=glyph></span> <tr id=entity-star><td> <code>star;</code> <td> U+02606 <td> <span class=glyph></span> <tr id=entity-starf><td> <code>starf;</code> <td> U+02605 <td> <span class=glyph></span> <tr id=entity-straightepsilon><td> <code>straightepsilon;</code> <td> U+003F5 <td> <span class=glyph></span> <tr id=entity-straightphi><td> <code>straightphi;</code> <td> U+003D5 <td> <span class=glyph></span> <tr id=entity-strns><td> <code>strns;</code> <td> U+000AF <td> <span class=glyph></span> <tr id=entity-Sub><td> <code>Sub;</code> <td> U+022D0 <td> <span class=glyph></span> <tr id=entity-sub><td> <code>sub;</code> <td> U+02282 <td> <span class=glyph></span> <tr id=entity-subdot><td> <code>subdot;</code> <td> U+02ABD <td> <span class=glyph></span> <tr id=entity-subE><td> <code>subE;</code> <td> U+02AC5 <td> <span class=glyph></span> <tr id=entity-sube><td> <code>sube;</code> <td> U+02286 <td> <span class=glyph></span> <tr id=entity-subedot><td> <code>subedot;</code> <td> U+02AC3 <td> <span class=glyph></span> <tr id=entity-submult><td> <code>submult;</code> <td> U+02AC1 <td> <span class=glyph></span> <tr id=entity-subnE><td> <code>subnE;</code> <td> U+02ACB <td> <span class=glyph></span> <tr id=entity-subne><td> <code>subne;</code> <td> U+0228A <td> <span class=glyph></span> <tr id=entity-subplus><td> <code>subplus;</code> <td> U+02ABF <td> <span class=glyph></span> <tr id=entity-subrarr><td> <code>subrarr;</code> <td> U+02979 <td> <span class=glyph></span> <tr id=entity-Subset><td> <code>Subset;</code> <td> U+022D0 <td> <span class=glyph></span> <tr id=entity-subset><td> <code>subset;</code> <td> U+02282 <td> <span class=glyph></span> <tr id=entity-subseteq><td> <code>subseteq;</code> <td> U+02286 <td> <span class=glyph></span> <tr id=entity-subseteqq><td> <code>subseteqq;</code> <td> U+02AC5 <td> <span class=glyph></span> <tr id=entity-SubsetEqual><td> <code>SubsetEqual;</code> <td> U+02286 <td> <span class=glyph></span> <tr id=entity-subsetneq><td> <code>subsetneq;</code> <td> U+0228A <td> <span class=glyph></span> <tr id=entity-subsetneqq><td> <code>subsetneqq;</code> <td> U+02ACB <td> <span class=glyph></span> <tr id=entity-subsim><td> <code>subsim;</code> <td> U+02AC7 <td> <span class=glyph></span> <tr id=entity-subsub><td> <code>subsub;</code> <td> U+02AD5 <td> <span class=glyph></span> <tr id=entity-subsup><td> <code>subsup;</code> <td> U+02AD3 <td> <span class=glyph></span> <tr id=entity-succ><td> <code>succ;</code> <td> U+0227B <td> <span class=glyph></span> <tr id=entity-succapprox><td> <code>succapprox;</code> <td> U+02AB8 <td> <span class=glyph></span> <tr id=entity-succcurlyeq><td> <code>succcurlyeq;</code> <td> U+0227D <td> <span class=glyph></span> <tr id=entity-Succeeds><td> <code>Succeeds;</code> <td> U+0227B <td> <span class=glyph></span> <tr id=entity-SucceedsEqual><td> <code>SucceedsEqual;</code> <td> U+02AB0 <td> <span class=glyph></span> <tr id=entity-SucceedsSlantEqual><td> <code>SucceedsSlantEqual;</code> <td> U+0227D <td> <span class=glyph></span> <tr id=entity-SucceedsTilde><td> <code>SucceedsTilde;</code> <td> U+0227F <td> <span class=glyph></span> <tr id=entity-succeq><td> <code>succeq;</code> <td> U+02AB0 <td> <span class=glyph></span> <tr id=entity-succnapprox><td> <code>succnapprox;</code> <td> U+02ABA <td> <span class=glyph></span> <tr id=entity-succneqq><td> <code>succneqq;</code> <td> U+02AB6 <td> <span class=glyph></span> <tr id=entity-succnsim><td> <code>succnsim;</code> <td> U+022E9 <td> <span class=glyph></span> <tr id=entity-succsim><td> <code>succsim;</code> <td> U+0227F <td> <span class=glyph></span> <tr id=entity-SuchThat><td> <code>SuchThat;</code> <td> U+0220B <td> <span class=glyph></span> <tr id=entity-Sum><td> <code>Sum;</code> <td> U+02211 <td> <span class=glyph></span> <tr id=entity-sum><td> <code>sum;</code> <td> U+02211 <td> <span class=glyph></span> <tr id=entity-sung><td> <code>sung;</code> <td> U+0266A <td> <span class=glyph></span> <tr id=entity-Sup><td> <code>Sup;</code> <td> U+022D1 <td> <span class=glyph></span> <tr id=entity-sup><td> <code>sup;</code> <td> U+02283 <td> <span class=glyph></span> <tr id=entity-sup1><td> <code>sup1;</code> <td> U+000B9 <td> <span class=glyph></span> <tr id=entity-sup1-legacy class=impl><td> <code>sup1</code> <td> U+000B9 <td> <span></span> <tr id=entity-sup2><td> <code>sup2;</code> <td> U+000B2 <td> <span class=glyph></span> <tr id=entity-sup2-legacy class=impl><td> <code>sup2</code> <td> U+000B2 <td> <span></span> <tr id=entity-sup3><td> <code>sup3;</code> <td> U+000B3 <td> <span class=glyph></span> <tr id=entity-sup3-legacy class=impl><td> <code>sup3</code> <td> U+000B3 <td> <span></span> <tr id=entity-supdot><td> <code>supdot;</code> <td> U+02ABE <td> <span class=glyph></span> <tr id=entity-supdsub><td> <code>supdsub;</code> <td> U+02AD8 <td> <span class=glyph></span> <tr id=entity-supE><td> <code>supE;</code> <td> U+02AC6 <td> <span class=glyph></span> <tr id=entity-supe><td> <code>supe;</code> <td> U+02287 <td> <span class=glyph></span> <tr id=entity-supedot><td> <code>supedot;</code> <td> U+02AC4 <td> <span class=glyph></span> <tr id=entity-Superset><td> <code>Superset;</code> <td> U+02283 <td> <span class=glyph></span> <tr id=entity-SupersetEqual><td> <code>SupersetEqual;</code> <td> U+02287 <td> <span class=glyph></span> <tr id=entity-suphsol><td> <code>suphsol;</code> <td> U+027C9 <td> <span class=glyph></span> <tr id=entity-suphsub><td> <code>suphsub;</code> <td> U+02AD7 <td> <span class=glyph></span> <tr id=entity-suplarr><td> <code>suplarr;</code> <td> U+0297B <td> <span class=glyph></span> <tr id=entity-supmult><td> <code>supmult;</code> <td> U+02AC2 <td> <span class=glyph></span> <tr id=entity-supnE><td> <code>supnE;</code> <td> U+02ACC <td> <span class=glyph></span> <tr id=entity-supne><td> <code>supne;</code> <td> U+0228B <td> <span class=glyph></span> <tr id=entity-supplus><td> <code>supplus;</code> <td> U+02AC0 <td> <span class=glyph></span> <tr id=entity-Supset><td> <code>Supset;</code> <td> U+022D1 <td> <span class=glyph></span> <tr id=entity-supset><td> <code>supset;</code> <td> U+02283 <td> <span class=glyph></span> <tr id=entity-supseteq><td> <code>supseteq;</code> <td> U+02287 <td> <span class=glyph></span> <tr id=entity-supseteqq><td> <code>supseteqq;</code> <td> U+02AC6 <td> <span class=glyph></span> <tr id=entity-supsetneq><td> <code>supsetneq;</code> <td> U+0228B <td> <span class=glyph></span> <tr id=entity-supsetneqq><td> <code>supsetneqq;</code> <td> U+02ACC <td> <span class=glyph></span> <tr id=entity-supsim><td> <code>supsim;</code> <td> U+02AC8 <td> <span class=glyph></span> <tr id=entity-supsub><td> <code>supsub;</code> <td> U+02AD4 <td> <span class=glyph></span> <tr id=entity-supsup><td> <code>supsup;</code> <td> U+02AD6 <td> <span class=glyph></span> <tr id=entity-swarhk><td> <code>swarhk;</code> <td> U+02926 <td> <span class=glyph></span> <tr id=entity-swArr><td> <code>swArr;</code> <td> U+021D9 <td> <span class=glyph></span> <tr id=entity-swarr><td> <code>swarr;</code> <td> U+02199 <td> <span class=glyph></span> <tr id=entity-swarrow><td> <code>swarrow;</code> <td> U+02199 <td> <span class=glyph></span> <tr id=entity-swnwar><td> <code>swnwar;</code> <td> U+0292A <td> <span class=glyph></span> <tr id=entity-szlig><td> <code>szlig;</code> <td> U+000DF <td> <span class=glyph></span> <tr id=entity-szlig-legacy class=impl><td> <code>szlig</code> <td> U+000DF <td> <span></span> <tr id=entity-Tab><td> <code>Tab;</code> <td> U+00009 <td> <span class="glyph control"></span> <tr id=entity-target><td> <code>target;</code> <td> U+02316 <td> <span class=glyph></span> <tr id=entity-Tau><td> <code>Tau;</code> <td> U+003A4 <td> <span class=glyph></span> <tr id=entity-tau><td> <code>tau;</code> <td> U+003C4 <td> <span class=glyph></span> <tr id=entity-tbrk><td> <code>tbrk;</code> <td> U+023B4 <td> <span class=glyph></span> <tr id=entity-Tcaron><td> <code>Tcaron;</code> <td> U+00164 <td> <span class=glyph></span> <tr id=entity-tcaron><td> <code>tcaron;</code> <td> U+00165 <td> <span class=glyph></span> <tr id=entity-Tcedil><td> <code>Tcedil;</code> <td> U+00162 <td> <span class=glyph></span> <tr id=entity-tcedil><td> <code>tcedil;</code> <td> U+00163 <td> <span class=glyph></span> <tr id=entity-Tcy><td> <code>Tcy;</code> <td> U+00422 <td> <span class=glyph></span> <tr id=entity-tcy><td> <code>tcy;</code> <td> U+00442 <td> <span class=glyph></span> <tr id=entity-tdot><td> <code>tdot;</code> <td> U+020DB <td> <span class="glyph composition"></span> <tr id=entity-telrec><td> <code>telrec;</code> <td> U+02315 <td> <span class=glyph></span> <tr id=entity-Tfr><td> <code>Tfr;</code> <td> U+1D517 <td> <span class=glyph></span> <tr id=entity-tfr><td> <code>tfr;</code> <td> U+1D531 <td> <span class=glyph></span> <tr id=entity-there4><td> <code>there4;</code> <td> U+02234 <td> <span class=glyph></span> <tr id=entity-Therefore><td> <code>Therefore;</code> <td> U+02234 <td> <span class=glyph></span> <tr id=entity-therefore><td> <code>therefore;</code> <td> U+02234 <td> <span class=glyph></span> <tr id=entity-Theta><td> <code>Theta;</code> <td> U+00398 <td> <span class=glyph></span> <tr id=entity-theta><td> <code>theta;</code> <td> U+003B8 <td> <span class=glyph></span> <tr id=entity-thetasym><td> <code>thetasym;</code> <td> U+003D1 <td> <span class=glyph></span> <tr id=entity-thetav><td> <code>thetav;</code> <td> U+003D1 <td> <span class=glyph></span> <tr id=entity-thickapprox><td> <code>thickapprox;</code> <td> U+02248 <td> <span class=glyph></span> <tr id=entity-thicksim><td> <code>thicksim;</code> <td> U+0223C <td> <span class=glyph></span> <tr id=entity-ThickSpace><td> <code>ThickSpace;</code> <td> U+0205F U+0200A <td> <span class="glyph compound"></span> <tr id=entity-thinsp><td> <code>thinsp;</code> <td> U+02009 <td> <span class=glyph></span> <tr id=entity-ThinSpace><td> <code>ThinSpace;</code> <td> U+02009 <td> <span class=glyph></span> <tr id=entity-thkap><td> <code>thkap;</code> <td> U+02248 <td> <span class=glyph></span> <tr id=entity-thksim><td> <code>thksim;</code> <td> U+0223C <td> <span class=glyph></span> <tr id=entity-THORN><td> <code>THORN;</code> <td> U+000DE <td> <span class=glyph></span> <tr id=entity-THORN-legacy class=impl><td> <code>THORN</code> <td> U+000DE <td> <span></span> <tr id=entity-thorn><td> <code>thorn;</code> <td> U+000FE <td> <span class=glyph></span> <tr id=entity-thorn-legacy class=impl><td> <code>thorn</code> <td> U+000FE <td> <span></span> <tr id=entity-Tilde><td> <code>Tilde;</code> <td> U+0223C <td> <span class=glyph></span> <tr id=entity-tilde><td> <code>tilde;</code> <td> U+002DC <td> <span class=glyph></span> <tr id=entity-TildeEqual><td> <code>TildeEqual;</code> <td> U+02243 <td> <span class=glyph></span> <tr id=entity-TildeFullEqual><td> <code>TildeFullEqual;</code> <td> U+02245 <td> <span class=glyph></span> <tr id=entity-TildeTilde><td> <code>TildeTilde;</code> <td> U+02248 <td> <span class=glyph></span> <tr id=entity-times><td> <code>times;</code> <td> U+000D7 <td> <span class=glyph></span> <tr id=entity-times-legacy class=impl><td> <code>times</code> <td> U+000D7 <td> <span></span> <tr id=entity-timesb><td> <code>timesb;</code> <td> U+022A0 <td> <span class=glyph></span> <tr id=entity-timesbar><td> <code>timesbar;</code> <td> U+02A31 <td> <span class=glyph></span> <tr id=entity-timesd><td> <code>timesd;</code> <td> U+02A30 <td> <span class=glyph></span> <tr id=entity-tint><td> <code>tint;</code> <td> U+0222D <td> <span class=glyph></span> <tr id=entity-toea><td> <code>toea;</code> <td> U+02928 <td> <span class=glyph></span> <tr id=entity-top><td> <code>top;</code> <td> U+022A4 <td> <span class=glyph></span> <tr id=entity-topbot><td> <code>topbot;</code> <td> U+02336 <td> <span class=glyph></span> <tr id=entity-topcir><td> <code>topcir;</code> <td> U+02AF1 <td> <span class=glyph></span> <tr id=entity-Topf><td> <code>Topf;</code> <td> U+1D54B <td> <span class=glyph></span> <tr id=entity-topf><td> <code>topf;</code> <td> U+1D565 <td> <span class=glyph></span> <tr id=entity-topfork><td> <code>topfork;</code> <td> U+02ADA <td> <span class=glyph></span> <tr id=entity-tosa><td> <code>tosa;</code> <td> U+02929 <td> <span class=glyph></span> <tr id=entity-tprime><td> <code>tprime;</code> <td> U+02034 <td> <span class=glyph></span> <tr id=entity-TRADE><td> <code>TRADE;</code> <td> U+02122 <td> <span class=glyph></span> <tr id=entity-trade><td> <code>trade;</code> <td> U+02122 <td> <span class=glyph></span> <tr id=entity-triangle><td> <code>triangle;</code> <td> U+025B5 <td> <span class=glyph></span> <tr id=entity-triangledown><td> <code>triangledown;</code> <td> U+025BF <td> <span class=glyph></span> <tr id=entity-triangleleft><td> <code>triangleleft;</code> <td> U+025C3 <td> <span class=glyph></span> <tr id=entity-trianglelefteq><td> <code>trianglelefteq;</code> <td> U+022B4 <td> <span class=glyph></span> <tr id=entity-triangleq><td> <code>triangleq;</code> <td> U+0225C <td> <span class=glyph></span> <tr id=entity-triangleright><td> <code>triangleright;</code> <td> U+025B9 <td> <span class=glyph></span> <tr id=entity-trianglerighteq><td> <code>trianglerighteq;</code> <td> U+022B5 <td> <span class=glyph></span> <tr id=entity-tridot><td> <code>tridot;</code> <td> U+025EC <td> <span class=glyph></span> <tr id=entity-trie><td> <code>trie;</code> <td> U+0225C <td> <span class=glyph></span> <tr id=entity-triminus><td> <code>triminus;</code> <td> U+02A3A <td> <span class=glyph></span> <tr id=entity-TripleDot><td> <code>TripleDot;</code> <td> U+020DB <td> <span class="glyph composition"></span> <tr id=entity-triplus><td> <code>triplus;</code> <td> U+02A39 <td> <span class=glyph></span> <tr id=entity-trisb><td> <code>trisb;</code> <td> U+029CD <td> <span class=glyph></span> <tr id=entity-tritime><td> <code>tritime;</code> <td> U+02A3B <td> <span class=glyph></span> <tr id=entity-trpezium><td> <code>trpezium;</code> <td> U+023E2 <td> <span class=glyph></span> <tr id=entity-Tscr><td> <code>Tscr;</code> <td> U+1D4AF <td> <span class=glyph></span> <tr id=entity-tscr><td> <code>tscr;</code> <td> U+1D4C9 <td> <span class=glyph></span> <tr id=entity-TScy><td> <code>TScy;</code> <td> U+00426 <td> <span class=glyph></span> <tr id=entity-tscy><td> <code>tscy;</code> <td> U+00446 <td> <span class=glyph></span> <tr id=entity-TSHcy><td> <code>TSHcy;</code> <td> U+0040B <td> <span class=glyph></span> <tr id=entity-tshcy><td> <code>tshcy;</code> <td> U+0045B <td> <span class=glyph></span> <tr id=entity-Tstrok><td> <code>Tstrok;</code> <td> U+00166 <td> <span class=glyph></span> <tr id=entity-tstrok><td> <code>tstrok;</code> <td> U+00167 <td> <span class=glyph></span> <tr id=entity-twixt><td> <code>twixt;</code> <td> U+0226C <td> <span class=glyph></span> <tr id=entity-twoheadleftarrow><td> <code>twoheadleftarrow;</code> <td> U+0219E <td> <span class=glyph></span> <tr id=entity-twoheadrightarrow><td> <code>twoheadrightarrow;</code> <td> U+021A0 <td> <span class=glyph></span> <tr id=entity-Uacute><td> <code>Uacute;</code> <td> U+000DA <td> <span class=glyph></span> <tr id=entity-Uacute-legacy class=impl><td> <code>Uacute</code> <td> U+000DA <td> <span></span> <tr id=entity-uacute><td> <code>uacute;</code> <td> U+000FA <td> <span class=glyph></span> <tr id=entity-uacute-legacy class=impl><td> <code>uacute</code> <td> U+000FA <td> <span></span> <tr id=entity-Uarr><td> <code>Uarr;</code> <td> U+0219F <td> <span class=glyph></span> <tr id=entity-uArr><td> <code>uArr;</code> <td> U+021D1 <td> <span class=glyph></span> <tr id=entity-uarr><td> <code>uarr;</code> <td> U+02191 <td> <span class=glyph></span> <tr id=entity-Uarrocir><td> <code>Uarrocir;</code> <td> U+02949 <td> <span class=glyph></span> <tr id=entity-Ubrcy><td> <code>Ubrcy;</code> <td> U+0040E <td> <span class=glyph></span> <tr id=entity-ubrcy><td> <code>ubrcy;</code> <td> U+0045E <td> <span class=glyph></span> <tr id=entity-Ubreve><td> <code>Ubreve;</code> <td> U+0016C <td> <span class=glyph></span> <tr id=entity-ubreve><td> <code>ubreve;</code> <td> U+0016D <td> <span class=glyph></span> <tr id=entity-Ucirc><td> <code>Ucirc;</code> <td> U+000DB <td> <span class=glyph></span> <tr id=entity-Ucirc-legacy class=impl><td> <code>Ucirc</code> <td> U+000DB <td> <span></span> <tr id=entity-ucirc><td> <code>ucirc;</code> <td> U+000FB <td> <span class=glyph></span> <tr id=entity-ucirc-legacy class=impl><td> <code>ucirc</code> <td> U+000FB <td> <span></span> <tr id=entity-Ucy><td> <code>Ucy;</code> <td> U+00423 <td> <span class=glyph></span> <tr id=entity-ucy><td> <code>ucy;</code> <td> U+00443 <td> <span class=glyph></span> <tr id=entity-udarr><td> <code>udarr;</code> <td> U+021C5 <td> <span class=glyph></span> <tr id=entity-Udblac><td> <code>Udblac;</code> <td> U+00170 <td> <span class=glyph></span> <tr id=entity-udblac><td> <code>udblac;</code> <td> U+00171 <td> <span class=glyph></span> <tr id=entity-udhar><td> <code>udhar;</code> <td> U+0296E <td> <span class=glyph></span> <tr id=entity-ufisht><td> <code>ufisht;</code> <td> U+0297E <td> <span class=glyph></span> <tr id=entity-Ufr><td> <code>Ufr;</code> <td> U+1D518 <td> <span class=glyph></span> <tr id=entity-ufr><td> <code>ufr;</code> <td> U+1D532 <td> <span class=glyph></span> <tr id=entity-Ugrave><td> <code>Ugrave;</code> <td> U+000D9 <td> <span class=glyph></span> <tr id=entity-Ugrave-legacy class=impl><td> <code>Ugrave</code> <td> U+000D9 <td> <span></span> <tr id=entity-ugrave><td> <code>ugrave;</code> <td> U+000F9 <td> <span class=glyph></span> <tr id=entity-ugrave-legacy class=impl><td> <code>ugrave</code> <td> U+000F9 <td> <span></span> <tr id=entity-uHar><td> <code>uHar;</code> <td> U+02963 <td> <span class=glyph></span> <tr id=entity-uharl><td> <code>uharl;</code> <td> U+021BF <td> <span class=glyph></span> <tr id=entity-uharr><td> <code>uharr;</code> <td> U+021BE <td> <span class=glyph></span> <tr id=entity-uhblk><td> <code>uhblk;</code> <td> U+02580 <td> <span class=glyph></span> <tr id=entity-ulcorn><td> <code>ulcorn;</code> <td> U+0231C <td> <span class=glyph></span> <tr id=entity-ulcorner><td> <code>ulcorner;</code> <td> U+0231C <td> <span class=glyph></span> <tr id=entity-ulcrop><td> <code>ulcrop;</code> <td> U+0230F <td> <span class=glyph></span> <tr id=entity-ultri><td> <code>ultri;</code> <td> U+025F8 <td> <span class=glyph></span> <tr id=entity-Umacr><td> <code>Umacr;</code> <td> U+0016A <td> <span class=glyph></span> <tr id=entity-umacr><td> <code>umacr;</code> <td> U+0016B <td> <span class=glyph></span> <tr id=entity-uml><td> <code>uml;</code> <td> U+000A8 <td> <span class=glyph></span> <tr id=entity-uml-legacy class=impl><td> <code>uml</code> <td> U+000A8 <td> <span></span> <tr id=entity-UnderBar><td> <code>UnderBar;</code> <td> U+0005F <td> <span class=glyph>_</span> <tr id=entity-UnderBrace><td> <code>UnderBrace;</code> <td> U+023DF <td> <span class=glyph></span> <tr id=entity-UnderBracket><td> <code>UnderBracket;</code> <td> U+023B5 <td> <span class=glyph></span> <tr id=entity-UnderParenthesis><td> <code>UnderParenthesis;</code> <td> U+023DD <td> <span class=glyph></span> <tr id=entity-Union><td> <code>Union;</code> <td> U+022C3 <td> <span class=glyph></span> <tr id=entity-UnionPlus><td> <code>UnionPlus;</code> <td> U+0228E <td> <span class=glyph></span> <tr id=entity-Uogon><td> <code>Uogon;</code> <td> U+00172 <td> <span class=glyph></span> <tr id=entity-uogon><td> <code>uogon;</code> <td> U+00173 <td> <span class=glyph></span> <tr id=entity-Uopf><td> <code>Uopf;</code> <td> U+1D54C <td> <span class=glyph></span> <tr id=entity-uopf><td> <code>uopf;</code> <td> U+1D566 <td> <span class=glyph></span> <tr id=entity-UpArrow><td> <code>UpArrow;</code> <td> U+02191 <td> <span class=glyph></span> <tr id=entity-Uparrow><td> <code>Uparrow;</code> <td> U+021D1 <td> <span class=glyph></span> <tr id=entity-uparrow><td> <code>uparrow;</code> <td> U+02191 <td> <span class=glyph></span> <tr id=entity-UpArrowBar><td> <code>UpArrowBar;</code> <td> U+02912 <td> <span class=glyph></span> <tr id=entity-UpArrowDownArrow><td> <code>UpArrowDownArrow;</code> <td> U+021C5 <td> <span class=glyph></span> <tr id=entity-UpDownArrow><td> <code>UpDownArrow;</code> <td> U+02195 <td> <span class=glyph></span> <tr id=entity-Updownarrow><td> <code>Updownarrow;</code> <td> U+021D5 <td> <span class=glyph></span> <tr id=entity-updownarrow><td> <code>updownarrow;</code> <td> U+02195 <td> <span class=glyph></span> <tr id=entity-UpEquilibrium><td> <code>UpEquilibrium;</code> <td> U+0296E <td> <span class=glyph></span> <tr id=entity-upharpoonleft><td> <code>upharpoonleft;</code> <td> U+021BF <td> <span class=glyph></span> <tr id=entity-upharpoonright><td> <code>upharpoonright;</code> <td> U+021BE <td> <span class=glyph></span> <tr id=entity-uplus><td> <code>uplus;</code> <td> U+0228E <td> <span class=glyph></span> <tr id=entity-UpperLeftArrow><td> <code>UpperLeftArrow;</code> <td> U+02196 <td> <span class=glyph></span> <tr id=entity-UpperRightArrow><td> <code>UpperRightArrow;</code> <td> U+02197 <td> <span class=glyph></span> <tr id=entity-Upsi><td> <code>Upsi;</code> <td> U+003D2 <td> <span class=glyph></span> <tr id=entity-upsi><td> <code>upsi;</code> <td> U+003C5 <td> <span class=glyph></span> <tr id=entity-upsih><td> <code>upsih;</code> <td> U+003D2 <td> <span class=glyph></span> <tr id=entity-Upsilon><td> <code>Upsilon;</code> <td> U+003A5 <td> <span class=glyph></span> <tr id=entity-upsilon><td> <code>upsilon;</code> <td> U+003C5 <td> <span class=glyph></span> <tr id=entity-UpTee><td> <code>UpTee;</code> <td> U+022A5 <td> <span class=glyph></span> <tr id=entity-UpTeeArrow><td> <code>UpTeeArrow;</code> <td> U+021A5 <td> <span class=glyph></span> <tr id=entity-upuparrows><td> <code>upuparrows;</code> <td> U+021C8 <td> <span class=glyph></span> <tr id=entity-urcorn><td> <code>urcorn;</code> <td> U+0231D <td> <span class=glyph></span> <tr id=entity-urcorner><td> <code>urcorner;</code> <td> U+0231D <td> <span class=glyph></span> <tr id=entity-urcrop><td> <code>urcrop;</code> <td> U+0230E <td> <span class=glyph></span> <tr id=entity-Uring><td> <code>Uring;</code> <td> U+0016E <td> <span class=glyph></span> <tr id=entity-uring><td> <code>uring;</code> <td> U+0016F <td> <span class=glyph></span> <tr id=entity-urtri><td> <code>urtri;</code> <td> U+025F9 <td> <span class=glyph></span> <tr id=entity-Uscr><td> <code>Uscr;</code> <td> U+1D4B0 <td> <span class=glyph></span> <tr id=entity-uscr><td> <code>uscr;</code> <td> U+1D4CA <td> <span class=glyph></span> <tr id=entity-utdot><td> <code>utdot;</code> <td> U+022F0 <td> <span class=glyph></span> <tr id=entity-Utilde><td> <code>Utilde;</code> <td> U+00168 <td> <span class=glyph></span> <tr id=entity-utilde><td> <code>utilde;</code> <td> U+00169 <td> <span class=glyph></span> <tr id=entity-utri><td> <code>utri;</code> <td> U+025B5 <td> <span class=glyph></span> <tr id=entity-utrif><td> <code>utrif;</code> <td> U+025B4 <td> <span class=glyph></span> <tr id=entity-uuarr><td> <code>uuarr;</code> <td> U+021C8 <td> <span class=glyph></span> <tr id=entity-Uuml><td> <code>Uuml;</code> <td> U+000DC <td> <span class=glyph></span> <tr id=entity-Uuml-legacy class=impl><td> <code>Uuml</code> <td> U+000DC <td> <span></span> <tr id=entity-uuml><td> <code>uuml;</code> <td> U+000FC <td> <span class=glyph></span> <tr id=entity-uuml-legacy class=impl><td> <code>uuml</code> <td> U+000FC <td> <span></span> <tr id=entity-uwangle><td> <code>uwangle;</code> <td> U+029A7 <td> <span class=glyph></span> <tr id=entity-vangrt><td> <code>vangrt;</code> <td> U+0299C <td> <span class=glyph></span> <tr id=entity-varepsilon><td> <code>varepsilon;</code> <td> U+003F5 <td> <span class=glyph></span> <tr id=entity-varkappa><td> <code>varkappa;</code> <td> U+003F0 <td> <span class=glyph></span> <tr id=entity-varnothing><td> <code>varnothing;</code> <td> U+02205 <td> <span class=glyph></span> <tr id=entity-varphi><td> <code>varphi;</code> <td> U+003D5 <td> <span class=glyph></span> <tr id=entity-varpi><td> <code>varpi;</code> <td> U+003D6 <td> <span class=glyph></span> <tr id=entity-varpropto><td> <code>varpropto;</code> <td> U+0221D <td> <span class=glyph></span> <tr id=entity-vArr><td> <code>vArr;</code> <td> U+021D5 <td> <span class=glyph></span> <tr id=entity-varr><td> <code>varr;</code> <td> U+02195 <td> <span class=glyph></span> <tr id=entity-varrho><td> <code>varrho;</code> <td> U+003F1 <td> <span class=glyph></span> <tr id=entity-varsigma><td> <code>varsigma;</code> <td> U+003C2 <td> <span class=glyph></span> <tr id=entity-varsubsetneq><td> <code>varsubsetneq;</code> <td> U+0228A U+0FE00 <td> <span class="glyph compound"></span> <tr id=entity-varsubsetneqq><td> <code>varsubsetneqq;</code> <td> U+02ACB U+0FE00 <td> <span class="glyph compound"></span> <tr id=entity-varsupsetneq><td> <code>varsupsetneq;</code> <td> U+0228B U+0FE00 <td> <span class="glyph compound"></span> <tr id=entity-varsupsetneqq><td> <code>varsupsetneqq;</code> <td> U+02ACC U+0FE00 <td> <span class="glyph compound"></span> <tr id=entity-vartheta><td> <code>vartheta;</code> <td> U+003D1 <td> <span class=glyph></span> <tr id=entity-vartriangleleft><td> <code>vartriangleleft;</code> <td> U+022B2 <td> <span class=glyph></span> <tr id=entity-vartriangleright><td> <code>vartriangleright;</code> <td> U+022B3 <td> <span class=glyph></span> <tr id=entity-Vbar><td> <code>Vbar;</code> <td> U+02AEB <td> <span class=glyph></span> <tr id=entity-vBar><td> <code>vBar;</code> <td> U+02AE8 <td> <span class=glyph></span> <tr id=entity-vBarv><td> <code>vBarv;</code> <td> U+02AE9 <td> <span class=glyph></span> <tr id=entity-Vcy><td> <code>Vcy;</code> <td> U+00412 <td> <span class=glyph></span> <tr id=entity-vcy><td> <code>vcy;</code> <td> U+00432 <td> <span class=glyph></span> <tr id=entity-VDash><td> <code>VDash;</code> <td> U+022AB <td> <span class=glyph></span> <tr id=entity-Vdash><td> <code>Vdash;</code> <td> U+022A9 <td> <span class=glyph></span> <tr id=entity-vDash><td> <code>vDash;</code> <td> U+022A8 <td> <span class=glyph></span> <tr id=entity-vdash><td> <code>vdash;</code> <td> U+022A2 <td> <span class=glyph></span> <tr id=entity-Vdashl><td> <code>Vdashl;</code> <td> U+02AE6 <td> <span class=glyph></span> <tr id=entity-Vee><td> <code>Vee;</code> <td> U+022C1 <td> <span class=glyph></span> <tr id=entity-vee><td> <code>vee;</code> <td> U+02228 <td> <span class=glyph></span> <tr id=entity-veebar><td> <code>veebar;</code> <td> U+022BB <td> <span class=glyph></span> <tr id=entity-veeeq><td> <code>veeeq;</code> <td> U+0225A <td> <span class=glyph></span> <tr id=entity-vellip><td> <code>vellip;</code> <td> U+022EE <td> <span class=glyph></span> <tr id=entity-Verbar><td> <code>Verbar;</code> <td> U+02016 <td> <span class=glyph></span> <tr id=entity-verbar><td> <code>verbar;</code> <td> U+0007C <td> <span class=glyph>|</span> <tr id=entity-Vert><td> <code>Vert;</code> <td> U+02016 <td> <span class=glyph></span> <tr id=entity-vert><td> <code>vert;</code> <td> U+0007C <td> <span class=glyph>|</span> <tr id=entity-VerticalBar><td> <code>VerticalBar;</code> <td> U+02223 <td> <span class=glyph></span> <tr id=entity-VerticalLine><td> <code>VerticalLine;</code> <td> U+0007C <td> <span class=glyph>|</span> <tr id=entity-VerticalSeparator><td> <code>VerticalSeparator;</code> <td> U+02758 <td> <span class=glyph></span> <tr id=entity-VerticalTilde><td> <code>VerticalTilde;</code> <td> U+02240 <td> <span class=glyph></span> <tr id=entity-VeryThinSpace><td> <code>VeryThinSpace;</code> <td> U+0200A <td> <span class=glyph></span> <tr id=entity-Vfr><td> <code>Vfr;</code> <td> U+1D519 <td> <span class=glyph></span> <tr id=entity-vfr><td> <code>vfr;</code> <td> U+1D533 <td> <span class=glyph></span> <tr id=entity-vltri><td> <code>vltri;</code> <td> U+022B2 <td> <span class=glyph></span> <tr id=entity-vnsub><td> <code>vnsub;</code> <td> U+02282 U+020D2 <td> <span class="glyph compound"></span> <tr id=entity-vnsup><td> <code>vnsup;</code> <td> U+02283 U+020D2 <td> <span class="glyph compound"></span> <tr id=entity-Vopf><td> <code>Vopf;</code> <td> U+1D54D <td> <span class=glyph></span> <tr id=entity-vopf><td> <code>vopf;</code> <td> U+1D567 <td> <span class=glyph></span> <tr id=entity-vprop><td> <code>vprop;</code> <td> U+0221D <td> <span class=glyph></span> <tr id=entity-vrtri><td> <code>vrtri;</code> <td> U+022B3 <td> <span class=glyph></span> <tr id=entity-Vscr><td> <code>Vscr;</code> <td> U+1D4B1 <td> <span class=glyph></span> <tr id=entity-vscr><td> <code>vscr;</code> <td> U+1D4CB <td> <span class=glyph></span> <tr id=entity-vsubnE><td> <code>vsubnE;</code> <td> U+02ACB U+0FE00 <td> <span class="glyph compound"></span> <tr id=entity-vsubne><td> <code>vsubne;</code> <td> U+0228A U+0FE00 <td> <span class="glyph compound"></span> <tr id=entity-vsupnE><td> <code>vsupnE;</code> <td> U+02ACC U+0FE00 <td> <span class="glyph compound"></span> <tr id=entity-vsupne><td> <code>vsupne;</code> <td> U+0228B U+0FE00 <td> <span class="glyph compound"></span> <tr id=entity-Vvdash><td> <code>Vvdash;</code> <td> U+022AA <td> <span class=glyph></span> <tr id=entity-vzigzag><td> <code>vzigzag;</code> <td> U+0299A <td> <span class=glyph></span> <tr id=entity-Wcirc><td> <code>Wcirc;</code> <td> U+00174 <td> <span class=glyph></span> <tr id=entity-wcirc><td> <code>wcirc;</code> <td> U+00175 <td> <span class=glyph></span> <tr id=entity-wedbar><td> <code>wedbar;</code> <td> U+02A5F <td> <span class=glyph></span> <tr id=entity-Wedge><td> <code>Wedge;</code> <td> U+022C0 <td> <span class=glyph></span> <tr id=entity-wedge><td> <code>wedge;</code> <td> U+02227 <td> <span class=glyph></span> <tr id=entity-wedgeq><td> <code>wedgeq;</code> <td> U+02259 <td> <span class=glyph></span> <tr id=entity-weierp><td> <code>weierp;</code> <td> U+02118 <td> <span class=glyph></span> <tr id=entity-Wfr><td> <code>Wfr;</code> <td> U+1D51A <td> <span class=glyph></span> <tr id=entity-wfr><td> <code>wfr;</code> <td> U+1D534 <td> <span class=glyph></span> <tr id=entity-Wopf><td> <code>Wopf;</code> <td> U+1D54E <td> <span class=glyph></span> <tr id=entity-wopf><td> <code>wopf;</code> <td> U+1D568 <td> <span class=glyph></span> <tr id=entity-wp><td> <code>wp;</code> <td> U+02118 <td> <span class=glyph></span> <tr id=entity-wr><td> <code>wr;</code> <td> U+02240 <td> <span class=glyph></span> <tr id=entity-wreath><td> <code>wreath;</code> <td> U+02240 <td> <span class=glyph></span> <tr id=entity-Wscr><td> <code>Wscr;</code> <td> U+1D4B2 <td> <span class=glyph></span> <tr id=entity-wscr><td> <code>wscr;</code> <td> U+1D4CC <td> <span class=glyph></span> <tr id=entity-xcap><td> <code>xcap;</code> <td> U+022C2 <td> <span class=glyph></span> <tr id=entity-xcirc><td> <code>xcirc;</code> <td> U+025EF <td> <span class=glyph></span> <tr id=entity-xcup><td> <code>xcup;</code> <td> U+022C3 <td> <span class=glyph></span> <tr id=entity-xdtri><td> <code>xdtri;</code> <td> U+025BD <td> <span class=glyph></span> <tr id=entity-Xfr><td> <code>Xfr;</code> <td> U+1D51B <td> <span class=glyph></span> <tr id=entity-xfr><td> <code>xfr;</code> <td> U+1D535 <td> <span class=glyph></span> <tr id=entity-xhArr><td> <code>xhArr;</code> <td> U+027FA <td> <span class=glyph></span> <tr id=entity-xharr><td> <code>xharr;</code> <td> U+027F7 <td> <span class=glyph></span> <tr id=entity-Xi><td> <code>Xi;</code> <td> U+0039E <td> <span class=glyph></span> <tr id=entity-xi><td> <code>xi;</code> <td> U+003BE <td> <span class=glyph></span> <tr id=entity-xlArr><td> <code>xlArr;</code> <td> U+027F8 <td> <span class=glyph></span> <tr id=entity-xlarr><td> <code>xlarr;</code> <td> U+027F5 <td> <span class=glyph></span> <tr id=entity-xmap><td> <code>xmap;</code> <td> U+027FC <td> <span class=glyph></span> <tr id=entity-xnis><td> <code>xnis;</code> <td> U+022FB <td> <span class=glyph></span> <tr id=entity-xodot><td> <code>xodot;</code> <td> U+02A00 <td> <span class=glyph></span> <tr id=entity-Xopf><td> <code>Xopf;</code> <td> U+1D54F <td> <span class=glyph></span> <tr id=entity-xopf><td> <code>xopf;</code> <td> U+1D569 <td> <span class=glyph></span> <tr id=entity-xoplus><td> <code>xoplus;</code> <td> U+02A01 <td> <span class=glyph></span> <tr id=entity-xotime><td> <code>xotime;</code> <td> U+02A02 <td> <span class=glyph></span> <tr id=entity-xrArr><td> <code>xrArr;</code> <td> U+027F9 <td> <span class=glyph></span> <tr id=entity-xrarr><td> <code>xrarr;</code> <td> U+027F6 <td> <span class=glyph></span> <tr id=entity-Xscr><td> <code>Xscr;</code> <td> U+1D4B3 <td> <span class=glyph></span> <tr id=entity-xscr><td> <code>xscr;</code> <td> U+1D4CD <td> <span class=glyph></span> <tr id=entity-xsqcup><td> <code>xsqcup;</code> <td> U+02A06 <td> <span class=glyph></span> <tr id=entity-xuplus><td> <code>xuplus;</code> <td> U+02A04 <td> <span class=glyph></span> <tr id=entity-xutri><td> <code>xutri;</code> <td> U+025B3 <td> <span class=glyph></span> <tr id=entity-xvee><td> <code>xvee;</code> <td> U+022C1 <td> <span class=glyph></span> <tr id=entity-xwedge><td> <code>xwedge;</code> <td> U+022C0 <td> <span class=glyph></span> <tr id=entity-Yacute><td> <code>Yacute;</code> <td> U+000DD <td> <span class=glyph></span> <tr id=entity-Yacute-legacy class=impl><td> <code>Yacute</code> <td> U+000DD <td> <span></span> <tr id=entity-yacute><td> <code>yacute;</code> <td> U+000FD <td> <span class=glyph></span> <tr id=entity-yacute-legacy class=impl><td> <code>yacute</code> <td> U+000FD <td> <span></span> <tr id=entity-YAcy><td> <code>YAcy;</code> <td> U+0042F <td> <span class=glyph></span> <tr id=entity-yacy><td> <code>yacy;</code> <td> U+0044F <td> <span class=glyph></span> <tr id=entity-Ycirc><td> <code>Ycirc;</code> <td> U+00176 <td> <span class=glyph></span> <tr id=entity-ycirc><td> <code>ycirc;</code> <td> U+00177 <td> <span class=glyph></span> <tr id=entity-Ycy><td> <code>Ycy;</code> <td> U+0042B <td> <span class=glyph></span> <tr id=entity-ycy><td> <code>ycy;</code> <td> U+0044B <td> <span class=glyph></span> <tr id=entity-yen><td> <code>yen;</code> <td> U+000A5 <td> <span class=glyph></span> <tr id=entity-yen-legacy class=impl><td> <code>yen</code> <td> U+000A5 <td> <span></span> <tr id=entity-Yfr><td> <code>Yfr;</code> <td> U+1D51C <td> <span class=glyph></span> <tr id=entity-yfr><td> <code>yfr;</code> <td> U+1D536 <td> <span class=glyph></span> <tr id=entity-YIcy><td> <code>YIcy;</code> <td> U+00407 <td> <span class=glyph></span> <tr id=entity-yicy><td> <code>yicy;</code> <td> U+00457 <td> <span class=glyph></span> <tr id=entity-Yopf><td> <code>Yopf;</code> <td> U+1D550 <td> <span class=glyph></span> <tr id=entity-yopf><td> <code>yopf;</code> <td> U+1D56A <td> <span class=glyph></span> <tr id=entity-Yscr><td> <code>Yscr;</code> <td> U+1D4B4 <td> <span class=glyph></span> <tr id=entity-yscr><td> <code>yscr;</code> <td> U+1D4CE <td> <span class=glyph></span> <tr id=entity-YUcy><td> <code>YUcy;</code> <td> U+0042E <td> <span class=glyph></span> <tr id=entity-yucy><td> <code>yucy;</code> <td> U+0044E <td> <span class=glyph></span> <tr id=entity-Yuml><td> <code>Yuml;</code> <td> U+00178 <td> <span class=glyph></span> <tr id=entity-yuml><td> <code>yuml;</code> <td> U+000FF <td> <span class=glyph></span> <tr id=entity-yuml-legacy class=impl><td> <code>yuml</code> <td> U+000FF <td> <span></span> <tr id=entity-Zacute><td> <code>Zacute;</code> <td> U+00179 <td> <span class=glyph></span> <tr id=entity-zacute><td> <code>zacute;</code> <td> U+0017A <td> <span class=glyph></span> <tr id=entity-Zcaron><td> <code>Zcaron;</code> <td> U+0017D <td> <span class=glyph></span> <tr id=entity-zcaron><td> <code>zcaron;</code> <td> U+0017E <td> <span class=glyph></span> <tr id=entity-Zcy><td> <code>Zcy;</code> <td> U+00417 <td> <span class=glyph></span> <tr id=entity-zcy><td> <code>zcy;</code> <td> U+00437 <td> <span class=glyph></span> <tr id=entity-Zdot><td> <code>Zdot;</code> <td> U+0017B <td> <span class=glyph></span> <tr id=entity-zdot><td> <code>zdot;</code> <td> U+0017C <td> <span class=glyph></span> <tr id=entity-zeetrf><td> <code>zeetrf;</code> <td> U+02128 <td> <span class=glyph></span> <tr id=entity-ZeroWidthSpace><td> <code>ZeroWidthSpace;</code> <td> U+0200B <td> <span class=glyph></span> <tr id=entity-Zeta><td> <code>Zeta;</code> <td> U+00396 <td> <span class=glyph></span> <tr id=entity-zeta><td> <code>zeta;</code> <td> U+003B6 <td> <span class=glyph></span> <tr id=entity-Zfr><td> <code>Zfr;</code> <td> U+02128 <td> <span class=glyph></span> <tr id=entity-zfr><td> <code>zfr;</code> <td> U+1D537 <td> <span class=glyph></span> <tr id=entity-ZHcy><td> <code>ZHcy;</code> <td> U+00416 <td> <span class=glyph></span> <tr id=entity-zhcy><td> <code>zhcy;</code> <td> U+00436 <td> <span class=glyph></span> <tr id=entity-zigrarr><td> <code>zigrarr;</code> <td> U+021DD <td> <span class=glyph></span> <tr id=entity-Zopf><td> <code>Zopf;</code> <td> U+02124 <td> <span class=glyph></span> <tr id=entity-zopf><td> <code>zopf;</code> <td> U+1D56B <td> <span class=glyph></span> <tr id=entity-Zscr><td> <code>Zscr;</code> <td> U+1D4B5 <td> <span class=glyph></span> <tr id=entity-zscr><td> <code>zscr;</code> <td> U+1D4CF <td> <span class=glyph></span> <tr id=entity-zwj><td> <code>zwj;</code> <td> U+0200D <td> <span class=glyph></span> <tr id=entity-zwnj><td> <code>zwnj;</code> <td> U+0200C <td> <span class=glyph></span> </table> 7023 7024 </div> 7025 7026 <p>This data is also available <a href=entities.json>as a JSON file</a>.</p> 7027 7028 <p><i>The glyphs displayed above are non-normative. Refer to the Unicode specifications for formal 7029 definitions of the characters listed above.</i></p> 7030 7031 7032 <nav><a href=webstorage.html> 11 Web storage</a> <a href=index.html>Table of Contents</a> <a href=xhtml.html>13 The XHTML syntax </a></nav> 7033