blob: 0998592581ec537c83b8e510394ebe498173e62f [file] [log] [blame]
<!DOCTYPE html><html class=split data-revision="$Revision: 8844 $" lang=en-GB-x-hixie><title>HTML Standard</title><script>
var loadTimer = new Date();
var current_revision = "r" + document.documentElement.getAttribute('data-revision').substr(11);
current_revision = current_revision.substr(0, current_revision.length - 2);
var last_known_revision = current_revision;
function F( /* varargs... */) {
var fragment = document.createDocumentFragment();
for (var index = 0; index < arguments.length; index += 1) {
if (arguments[index] instanceof Array) {
fragment.appendChild(F.apply(this, arguments[index]));
} else if (typeof arguments[index] == 'string') {
fragment.appendChild(document.createTextNode(arguments[index]));
} else {
fragment.appendChild(arguments[index]);
}
}
return fragment;
}
function E(name, /* optional */ attributes /*, varargs... */) {
var element = document.createElement(name);
var index = 1;
if ((arguments.length > 1) && (typeof attributes != 'string') &&
(!(attributes instanceof Node)) && (!(attributes instanceof Array))) {
for (var attName in attributes) {
if (typeof attributes[attName] == 'boolean') {
if (attributes[attName])
element.setAttribute(attName, '');
} else if (typeof attributes[attName] == 'function') {
element[attName] = attributes[attName];
} else {
element.setAttribute(attName, attributes[attName]);
}
}
index = 2;
}
for (; index < arguments.length; index += 1) {
if (arguments[index] instanceof Array) {
element.appendChild(F.apply(this, arguments[index]));
} else if (typeof arguments[index] == 'string') {
element.appendChild(document.createTextNode(arguments[index]));
} else {
element.appendChild(arguments[index]);
}
}
return element;
}
function getCookie(name) {
var params = location.search.substr(1).split("&");
for (var index = 0; index < params.length; index++) {
if (params[index] == name)
return "1";
var data = params[index].split("=");
if (data[0] == name)
return unescape(data[1]);
}
var cookies = document.cookie.split("; ");
for (var index = 0; index < cookies.length; index++) {
var data = cookies[index].split("=");
if (data[0] == name)
return unescape(data[1]);
}
return null;
}
var currentAlert;
var currentAlertTimeout;
function showAlert(s, href) {
if (!currentAlert) {
currentAlert = document.createElement('div');
currentAlert.id = 'alert';
var x = document.createElement('button');
x.textContent = '\u2573';
x.onclick = closeAlert2;
currentAlert.appendChild(x);
currentAlert.appendChild(document.createElement('span'));
currentAlert.onmousemove = function () {
clearTimeout(currentAlertTimeout);
currentAlert.className = '';
currentAlertTimeout = setTimeout(closeAlert, 10000);
}
document.body.appendChild(currentAlert);
} else {
clearTimeout(currentAlertTimeout);
currentAlert.className = '';
}
currentAlert.lastChild.textContent = '';
currentAlert.lastChild.appendChild(F(s));
if (href) {
var link = document.createElement('a');
link.href = href;
link.textContent = href;
currentAlert.lastChild.appendChild(F(' ', link));
}
currentAlertTimeout = setTimeout(closeAlert, 10000);
}
function closeAlert() {
clearTimeout(currentAlertTimeout);
if (currentAlert) {
currentAlert.className = 'closed';
currentAlertTimeout = setTimeout(closeAlert2, 3000);
}
}
function closeAlert2() {
clearTimeout(currentAlertTimeout);
if (currentAlert) {
currentAlert.parentNode.removeChild(currentAlert);
currentAlert = null;
}
}
window.addEventListener('keydown', function (event) {
if (event.keyCode == 27) {
if (currentAlert)
closeAlert2();
} else {
closeAlert();
}
}, false);
window.addEventListener('scroll', function (event) {
closeAlert();
}, false);
function load(script) {
var e = document.createElement('script');
e.setAttribute('src', '/' + script);
document.body.appendChild(e);
}
var startedInit = 0;
function init() {
startedInit = 1;
if (location.search == '?slow-browser')
return;
load('reviewer.js');
if (document.documentElement.className == "big" || document.documentElement.className == "big split index")
load('toc.js');
load('updater.js');
load('dfn.js');
load('status.js');
if (getCookie('profile') == '1')
document.getElementsByTagName('h2')[0].textContent += '; load: ' + (new Date() - loadTimer) + 'ms';
}
if (document.documentElement.className == "")
setTimeout(function () {
if (!startedInit)
showAlert("Too slow? Try reading the multipage copy of the spec instead:", "https://whatwg.org/html");
}, 6000);
window.addEventListener('keypress', function (event) {
if ((event.which == 114) && (event.metaKey)) {
if (!confirm('Are you sure you want to reload this page?'))
event.preventDefault();
}
}, false);
</script><script>
function toggleStatus(div) {
div.parentNode.classList.toggle('wrapped');
}
</script><link rel=stylesheet href=https://whatwg.org/style/specification><link rel=icon href=https://whatwg.org/images/icon><style>
[hidden] { display: none; }
.proposal { border: blue solid; padding: 1em; }
.bad, .bad *:not(.X\58X) { color: gray; border-color: gray; background: transparent; }
#updatesStatus { display: none; z-index: 10; }
#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; }
div.head .logo { width: 11em; margin-bottom: 20em; }
#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; }
#configUI p { margin: 0.75em 0; padding: 0.3em; }
#configUI p label { display: block; }
#configUI #updateUI, #configUI .loginUI { text-align: center; }
#configUI input[type=button] { display: block; margin: auto; }
#configUI :link, #configUI :visited { color: white; }
#configUI :link:hover, #configUI :visited:hover { background: transparent; }
#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; }
#alert.closed { opacity: 0; }
#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; }
#alert :link, #alert :visited { color: white; text-decoration: underline; }
#alert :link:hover, #alert :visited:hover { background: transparent; }
@media print { #configUI, #alert { display: none; } }
.fingerprint { position: absolute; right: 0; z-index: 5; }
.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; }
.status.wrapped { width: 1em; height: 1em; }
.status.wrapped > :not(input) { display: none; }
.status > input { position: absolute; right: 0; top: 0; width: 1em; height: 1em; border: none; background: transparent; padding: 0; margin: 0; }
.status > p { font-size: 0.6em; margin: 0; padding: 0; }
.status > p + p { padding-top: 0.5em; }
.status > .support { display: block; }
.status > .support > span { padding: 0.2em 0; display: block; display: table; }
.status > .support > span.partial { color: #666666; filter: grayscale(50%); }
.status > .support > span.no { color: #CCCCCC; filter: grayscale(100%); }
.status > .support > span:first-of-type { padding-top: 0.5em; }
.status > .support > span > span { padding: 0 0.5em; display: table-cell; vertical-align: top; }
.status > .support > span > span:first-child { width: 100%; }
.status > .support > span > span:last-child { width: 100%; white-space: pre; padding: 0; }
.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; }
.status > .support > .and_chr::before { background-image: url(https://resources.whatwg.org/browser-logos/chrome-android.png); }
.status > .support > .and_ff::before { background-image: url(https://resources.whatwg.org/browser-logos/firefox.png); }
.status > .support > .and_uc::before { background-image: url(https://resources.whatwg.org/browser-logos/uc.png); } /* UC Browser for Android */
.status > .support > .android::before { background-image: url(https://resources.whatwg.org/browser-logos/android.svg); }
.status > .support > .bb::before { background-image: url(https://resources.whatwg.org/browser-logos/bb.jpg); } /* Blackberry Browser */
.status > .support > .chrome::before { background-image: url(https://resources.whatwg.org/browser-logos/chrome.png); }
.status > .support > .firefox::before { background-image: url(https://resources.whatwg.org/browser-logos/firefox.png); }
.status > .support > .ie::before { background-image: url(https://resources.whatwg.org/browser-logos/ie.png); }
.status > .support > .ie_mob::before { background-image: url(https://resources.whatwg.org/browser-logos/ie-mobile.svg); }
.status > .support > .ios_saf::before { background-image: url(https://resources.whatwg.org/browser-logos/safari-ios.svg); }
.status > .support > .op_mini::before { background-image: url(https://resources.whatwg.org/browser-logos/opera-mobile.png); }
.status > .support > .op_mob::before { background-image: url(https://resources.whatwg.org/browser-logos/opera-mobile.png); }
.status > .support > .opera::before { background-image: url(https://resources.whatwg.org/browser-logos/opera.png); }
.status > .support > .safari::before { background-image: url(https://resources.whatwg.org/browser-logos/safari.png); }
.status > .caniuse { text-align: right; font-style: italic; }
.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; }
.panel h2 { margin: 0; text-align: center; }
.panel ul { min-height: 6em; }
.panel p { text-align: right; margin: 0; }
.panel form { background: transparent; color: black; margin: 0.5em -0.5em 1em; padding: 0.5em; }
.panel form.changed { background: yellow; color: black; }
.panel form p { text-align: left; margin: 1em 0 0; }
.panel form p:first-child { margin-top: 0; }
.panel form p:last-child { margin-bottom: 0; }
.panel form p textarea { width: 100% /* need the keyword that makes it fit to the parent here XXX */; min-height: 4em; display: block; }
.panel form dl { line-height: 1.5em; }
.panel form dt { display: inline-block; width: 20em; white-space: nowrap; text-align: right; font-weight: normal; margin: 0; padding: 0; }
.panel form dd { display: inline; margin: 0 0 0 1em; padding: 0; }
.panel form dd:after { display: block; }
ul.checkboxes { list-style-type: none; }
.progress { text-decoration: blink; }
.applies .yes { background: yellow; }
</style><style>
.applies thead th > * { display: block; }
.applies thead code { display: block; }
.applies td { text-align: center; }
.matrix, .matrix td { border: hidden; text-align: right; }
.matrix { margin-left: 2em; }
.vertical-summary-table tr > th[rowspan="2"]:first-child + th,
.vertical-summary-table tr > td[rowspan="2"]:first-child + td { border-bottom: hidden; }
.dice-example { border-collapse: collapse; border-style: hidden solid solid hidden; border-width: thin; margin-left: 3em; }
.dice-example caption { width: 30em; font-size: smaller; font-style: italic; padding: 0.75em 0; text-align: left; }
.dice-example td, .dice-example th { border: solid thin; width: 1.35em; height: 1.05em; text-align: center; padding: 0; }
td.eg { border-width: thin; text-align: center; }
#table-example-1 { border: solid thin; border-collapse: collapse; margin-left: 3em; }
#table-example-1 caption { padding-bottom: 0.5em; }
#table-example-1 thead, #table-example-1 tbody { border: none; }
#table-example-1 th, #table-example-1 td { border: solid thin; }
#table-example-1 th { font-weight: normal; }
#table-example-1 td { border-style: none solid; vertical-align: top; }
#table-example-1 th { padding: 0.5em; vertical-align: middle; text-align: center; }
#table-example-1 tbody tr:first-child td { padding-top: 0.5em; }
#table-example-1 tbody tr:last-child td { padding-bottom: 1.5em; }
#table-example-1 tbody td:first-child { padding-left: 2.5em; padding-right: 0; width: 9em; }
#table-example-1 tbody td:first-child::after { content: leader(". "); }
#table-example-1 tbody td { padding-left: 2em; padding-right: 2em; }
#table-example-1 tbody td:first-child + td { width: 10em; }
#table-example-1 tbody td:first-child + td ~ td { width: 2.5em; }
#table-example-1 tbody td:first-child + td + td + td ~ td { width: 1.25em; }
.apple-table-examples { border: none; border-collapse: separate; border-spacing: 1.5em 0em; width: 40em; margin-left: 3em; }
.apple-table-examples * { font-family: "Times", serif; }
.apple-table-examples td, .apple-table-examples th { border: none; white-space: nowrap; padding-top: 0; padding-bottom: 0; }
.apple-table-examples tbody th:first-child { border-left: none; width: 100%; }
.apple-table-examples thead th:first-child ~ th { font-size: smaller; font-weight: bolder; border-bottom: solid 2px; text-align: center; }
.apple-table-examples tbody th::after, .apple-table-examples tfoot th::after { content: leader(". ") }
.apple-table-examples tbody th, .apple-table-examples tfoot th { font: inherit; text-align: left; }
.apple-table-examples td { text-align: right; vertical-align: top; }
.apple-table-examples.e1 tbody tr:last-child td { border-bottom: solid 1px; }
.apple-table-examples.e1 tbody + tbody tr:last-child td { border-bottom: double 3px; }
.apple-table-examples.e2 th[scope=row] { padding-left: 1em; }
.apple-table-examples sup { line-height: 0; }
.three-column-nowrap tr > td:first-child,
.three-column-nowrap tr > td:first-child + td,
.three-column-nowrap tr > td:first-child + td + td { white-space: nowrap; }
.details-example img { vertical-align: top; }
#base64-table {
white-space: nowrap;
font-size: 0.6em;
column-width: 6em;
column-count: 5;
column-gap: 1em;
-moz-column-width: 6em;
-moz-column-count: 5;
-moz-column-gap: 1em;
-webkit-column-width: 6em;
-webkit-column-count: 5;
-webkit-column-gap: 1em;
}
#base64-table thead { display: none; }
#base64-table * { border: none; }
#base64-table tbody td:first-child:after { content: ':'; }
#base64-table tbody td:last-child { text-align: right; }
#named-character-references-table {
white-space: nowrap;
font-size: 0.6em;
column-width: 30em;
column-gap: 1em;
-moz-column-width: 30em;
-moz-column-gap: 1em;
-webkit-column-width: 30em;
-webkit-column-gap: 1em;
}
#named-character-references-table > table > tbody > tr > td:first-child + td,
#named-character-references-table > table > tbody > tr > td:last-child { text-align: center; }
#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; }
#named-character-references-table > table > tbody > tr#entity-CounterClockwiseContourIntegral > td:first-child { font-size: 0.5em; }
.glyph.control { color: red; }
</style><style>
#table-example-1 * { font-family: "Essays1743", serif; line-height: 1.01em; }
@font-face {
font-family: 'Essays1743';
src: url('/fonts/Essays1743.ttf');
}
@font-face {
font-family: 'Essays1743';
font-weight: bold;
src: url('/fonts/Essays1743-Bold.ttf');
}
@font-face {
font-family: 'Essays1743';
font-style: italic;
src: url('/fonts/Essays1743-Italic.ttf');
}
@font-face {
font-family: 'Essays1743';
font-style: italic;
font-weight: bold;
src: url('/fonts/Essays1743-BoldItalic.ttf');
}
</style><script src=link-fixup.js></script><body onload=init()>
<header id=head class="head with-buttons">
<p><a href=https://whatwg.org/ class=logo><img alt=WHATWG src=//whatwg.org/images/logo width=101 height=101></a></p>
<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>
</header>
<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: &lt;b>&lt;i>&lt;/b>&lt;/i></a><li><a href=syntax.html#misnested-tags:-b-p-/b-/p>12.2.8.2 Misnested tags: &lt;b>&lt;p>&lt;/b>&lt;/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>
<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
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
XHTML syntax</a>".</p>
<h3 id=writing>12.1 Writing HTML documents</h3>
<p><i>This section only applies to documents, authoring tools, and markup generators. In
particular, it does not apply to conformance checkers; conformance checkers must use the
requirements given in the next section ("parsing HTML documents").</i></p>
<p>Documents must consist of the following parts, in the given
order:</p>
<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>.
<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>
<p>The various types of content mentioned above are described in the next few sections.</p>
<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
section on that topic.</p>
<div class=note>
<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
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
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
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
around the root element do not round-trip.</p>
<p>It is suggested that newlines be inserted after the DOCTYPE, after any comments that are
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
<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>
</div>
<p>Many strings in the HTML syntax (e.g. the names of elements and their attributes) are
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
letters</a>. For convenience, in this section this is just referred to as
"case-insensitive".</p>
<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>
<p>A <dfn id=syntax-doctype>DOCTYPE</dfn> is a
required preamble.</p>
<p class=note>DOCTYPEs are required for legacy reasons. When omitted, browsers tend to use a
different rendering mode that is incompatible with some specifications. Including the DOCTYPE in a
document ensures that the browser makes a best-effort attempt at following the relevant
specifications.</p>
<p>A DOCTYPE must consist of the following components, in this order:</p>
<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>&lt;!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>
<p class=note>In other words, <code>&lt;!DOCTYPE html></code>, case-insensitively.</p>
<hr>
<p>For the purposes of HTML generators that cannot output HTML markup with the short DOCTYPE
"<code>&lt;!DOCTYPE html></code>", a <dfn id=doctype-legacy-string>DOCTYPE legacy string</dfn> may be inserted
into the DOCTYPE (in the position defined above). This string must consist of:</p>
<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>
<p class=note>In other words, <code>&lt;!DOCTYPE html SYSTEM "about:legacy-compat"></code> or
<code>&lt;!DOCTYPE html SYSTEM 'about:legacy-compat'></code>, case-insensitively except for the
part in single or double quotes.</p>
<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
a system that cannot output the shorter string.</p>
<hr>
<p>To help authors transition from HTML4 and XHTML1, an <dfn id=obsolete-permitted-doctype-string>obsolete permitted DOCTYPE
string</dfn> can be inserted into the DOCTYPE (in the position defined above). This string must
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>
<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>
<table><caption>
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>.
</caption><thead><tr><th> Public identifier
<th> System identifier
<tbody><tr><td> <code>-//W3C//DTD HTML 4.0//EN</code>
<td>
<tr><td> <code>-//W3C//DTD HTML 4.0//EN</code>
<td> <code>http://www.w3.org/TR/REC-html40/strict.dtd</code>
<tr><td> <code>-//W3C//DTD HTML 4.01//EN</code>
<td>
<tr><td> <code>-//W3C//DTD HTML 4.01//EN</code>
<td> <code>http://www.w3.org/TR/html4/strict.dtd</code>
<tr><td> <code>-//W3C//DTD XHTML 1.0 Strict//EN</code>
<td> <code>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</code>
<tr><td> <code>-//W3C//DTD XHTML 1.1//EN</code>
<td> <code>http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd</code>
</table>
<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
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
long.</p>
<h4 id=elements-2>12.1.2 Elements</h4>
<p>There are five different kinds of <dfn id=syntax-elements>elements</dfn>: <a href=#void-elements id=elements-2:void-elements>void
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>,
<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>
<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>,
<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>,
<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>,
<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>
<p><dfn id=syntax-tags>Tags</dfn> are used to delimit the start and end of elements in the
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
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
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
described below in the section on <a href=#syntax-tag-omission id=elements-2:syntax-tag-omission-2>optional tags</a>. Those
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
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
either have a start tag and an end tag, or a start tag that is marked as self-closing, in which
case they must not have an end tag.</p>
<p>The <a href=dom.html#concept-html-contents id=elements-2:concept-html-contents>contents</a> of the element must be placed between
just after the start tag (which <a href=#syntax-tag-omission id=elements-2:syntax-tag-omission-3>might be implied, in certain
cases</a>) and just before the end tag (which again, <a href=#syntax-tag-omission id=elements-2:syntax-tag-omission-4>might be
implied in certain cases</a>). The exact allowed contents of each individual element depend on
the <a href=dom.html#content-models id=elements-2:content-models>content model</a> of that element, as described earlier in
this specification. Elements must not contain content that their content model disallows. In
addition to the restrictions placed on the contents by those content models, however, the five
types of elements have additional <em>syntactic</em> requirements.</p>
<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
put between the start tag and the end tag).</p>
<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>
<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
<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>
<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
(since, again, as there's no end tag, no content can be put between the start tag and the end
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
have <a href=#syntax-text id=elements-2:syntax-text-3>text</a>, <a href=#syntax-charref id=elements-2:syntax-charref-2>character
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
the text must not contain the character U+003C LESS-THAN SIGN (&lt;) or an <a href=#syntax-ambiguous-ampersand id=elements-2:syntax-ambiguous-ampersand-2>ambiguous ampersand</a>.</p>
<div class=note>
<p>The HTML syntax does not support namespace declarations, even in <a href=#foreign-elements id=elements-2:foreign-elements-5>foreign
elements</a>.</p>
<p>For instance, consider the following HTML fragment:</p>
<pre>&lt;p>
&lt;svg>
&lt;metadata>
&lt;!-- this is invalid -->
&lt;cdr:license xmlns:cdr="http://www.example.com/cdr/metadata" name="MIT"/>
&lt;/metadata>
&lt;/svg>
&lt;/p></pre>
<p>The innermost element, <code>cdr:license</code>, is actually in the SVG namespace, as
the "<code>xmlns:cdr</code>" attribute has no effect (unlike in XML). In fact, as the
comment in the fragment above says, the fragment is actually non-conforming. This is because the
SVG specification does not define any elements called "<code>cdr:license</code>" in the
SVG namespace.</p>
</div>
<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
the text must not contain the character U+003C LESS-THAN SIGN (&lt;) 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>
also have <a href=#element-restrictions>yet more restrictions</a> on what content they are
allowed to hold, beyond the restrictions imposed by the content model and those described in this
paragraph. Those restrictions are described below.</p>
<p>Tags contain a <dfn id=syntax-tag-name>tag name</dfn>, giving the element's name. HTML
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
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
lower- and uppercase letters that, when converted to all-lowercase, matches the element's tag
name; tag names are case-insensitive.</p>
<h5 id=start-tags>12.1.2.1 Start tags</h5>
<p><dfn id=syntax-start-tag>Start tags</dfn> must have the following format:</p>
<ol><li>The first character of a start tag must be a U+003C LESS-THAN SIGN character (&lt;).<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
separated from each other by one or more <a href=infrastructure.html#space-character id=start-tags:space-character-2>space
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
no attributes, there may be one or more <a href=infrastructure.html#space-character id=start-tags:space-character-3>space characters</a>.
(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
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
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>
<h5 id=end-tags>12.1.2.2 End tags</h5>
<p><dfn id=syntax-end-tag>End tags</dfn> must have the following format:</p>
<ol><li>The first character of an end tag must be a U+003C LESS-THAN SIGN character (&lt;).<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
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
characters</a>.<li>Finally, end tags must be closed by a U+003E GREATER-THAN SIGN character (>).</ol>
<h5 id=attributes-2>12.1.2.3 Attributes</h5>
<p><dfn id=syntax-attributes>Attributes</dfn> for an element are expressed inside the
element's start tag.</p>
<p>Attributes have a name and a value. <dfn id=syntax-attribute-name>Attribute names</dfn>
must consist of one or more characters other than the <a href=infrastructure.html#space-character id=attributes-2:space-character>space
characters</a>, U+0000 NULL, U+0022 QUOTATION MARK ("), U+0027 APOSTROPHE ('), U+003E
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
characters</a>, and any characters that are not defined by Unicode. In the HTML syntax, attribute
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
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
name.</p>
<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>,
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>
<p>Attributes can be specified in four different ways:</p>
<dl><dt>Empty attribute syntax<dd>
<p>Just the <a href=#syntax-attribute-name id=attributes-2:syntax-attribute-name>attribute name</a>. The value is implicitly
the empty string.</p>
<div class=example>
<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
given with the empty attribute syntax:</p>
<pre>&lt;input <em>disabled</em>></pre>
</div>
<p>If an attribute using the empty attribute syntax is to be followed by another attribute, then
there must be a <a id=attributes-2:space-character-2 href=infrastructure.html#space-character>space character</a> separating the two.</p>
<dt id=unquoted>Unquoted attribute value syntax<dd>
<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
character, followed by zero or more <a href=infrastructure.html#space-character id=attributes-2:space-character-4>space characters</a>,
followed by the <a href=#syntax-attribute-value id=attributes-2:syntax-attribute-value>attribute value</a>, which, in addition
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 ("),
U+0027 APOSTROPHE characters ('), U+003D EQUALS SIGN characters (=), U+003C LESS-THAN SIGN
characters (&lt;), U+003E GREATER-THAN SIGN characters (>), or U+0060 GRAVE ACCENT characters
(`), and must not be the empty string.</p>
<div class=example>
<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
with the unquoted attribute value syntax:</p>
<pre>&lt;input <em>value=yes</em>></pre>
</div>
<p>If an attribute using the unquoted attribute syntax is to be followed by another attribute or
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
character</a> separating the two.</p>
<dt>Single-quoted attribute value syntax<dd>
<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
character, followed by zero or more <a href=infrastructure.html#space-character id=attributes-2:space-character-8>space characters</a>,
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
given above for attribute values, must not contain any literal U+0027 APOSTROPHE characters ('),
and finally followed by a second single U+0027 APOSTROPHE character (').</p>
<div class=example>
<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
with the single-quoted attribute value syntax:</p>
<pre>&lt;input <em>type='checkbox'</em>></pre>
</div>
<p>If an attribute using the single-quoted attribute syntax is to be followed by another
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>
<dt>Double-quoted attribute value syntax<dd>
<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
character, followed by zero or more <a href=infrastructure.html#space-character id=attributes-2:space-character-11>space characters</a>,
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
given above for attribute values, must not contain any literal U+0022 QUOTATION MARK characters
("), and finally followed by a second single U+0022 QUOTATION MARK character (").</p>
<div class=example>
<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
the double-quoted attribute value syntax:</p>
<pre>&lt;input <em>name="be evil"</em>></pre>
</div>
<p>If an attribute using the double-quoted attribute syntax is to be followed by another
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>
</dl>
<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
case-insensitive</a> match for each other.</p>
<hr>
<p>When a <a href=#foreign-elements id=attributes-2:foreign-elements-2>foreign element</a> has one of the namespaced
attributes given by the local name and namespace of the first and second cells of a row from the
following table, it must be written using the name given by the third cell from the same row.</p>
<table><thead><tr><th> Local name <th> Namespace <th> Attribute name
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<tr><td> <code>xmlns</code> <td> <a id=attributes-2:xmlns-namespace href=infrastructure.html#xmlns-namespace>XMLNS namespace</a> <td> <code>xmlns</code>
<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>
</table>
<p>No other namespaced attribute can be expressed in <a href=#syntax id=attributes-2:syntax>the HTML syntax</a>.</p>
<p class=note>Whether the attributes in the table above are conforming or not is defined by
other specifications (e.g. the SVG and MathML specifications); this section only describes the
syntax rules if the attributes are serialised using the HTML syntax.</p>
<h5 id=optional-tags>12.1.2.4 Optional tags</h5>
<p>Certain tags can be <dfn id=syntax-tag-omission>omitted</dfn>.</p>
<p class=note>Omitting an element's <a href=#syntax-start-tag id=optional-tags:syntax-start-tag>start tag</a> in the
situations described below does not mean the element is not present; it is implied, but it is
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
the string <code>&lt;html></code> doesn't appear anywhere in the markup.</p>
<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
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>
<div class=example>
<p>For example, in the following case it's ok to remove the "<code>&lt;html></code>"
tag:</p>
<pre>&lt;!DOCTYPE HTML>
<strong>&lt;html></strong>
&lt;head>
&lt;title>Hello&lt;/title>
&lt;/head>
&lt;body>
&lt;p>Welcome to this example.&lt;/p>
&lt;/body>
&lt;/html></pre>
<p>Doing so would make the document look like this:</p>
<pre>&lt;!DOCTYPE HTML>
&lt;head>
&lt;title>Hello&lt;/title>
&lt;/head>
&lt;body>
&lt;p>Welcome to this example.&lt;/p>
&lt;/body>
&lt;/html></pre>
<p>This has the exact same DOM. In particular, note that white space around the root element is
ignored by the parser. The following example would also have the exact same DOM:</p>
<pre>&lt;!DOCTYPE HTML>&lt;head>
&lt;title>Hello&lt;/title>
&lt;/head>
&lt;body>
&lt;p>Welcome to this example.&lt;/p>
&lt;/body>
&lt;/html></pre>
<p>However, in the following example, removing the start tag moves the comment to before the
<code id=optional-tags:the-html-element-4><a href=semantics.html#the-html-element>html</a></code> element:</p>
<pre>&lt;!DOCTYPE HTML>
&lt;html>
<strong>&lt;!-- where is this comment in the DOM? --></strong>
&lt;head>
&lt;title>Hello&lt;/title>
&lt;/head>
&lt;body>
&lt;p>Welcome to this example.&lt;/p>
&lt;/body>
&lt;/html></pre>
<p>With the tag removed, the document actually turns into the same as this:</p>
<pre>&lt;!DOCTYPE HTML>
&lt;!-- where is this comment in the DOM? -->
<small>&lt;html></small>
&lt;head>
&lt;title>Hello&lt;/title>
&lt;/head>
&lt;body>
&lt;p>Welcome to this example.&lt;/p>
&lt;/body>
&lt;/html></pre>
<p>This is why the tag can only be removed if it is not followed by a comment: removing the tag
when there is a comment there changes the document's resulting parse tree. Of course, if the
position of the comment does not matter, then the tag can be omitted, as if the comment had been
moved to before the start tag in the first place.</p>
</div>
<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
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>
<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
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
element.</p>
<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
<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>
<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
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
<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
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>,
<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>
<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
<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>
<div class=example>
<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
<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
space:</p>
<pre>&lt;!DOCTYPE HTML>
&lt;html><strong>
</strong>&lt;head><strong>
</strong>&lt;title>Hello&lt;/title><strong>
</strong>&lt;/head><strong>
</strong>&lt;body><strong>
</strong>&lt;p>Welcome to this example.&lt;/p>
&lt;/body>
&lt;/html></pre>
<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
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>
<p>Usually, however, white space isn't an issue. If we first remove the white space we don't care
about:</p>
<pre>&lt;!DOCTYPE HTML>&lt;html>&lt;head>&lt;title>Hello&lt;/title>&lt;/head>&lt;body>&lt;p>Welcome to this example.&lt;/p>&lt;/body>&lt;/html></pre>
<p>Then we can omit a number of tags without affecting the DOM:</p>
<pre>&lt;!DOCTYPE HTML>&lt;title>Hello&lt;/title>&lt;p>Welcome to this example.&lt;/p></pre>
<p>At that point, we can also add some white space back:</p>
<pre>&lt;!DOCTYPE HTML>
&lt;title>Hello&lt;/title>
&lt;p>Welcome to this example.&lt;/p></pre>
<p>This would be equivalent to this document, with the omitted tags shown in their
parser-implied positions; the only white space text node that results from this is the newline at
the end of the <code id=optional-tags:the-head-element-6><a href=semantics.html#the-head-element>head</a></code> element:</p>
<pre>&lt;!DOCTYPE HTML>
<small>&lt;html>&lt;head></small>&lt;title>Hello&lt;/title>
<small>&lt;/head>&lt;body></small>&lt;p>Welcome to this example.&lt;/p><small>&lt;/body>&lt;/html></small></pre>
</div>
<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
<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
no more content in the parent element.</p>
<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
<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
<code id=optional-tags:the-dd-element><a href=semantics.html#the-dd-element>dd</a></code> element.</p>
<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
<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
<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>
<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
<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>,
<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>,
<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>,
<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>,
<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>,
<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
<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
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>,
<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>
<div class=example>
<p>We can thus simplify the earlier example further:
<pre>&lt;!DOCTYPE HTML>&lt;title>Hello&lt;/title>&lt;p>Welcome to this example.<small>&lt;/p></small></pre>
</div>
<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
<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,
or if there is no more content in the parent element.</p>
<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
<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,
or if there is no more content in the parent element.</p>
<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
if the <code id=optional-tags:the-optgroup-element-2><a href=forms.html#the-optgroup-element>optgroup</a></code> element is
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
the parent element.</p>
<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
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
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
in the parent element.</p>
<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
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,
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
<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
is empty.)</p>
<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
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
a <a href=#syntax-comments id=optional-tags:syntax-comments-6>comment</a>.</p>
<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
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
a <a href=#syntax-comments id=optional-tags:syntax-comments-7>comment</a>.</p>
<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
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
<code id=optional-tags:the-tfoot-element><a href=tables.html#the-tfoot-element>tfoot</a></code> element.</p>
<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
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
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
<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
can't be omitted if the element is empty.)</p>
<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
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
<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>
<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
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
there is no more content in the parent element.</p>
<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
<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
no more content in the parent element.</p>
<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
<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,
or if there is no more content in the parent element.</p>
<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
<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,
or if there is no more content in the parent element.</p>
<div class=example>
<p>The ability to omit all these table-related tags makes table markup much terser.</p>
<p>Take this example:</p>
<pre>&lt;table>
&lt;caption>37547 TEE Electric Powered Rail Car Train Functions (Abbreviated)&lt;/caption>
&lt;colgroup>&lt;col>&lt;col>&lt;col>&lt;/colgroup>
&lt;thead>
&lt;tr>
&lt;th>Function&lt;/th>
&lt;th>Control Unit&lt;/th>
&lt;th>Central Station&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Headlights&lt;/td>
&lt;td>✔&lt;/td>
&lt;td>✔&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Interior Lights&lt;/td>
&lt;td>✔&lt;/td>
&lt;td>✔&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Electric locomotive operating sounds&lt;/td>
&lt;td>✔&lt;/td>
&lt;td>✔&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Engineer's cab lighting&lt;/td>
&lt;td>&lt;/td>
&lt;td>✔&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Station Announcements - Swiss&lt;/td>
&lt;td>&lt;/td>
&lt;td>✔&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table></pre>
<p>The exact same table, modulo some white space differences, could be marked up as follows:</p>
<pre>&lt;table>
&lt;caption>37547 TEE Electric Powered Rail Car Train Functions (Abbreviated)
&lt;colgroup>&lt;col>&lt;col>&lt;col>
&lt;thead>
&lt;tr>
&lt;th>Function
&lt;th>Control Unit
&lt;th>Central Station
&lt;tbody>
&lt;tr>
&lt;td>Headlights
&lt;td>✔
&lt;td>✔
&lt;tr>
&lt;td>Interior Lights
&lt;td>✔
&lt;td>✔
&lt;tr>
&lt;td>Electric locomotive operating sounds
&lt;td>✔
&lt;td>✔
&lt;tr>
&lt;td>Engineer's cab lighting
&lt;td>
&lt;td>✔
&lt;tr>
&lt;td>Station Announcements - Swiss
&lt;td>
&lt;td>✔
&lt;/table></pre>
<p>Since the cells take up much less room this way, this can be made even terser by having each
row on one line:</p>
<pre>&lt;table>
&lt;caption>37547 TEE Electric Powered Rail Car Train Functions (Abbreviated)
&lt;colgroup>&lt;col>&lt;col>&lt;col>
&lt;thead>
&lt;tr> &lt;th>Function &lt;th>Control Unit &lt;th>Central Station
&lt;tbody>
&lt;tr> &lt;td>Headlights &lt;td>✔ &lt;td>✔
&lt;tr> &lt;td>Interior Lights &lt;td>✔ &lt;td>✔
&lt;tr> &lt;td>Electric locomotive operating sounds &lt;td>✔ &lt;td>✔
&lt;tr> &lt;td>Engineer's cab lighting &lt;td> &lt;td>✔
&lt;tr> &lt;td>Station Announcements - Swiss &lt;td> &lt;td>✔
&lt;/table></pre>
<p>The only differences between these tables, at the DOM level, is with the precise position of
the (in any case semantically-neutral) white space.</p>
</div>
<p><strong>However</strong>, a <a href=#syntax-start-tag id=optional-tags:syntax-start-tag-7>start tag</a> must never be
omitted if it has any attributes.</p>
<div class=example>
<p>Returning to the earlier example with all the white space removed and then all the optional
tags removed:</p>
<pre>&lt;!DOCTYPE HTML>&lt;title>Hello&lt;/title>&lt;p>Welcome to this example.</pre>
<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>
<pre>&lt;!DOCTYPE HTML>&lt;html lang="en">&lt;title>Hello&lt;/title>&lt;body class="demo">&lt;p>Welcome to this example.</pre>
</div>
<p class=note>This section assumes that the document is conforming, in particular, that there
are no <a href=dom.html#content-models id=optional-tags:content-models>content model</a> violations. Omitting tags in the fashion
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>
described in this specification is likely to result in unexpected DOM differences (this is, in
part, what the content models are designed to avoid).</p>
<h5 id=element-restrictions>12.1.2.5 Restrictions on content models</h5>
<p>For historical reasons, certain elements have extra restrictions beyond even the restrictions
given by their content model.</p>
<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
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
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
<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
it.)</p>
<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.
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
themselves start with a <a href=#syntax-newlines id=element-restrictions:syntax-newlines-3>newline</a> (because otherwise the
leading newline in the contents would be treated like the optional newline, and ignored).</p>
<div class=example>
<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>
<pre>&lt;pre>Hello&lt;/pre></pre>
<pre>&lt;pre><br>Hello&lt;/pre></pre>
</div>
<h5 id=cdata-rcdata-restrictions>12.1.2.6 Restrictions on the contents of raw text and escapable raw text elements</h5>
<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
elements</a> must not contain any occurrences of the string "<code>&lt;/</code>"
(U+003C LESS-THAN SIGN, U+002F SOLIDUS) followed by characters that case-insensitively match the
tag name of the element followed by one of U+0009 CHARACTER TABULATION (tab), U+000A LINE FEED
(LF), U+000C FORM FEED (FF), U+000D CARRIAGE RETURN (CR), U+0020 SPACE, U+003E GREATER-THAN SIGN
(>), or U+002F SOLIDUS (/).</p>
<h4 id=text-2>12.1.3 Text</h4>
<p><dfn id=syntax-text>Text</dfn> is allowed inside elements, attribute values, and comments.
Extra constraints are placed on what is and what is not allowed in text based on where the text is
to be put, as described in the other sections.</p>
<h5 id=newlines>12.1.3.1 Newlines</h5>
<p><dfn id=syntax-newlines>Newlines</dfn> in HTML may be represented either as U+000D
CARRIAGE RETURN (CR) characters, U+000A LINE FEED (LF) characters, or pairs of U+000D CARRIAGE
RETURN (CR), U+000A LINE FEED (LF) characters in that order.</p>
<p>Where <a href=#syntax-charref id=newlines:syntax-charref>character references</a> are allowed, a character
reference of a U+000A LINE FEED (LF) character (but not a U+000D CARRIAGE RETURN (CR) character)
also represents a <a href=#syntax-newlines id=newlines:syntax-newlines>newline</a>.</p>
<h4 id=character-references>12.1.4 Character references</h4>
<p>In certain cases described in other sections, <a href=#syntax-text id=character-references:syntax-text>text</a> may be
mixed with <dfn id=syntax-charref>character references</dfn>. These can be used to escape
characters that couldn't otherwise legally be included in <a href=#syntax-text id=character-references:syntax-text-2>text</a>.</p>
<p>Character references must start with a U+0026 AMPERSAND character (&amp;). Following this,
there are three possible kinds of character references:</p>
<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
references</a> section, using the same case. The name must be one that is
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
<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
point that is allowed according to the definition below. The digits must then be followed by a
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
by either a U+0078 LATIN SMALL LETTER X character (x) or a U+0058 LATIN CAPITAL LETTER X
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>,
representing a hexadecimal integer that corresponds to a Unicode code point that is allowed
according to the definition below. The digits must then be followed by a U+003B SEMICOLON
character (;).</dl>
<p>The numeric character reference forms described above are allowed to reference any Unicode code
point other than U+0000, U+000D, permanently undefined Unicode characters (noncharacters),
surrogates (U+D800–U+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>
<p>An <dfn id=syntax-ambiguous-ampersand>ambiguous ampersand</dfn> is a U+0026 AMPERSAND
character (&amp;) that is followed by one or more <a id=character-references:alphanumeric-ascii-characters href=infrastructure.html#alphanumeric-ascii-characters>alphanumeric ASCII characters</a>,
followed by a U+003B SEMICOLON character (;), where these characters do not match any of the names
given in the <a href=#named-character-references id=character-references:named-character-references-2>named character references</a> section.</p>
<h4 id=cdata-sections>12.1.5 CDATA sections</h4>
<p><dfn id=syntax-cdata>CDATA sections</dfn> must consist of the following components, in
this order:</p>
<ol><li>The string "<code>&lt;![CDATA[</code>".<li>Optionally, <a href=#syntax-text id=cdata-sections:syntax-text>text</a>, with the additional restriction that the
text must not contain the string "<code>]]></code>".<li>The string "<code>]]></code>".</ol>
<div class=example>
<p>CDATA sections can only be used in foreign content (MathML or SVG). In this example, a CDATA
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>
<pre>&lt;p>You can add a string to a number, but this stringifies the number:&lt;/p>
&lt;math>
&lt;ms>&lt;![CDATA[x&lt;y]]>&lt;/ms>
&lt;mo>+&lt;/mo>
&lt;mn>3&lt;/mn>
&lt;mo>=&lt;/mo>
&lt;ms>&lt;![CDATA[x&lt;y3]]>&lt;/ms>
&lt;/math></pre>
</div>
<h4 id=comments>12.1.6 Comments</h4>
<p><dfn id=syntax-comments>Comments</dfn> must start with the four character sequence U+003C
LESS-THAN SIGN, U+0021 EXCLAMATION MARK, U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS (<code>&lt;!--</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
a single U+003E GREATER-THAN SIGN character (>), nor start with a U+002D HYPHEN-MINUS character
(-) followed by a U+003E GREATER-THAN SIGN (>) character, nor contain two consecutive U+002D
HYPHEN-MINUS characters (<code>--</code>), nor end with a U+002D HYPHEN-MINUS character
(-). Finally, the comment must be ended by the three character sequence U+002D HYPHEN-MINUS,
U+002D HYPHEN-MINUS, U+003E GREATER-THAN SIGN (<code>--></code>).</p>
<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>
<p><i>This section only applies to user agents, data mining tools, and conformance
checkers.</i></p>
<p class=note>The rules for parsing XML documents into DOM trees are covered by the next
section, entitled "<a id=parsing:the-xhtml-syntax href=xhtml.html#the-xhtml-syntax>The XHTML syntax</a>".</p>
<p>User agents must use the parsing rules described in this section to generate the DOM trees from
<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
<dfn id=html-parser>HTML parser</dfn>.</p>
<div class=note>
<p>While the HTML syntax described in this specification bears a close resemblance to SGML and
XML, it is a separate language with its own parsing rules.</p>
<p>Some earlier versions of HTML (in particular from HTML2 to HTML4) were based on SGML and used
SGML parsing rules. However, few (if any) web browsers ever implemented true SGML parsing for
HTML documents; the only user agents to strictly handle HTML as an SGML application have
historically been validators. The resulting confusion — with validators claiming documents
to have one representation while widely deployed Web browsers interoperably implemented a
different representation — has wasted decades of productivity. This version of HTML thus
returns to a non-SGML basis.</p>
<p>Authors interested in using SGML tools in their authoring pipeline are encouraged to use XML
tools and the XML serialisation of HTML.</p>
</div>
<p>This specification defines the parsing rules for HTML documents, whether they are syntactically
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
processing rules described throughout this specification), but user agents, while parsing an HTML
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
error</a> that they encounter for which they do not wish to apply the rules described in this
specification.</p>
<p>Conformance checkers must report at least one parse error condition to the user if one or more
parse error conditions exist in the document and must not report parse error conditions if none
exist in the document. Conformance checkers may report more than one parse error condition if more
than one parse error condition exists in the document.</p>
<p class=note>Parse errors are only errors with the <em>syntax</em> of HTML. In addition to
checking for parse errors, conformance checkers will also verify that the document obeys all the
other conformance requirements described in this specification.</p>
<p>For the purposes of conformance checkers, if a resource is determined to be in <a href=#syntax id=parsing:syntax>the HTML
syntax</a>, then it is an <a href=infrastructure.html#html-documents id=parsing:html-documents>HTML document</a>.</p>
<p class=note>As stated <a href=infrastructure.html#html-elements id=parsing:html-elements class=no-backref>in the terminology
section</a>, references to <a href=infrastructure.html#element-type id=parsing:element-type>element types</a> that do not
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
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
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>.
Where possible, references to such elements are hyperlinked to their definition.</p>
<h4 id=overview-of-the-parsing-model>12.2.1 Overview of the parsing model</h4>
<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>
<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
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>
object.</p>
<p class=note>Implementations that <a href=infrastructure.html#non-scripted>do not support scripting</a> do not
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
still used as the model for the rest of the specification.</p>
<p>In the common case, the data handled by the tokenization stage comes from the network, but
<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
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>
<p id=nestedParsing>There is only one set of states for the tokenizer stage and the tree
construction stage, but the tree construction stage is reentrant, meaning that while the tree
construction stage is handling one token, the tokenizer might be resumed, causing further tokens
to be emitted and processed before the first token's processing is complete.</p>
<div class=example>
<p>In the following example, the tree construction stage will be called upon to handle a "p"
start tag token while handling the "script" end tag token:</p>
<pre>...
&lt;script>
document.write('&lt;p>');
&lt;/script>
...</pre>
</div>
<p>To handle these cases, parsers have a <dfn id=script-nesting-level>script nesting level</dfn>, which must be initially
set to zero, and a <dfn id=parser-pause-flag>parser pause flag</dfn>, which must be initially set to false.</p>
<h4 id=the-input-byte-stream>12.2.2 The <dfn>input byte stream</dfn></h4>
<p>The stream of Unicode code points that comprises the input to the tokenization stage will be
initially seen by the user agent as a stream of bytes (typically coming over the network or from
the local file system). The bytes encode the actual characters according to a particular
<i>character encoding</i>, which the user agent uses to decode the bytes into characters.</p>
<p class=note>For XML documents, the algorithm user agents are required to use to determine the
character encoding is given by the XML specification. This section does not apply to XML
documents. <a href=references.html#refsXML>[XML]</a></p>
<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
character encoding.</p>
<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
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
for that encoding's <a id=the-input-byte-stream:decoder href=infrastructure.html#decoder>decoder</a>.</p>
<p class=note>Bytes or sequences of bytes in the original byte stream that did not conform to
the Encoding standard (e.g. invalid UTF-8 byte sequences in a UTF-8 input byte stream) are errors
that conformance checkers are expected to report. <a href=references.html#refsENCODING>[ENCODING]</a></p>
<p class=note>Leading Byte Order Marks (BOMs) are not stripped by the decoder algorithms, they
are stripped by the algorithm below.</p>
<p class=warning>The decoder algorithms describe how to handle invalid input; for security
reasons, it is imperative that those rules be followed precisely. Differences in how invalid byte
sequences are handled can result in, amongst other problems, script injection vulnerabilities
("XSS").</p>
<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>,
<i>certain</i>, or <i>irrelevant</i>. The encoding used, and whether the confidence in that
encoding is <i>tentative</i> or <i>certain</i>, is <a href=#meta-charset-during-parse>used
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
necessary, e.g. because the parser is operating on a Unicode stream and doesn't have to use a
character encoding at all, then the <a href=#concept-encoding-confidence id=the-input-byte-stream:concept-encoding-confidence>confidence</a> is
<i>irrelevant</i>.</p>
<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
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>
<h5 id=parsing-with-a-known-character-encoding>12.2.2.1 Parsing with a known character encoding</h5>
<p>When the HTML parser is to operate on an input byte stream that has <dfn id=a-known-definite-encoding>a known definite
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>
<h5 id=determining-the-character-encoding>12.2.2.2 Determining the character encoding</h5>
<p>In some cases, it might be impractical to unambiguously determine the encoding before parsing
the document. Because of this, this specification provides for a two-pass mechanism with an
optional pre-scan. Implementations are allowed, as described below, to apply a simplified parsing
algorithm to whatever bytes they have available before beginning to parse the document. Then, the
real parser is started, using a tentative encoding derived from this pre-parse and other
out-of-band metadata. If, while the document is being loaded, the user agent discovers a character
encoding declaration that conflicts with this information, then the parser can get reinvoked to
perform a parse of the document with the real encoding.</p>
<p id=documentEncoding>User agents must use the following algorithm, called the <dfn id=encoding-sniffing-algorithm>encoding
sniffing algorithm</dfn>, to determine the character encoding to use when decoding a document in
the first pass. This algorithm takes as input any out-of-band metadata available to the user agent
(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
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
<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>
<ol><li>
<p>If the user has explicitly instructed the user agent to override the document's character
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>
<p class=note>Typically, user agents remember such user requests across sessions, and in some
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>
<li>
<p>The user agent may wait for more bytes of the resource to be available, either in this step
or at any later step in this algorithm. For instance, a user agent might wait 500ms or 1024
bytes, whichever came first. In general preparsing the source to find the encoding improves
performance, as it reduces the need to throw away the data structures used when parsing upon
finding the encoding information. However, if the user agent delays too long to obtain data to
determine the encoding, then the cost of the delay could outweigh any performance improvements
from the preparse.</p>
<p class=note>The authoring conformance requirements for character encoding declarations limit
them to only appearing <a href=semantics.html#charset1024>in the first 1024 bytes</a>. User agents are
therefore encouraged to use the prescan algorithm below (as invoked by these steps) on the first
1024 bytes, but not to stall beyond that.</p>
<li>
<p>For each of the rows in the following table, starting with the first one and going down, if
there are as many or more bytes available than the number of bytes in the first column, and the
first bytes of the file match the bytes given in the first column, then return the encoding
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>
<table><thead><tr><th>Bytes in Hexadecimal
<th>Encoding
<tbody><tr><td>FE FF
<td>Big-endian UTF-16
<tr><td>FF FE
<td>Little-endian UTF-16
<tr><td>EF BB BF
<td>UTF-8
</table>
<p class=note>This step looks for Unicode Byte Order Marks (BOMs).</p>
<p class=note>That this step happens before the next one honoring the HTTP
<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,
motivated by a desire to be maximally compatible with legacy content. <a href=references.html#refsHTTP>[HTTP]</a></p>
<li><p>If the transport layer specifies a character encoding, and it is supported, return that
encoding with the <a href=#concept-encoding-confidence id=determining-the-character-encoding:concept-encoding-confidence-4>confidence</a> <i>certain</i>, and
abort these steps.<li>
<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
stream to determine its encoding</a>. The <var>end condition</var> is that the user
agent decides that scanning further bytes would not be efficient. User agents are encouraged to
only prescan the first 1024 bytes. User agents may decide that scanning <em>any</em> bytes is
not efficient, in which case these substeps are entirely skipped.</p>
<p>The aforementioned algorithm either aborts unsuccessfully or returns a character encoding. If
it returns a character encoding, then this algorithm must be aborted, returning the same
encoding, with <a href=#concept-encoding-confidence id=determining-the-character-encoding:concept-encoding-confidence-5>confidence</a> <i>tentative</i>.</p>
<li>
<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
<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
substeps:</p>
<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
<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
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
<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
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
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>,
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
<a href=#encoding-sniffing-algorithm id=determining-the-character-encoding:encoding-sniffing-algorithm>encoding sniffing algorithm</a>'s steps.</ol>
<li><p>Otherwise, if the user agent has information on the likely encoding for this page, e.g.
based on the encoding of the page when it was last visited, then return that encoding, with the
<a href=#concept-encoding-confidence id=determining-the-character-encoding:concept-encoding-confidence-7>confidence</a> <i>tentative</i>, and abort these
steps.<li>
<p>The user agent may attempt to autodetect the character encoding from applying frequency
analysis or other algorithms to the data stream. Such algorithms may use information about the
resource other than the resource's contents, including the address of the resource. If
autodetection succeeds in determining a character encoding, and that encoding is a supported
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.
<a href=references.html#refsUNIVCHARDET>[UNIVCHARDET]</a></p>
<p class=note>User agents are generally discouraged from attempting to autodetect encodings
for resources obtained over the network, since doing so involves inherently non-interoperable
heuristics. Attempting to detect encodings based on an HTML document's preamble is especially
tricky since HTML markup typically uses only ASCII characters, and HTML documents tend to begin
with a lot of markup rather than with text content.</p>
<p class=note>The UTF-8 encoding has a highly detectable bit pattern. Files from the local
file system that contain bytes with values greater than 0x7F which match the UTF-8 pattern are
very likely to be UTF-8, while documents with byte sequences that do not match it are very
likely not. When a user agent can examine the whole file, rather than just the preamble,
detecting for UTF-8 specifically can be especially effective. <a href=references.html#refsPPUTF8>[PPUTF8]</a> <a href=references.html#refsUTF8DET>[UTF8DET]</a></p>
<li>
<p>Otherwise, return an implementation-defined or user-specified default character encoding,
with the <a href=#concept-encoding-confidence id=determining-the-character-encoding:concept-encoding-confidence-9>confidence</a> <i>tentative</i>.</p>
<p>In controlled environments or in environments where the encoding of documents can be
prescribed (for example, for user agents intended for dedicated use in new networks), the
comprehensive <code>UTF-8</code> encoding is suggested.</p>
<p>In other environments, the default encoding is typically dependent on the user's locale (an
approximation of the languages, and thus often encodings, of the pages that the user is likely
to frequent). The following table gives suggested defaults based on the user's locale, for
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>
<table><thead><tr><th colspan=2>Locale language
<th>Suggested default encoding
<tbody><tr><td>ar
<td>Arabic
<td>windows-1256
<tr><td>ba
<td>Bashkir
<td>windows-1251
<tr><td>be
<td>Belarusian
<td>windows-1251
<tr><td>bg
<td>Bulgarian
<td>windows-1251
<tr><td>cs
<td>Czech
<td>windows-1250
<tr><td>el
<td>Greek
<td>ISO-8859-7
<tr><td>et
<td>Estonian
<td>windows-1257
<tr><td>fa
<td>Persian
<td>windows-1256
<tr><td>he
<td>Hebrew
<td>windows-1255
<tr><td>hr
<td>Croatian
<td>windows-1250
<tr><td>hu
<td>Hungarian
<td>ISO-8859-2
<tr><td>ja
<td>Japanese
<td>Shift_JIS
<tr><td>kk
<td>Kazakh
<td>windows-1251
<tr><td>ko
<td>Korean
<td>euc-kr
<tr><td>ku
<td>Kurdish
<td>windows-1254
<tr><td>ky
<td>Kyrgyz
<td>windows-1251
<tr><td>lt
<td>Lithuanian
<td>windows-1257
<tr><td>lv
<td>Latvian
<td>windows-1257
<tr><td>mk
<td>Macedonian
<td>windows-1251
<tr><td>pl
<td>Polish
<td>ISO-8859-2
<tr><td>ru
<td>Russian
<td>windows-1251
<tr><td>sah
<td>Yakut
<td>windows-1251
<tr><td>sk
<td>Slovak
<td>windows-1250
<tr><td>sl
<td>Slovenian
<td>ISO-8859-2
<tr><td>sr
<td>Serbian
<td>windows-1251
<tr><td>tg
<td>Tajik
<td>windows-1251
<tr><td>th
<td>Thai
<td>windows-874
<tr><td>tr
<td>Turkish
<td>windows-1254
<tr><td>tt
<td>Tatar
<td>windows-1251
<tr><td>uk
<td>Ukrainian
<td>windows-1251
<tr><td>vi
<td>Vietnamese
<td>windows-1258
<tr><td>zh-CN
<td>Chinese (People's Republic of China)
<td>GB18030
<tr><td>zh-TW
<td>Chinese (Taiwan)
<td>Big5
<tr><td colspan=2>All other locales
<td>windows-1252
</table>
<p class=tablenote><small>The contents of this table are derived from the intersection of
Windows, Chrome, and Firefox defaults.</small></p>
</ol>
<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
from this algorithm, at the same time as the user agent uses the returned value to select the
decoder to use for the input byte stream.</p>
<hr>
<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
encoding</dfn>, given some defined <var>end condition</var>, then it must run the
following steps. These steps either abort unsuccessfully or return a character encoding. If at any
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
one) the user agent either runs out of bytes (meaning the <var>position</var> pointer
created in the first step below goes beyond the end of the byte stream obtained so far) or reaches
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
encoding</a> algorithm unsuccessfully.</p>
<ol><li>
<p>Let <var>position</var> be a pointer to a byte in the input byte stream, initially
pointing at the first byte.</p>
<li>
<p><i>Loop</i>: If <var>position</var> points to:</p>
<dl class=switch><dt>A sequence of bytes starting with: 0x3C 0x21 0x2D 0x2D (ASCII '&lt;!--')<dd>
<p>Advance the <var>position</var> pointer so that it points at the first 0x3E byte
which is preceded by two 0x2D bytes (i.e. at the end of an ASCII '-->' sequence) and comes
after the 0x3C byte that was found. (The two 0x2D bytes can be the same as the those in the
'&lt;!--' sequence.)</p>
<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 '&lt;meta' followed by a space or slash)<dd>
<ol><li><p>Advance the <var>position</var> pointer so that it points at the next 0x09,
0x0A, 0x0C, 0x0D, 0x20, or 0x2F byte (the one in sequence of characters matched
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
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
attribute</a> and its value. If no attribute was sniffed, then jump to the
<i>processing</i> step below.<li><p>If the attribute's name is already in <var>attribute list</var>, then return
to the step labeled <i>attributes</i>.</p>
<li><p>Add the attribute's name to <var>attribute list</var>.</p>
<li>
<p>Run the appropriate step from the following list, if one applies:</p>
<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
<code>meta</code> element</a>, giving the attribute's value as the string to parse. If a
character encoding is returned, and if <var>charset</var> is still set to null,
let <var>charset</var> be the encoding returned, and set <var>need
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>
from the attribute's value, and set <var>need pragma</var> to false.</dl>
<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
below labeled <i>next byte</i>.<li><p>If <var>need pragma</var> is true but <var>got pragma</var> is
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
<var>charset</var> to UTF-8.<li><p>If <var>charset</var> is the x-user-defined encoding, change the value of
<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
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,
returning the encoding given by <var>charset</var>.</ol>
<dt>A sequence of bytes starting with a 0x3C byte (ASCII &lt;), optionally a 0x2F byte (ASCII /), and finally a byte in the range 0x41-0x5A or 0x61-0x7A (an ASCII letter)<dd>
<ol><li><p>Advance the <var>position</var> pointer so that it points at the next 0x09
(ASCII TAB), 0x0A (ASCII LF), 0x0C (ASCII FF), 0x0D (ASCII CR), 0x20 (ASCII space), or 0x3E
(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>
until no further attributes can be found, then jump to the step below labeled <i>next
byte</i>.</ol>
<dt>A sequence of bytes starting with: 0x3C 0x21 (ASCII '&lt;!')<dt>A sequence of bytes starting with: 0x3C 0x2F (ASCII '&lt;/')<dt>A sequence of bytes starting with: 0x3C 0x3F (ASCII '&lt;?')<dd>
<p>Advance the <var>position</var> pointer so that it points at the first 0x3E byte
(ASCII >) that comes after the 0x3C byte that was found.</p>
<dt>Any other byte<dd>
<p>Do nothing with that byte.</p>
</dl>
<li><i>Next byte</i>: Move <var>position</var> so it points at the next byte in the
input byte stream, and return to the step above labeled <i>loop</i>.</ol>
<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>
<ol><li><p>If the byte at <var>position</var> is one of 0x09 (ASCII TAB), 0x0A (ASCII LF),
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
one.<li><p>Otherwise, the byte at <var>position</var> is the start of the attribute name.
Let <var>attribute name</var> and <var>attribute value</var> be the empty
string.<li><p>Process the byte at <var>position</var> as follows:</p>
<dl class=switch><dt>If it is 0x3D (ASCII =), and the <var>attribute name</var> is longer than the
empty string<dd>Advance <var>position</var> to the next byte and jump to the step below labeled
<i>value</i>.<dt>If it is 0x09 (ASCII TAB), 0x0A (ASCII LF), 0x0C (ASCII FF), 0x0D (ASCII CR), or 0x20
(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>
algorithm. The attribute's name is the value of <var>attribute name</var>, its value
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>
is the value of the byte at <var>position</var>). (This converts the input to
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
bytes outside the ASCII range are handled here, since only ASCII characters can contribute to
the detection of a character encoding.)</dl>
<li><p>Advance <var>position</var> to the next byte and return to the previous
step.<li><p><i>Spaces</i>: If the byte at <var>position</var> is one of 0x09 (ASCII TAB),
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
<a href=#concept-get-attributes-when-sniffing id=determining-the-character-encoding:concept-get-attributes-when-sniffing-6>get an attribute</a> algorithm. The
attribute's name is the value of <var>attribute name</var>, its value is the empty
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
(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>
<dl class=switch><dt>If it is 0x22 (ASCII ") or 0x27 (ASCII ')<dd>
<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
"get an attribute" algorithm. The attribute's name is the value of <var>attribute
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
(ASCII A) to 0x5A (ASCII Z), then append a Unicode character to <var>attribute
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
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>
<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>
algorithm. The attribute's name is the value of <var>attribute name</var>, its value
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>
<li><p>Process the byte at <var>position</var> as
follows:</p>
<dl class=switch><dt>If it is 0x09 (ASCII TAB), 0x0A (ASCII LF), 0x0C (ASCII FF), 0x0D (ASCII CR), 0x20 (ASCII
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>
algorithm. The attribute's name is the value of <var>attribute name</var> and its
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>
<li><p>Advance <var>position</var> to the next byte and return to the previous
step.</ol>
<p>For the sake of interoperability, user agents should not use a pre-scan algorithm that returns
different results than the one described above. (But, if you do, please at least let us know, so
that we can improve this algorithm and benefit everyone...)</p>
<h5 id=character-encodings>12.2.2.3 Character encodings</h5>
<p>User agents must support the encodings defined in the WHATWG Encoding standard. User agents
should not support other encodings.</p>
<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>
<p>Support for encodings based on EBCDIC is especially discouraged. This encoding is rarely used
for publicly-facing Web content. Support for UTF-32 is also especially discouraged. This encoding
is rarely used, and frequently implemented incorrectly.</p>
<p class=note>This specification does not make any attempt to support EBCDIC-based encodings and
UTF-32 in its algorithms; support and use of these encodings can thus lead to unexpected behavior
in implementations of this specification.</p>
<h5 id=changing-the-encoding-while-parsing>12.2.2.4 Changing the encoding while parsing</h5>
<p>When the parser requires the user agent to <dfn id=change-the-encoding>change the encoding</dfn>, it must run the
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
failed to find a character encoding, or if it found a character encoding that was not the actual
encoding of the file.</p>
<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
encoding</a>, then set the <a href=#concept-encoding-confidence id=changing-the-encoding-while-parsing:concept-encoding-confidence>confidence</a> to
<i>certain</i> and abort these steps. The new encoding is ignored; if it was anything but the
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
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.
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
sniffing algorithm</a> determined to be the encoding, and in the second pass through the
parser if the first pass found that the encoding sniffing algorithm described in the earlier
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
Unicode interpretations in both the current encoding and the new encoding, and if the user agent
supports changing the converter on the fly, then the user agent may change to the new converter
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
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
steps.<li><p>Otherwise, <a id=changing-the-encoding-while-parsing:navigate href=browsers.html#navigate>navigate</a> to the document again, with
<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
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
the new encoding and the <a href=#concept-encoding-confidence id=changing-the-encoding-while-parsing:concept-encoding-confidence-4>confidence</a> to
<i>certain</i>. Whenever possible, this should be done without actually contacting the network
layer (the bytes should be re-parsed from memory), even if, e.g., the document is marked as not
being cacheable. If this is not possible and contacting the network layer would involve repeating
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
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
encoding. The resource will be misinterpreted. User agents may notify the user of the situation,
to aid in application development.</ol>
<p class=note>This algorithm is only invoked when a new encoding is found declared on a
<code id=changing-the-encoding-while-parsing:the-meta-element><a href=semantics.html#the-meta-element>meta</a></code> element.</p>
<h5 id=preprocessing-the-input-stream>12.2.2.5 Preprocessing the input stream</h5>
<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
stream</a> is decoded or from the various APIs that directly manipulate the input stream.</p>
<p>One leading U+FEFF BYTE ORDER MARK character must be ignored if any are present in the
<a href=#input-stream id=preprocessing-the-input-stream:input-stream>input stream</a>.</p>
<p class=note>The requirement to strip a U+FEFF BYTE ORDER MARK character regardless of whether
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
Unicode, motivated by a desire to increase the resilience of user agents in the face of naïve
transcoders.</p>
<p>Any occurrences of any characters in the ranges U+0001 to U+0008, U+000E to U+001F,
U+007F to U+009F, U+FDD0 to U+FDEF, and
characters U+000B, U+FFFE, U+FFFF, U+1FFFE, U+1FFFF, U+2FFFE, U+2FFFF, U+3FFFE, U+3FFFF, U+4FFFE,
U+4FFFF, U+5FFFE, U+5FFFF, U+6FFFE, U+6FFFF, U+7FFFE, U+7FFFF, U+8FFFE, U+8FFFF, U+9FFFE, U+9FFFF,
U+AFFFE, U+AFFFF, U+BFFFE, U+BFFFF, U+CFFFE, U+CFFFF, U+DFFFE, U+DFFFF, U+EFFFE, U+EFFFF, U+FFFFE,
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
<a id=preprocessing-the-input-stream:control-characters href=infrastructure.html#control-characters>control characters</a> or permanently undefined Unicode characters (noncharacters).</p>
<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
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
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>
<p>U+000D CARRIAGE RETURN (CR) characters and U+000A LINE FEED (LF) characters are treated
specially. All CR characters must be converted to LF characters, and any LF characters that
immediately follow a CR character must be ignored. Thus, newlines in HTML DOMs are represented by
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>
stage.</p>
<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>
that has not yet been <dfn>consumed</dfn> or explicitly ignored by the requirements in
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
first character in the input. The <dfn id=current-input-character>current input character</dfn> is the last character to have
been <i>consumed</i>.</p>
<p>The <dfn id=insertion-point>insertion point</dfn> is the position (just before a character or just before the end
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
relative to the position of the character immediately after it, it is not an absolute offset into
the input stream. Initially, the insertion point is undefined.</p>
<p>The "EOF" character in the tables below is a conceptual character representing the end of the
<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
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
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
"EOF" character is not a real character in the stream, but rather the lack of any further
characters.</p>
<p class=note>The handling of U+0000 NULL characters varies based on where the characters are
found. In general, they are ignored except where doing so could plausibly introduce an attack
vector. This handling is, by necessity, spread across both the tokenization stage and the tree
construction stage.</p>
<h4 id=parse-state>12.2.3 Parse state</h4>
<h5 id=the-insertion-mode>12.2.3.1 The insertion mode</h5>
<p>The <dfn id=insertion-mode>insertion mode</dfn> is a state variable that controls the primary operation of the
tree construction stage.</p>
<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
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>",
"<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
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
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>",
"<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
after body</a>", and "<a href=#the-after-after-frameset-insertion-mode id=the-insertion-mode:the-after-after-frameset-insertion-mode>after after
frameset</a>" during the course of the parsing, as described in the <a href=#tree-construction id=the-insertion-mode:tree-construction>tree
construction</a> stage. The insertion mode affects how tokens are processed and whether CDATA
sections are supported.</p>
<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
table</a>", and "<a href=#parsing-main-inselect id=the-insertion-mode:parsing-main-inselect-2>in select</a>", are special, in
that the other modes defer to them at various times. When the algorithm below says that the user
agent is to do something "<dfn id=using-the-rules-for>using the rules for</dfn> the <var>m</var> insertion
mode", where <var>m</var> is one of these modes, the user agent must use the rules
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
the <a href=#insertion-mode id=the-insertion-mode:insertion-mode-3>insertion mode</a> unchanged unless the rules in <var>m</var> themselves
switch the <a href=#insertion-mode id=the-insertion-mode:insertion-mode-4>insertion mode</a> to a new value.</p>
<p>When the insertion mode is switched to "<a href=#parsing-main-incdata id=the-insertion-mode:parsing-main-incdata-2>text</a>" or
"<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
mode</dfn> is also set. This is the insertion mode to which the tree construction stage will
return.</p>
<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
modes</dfn> is used. It is initially empty. The <dfn id=current-template-insertion-mode>current template insertion mode</dfn> is the
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>.
The algorithms in the sections below will <i>push</i> insertion modes onto this stack, meaning
that the specified insertion mode is to be added to the stack, and <i>pop</i> insertion modes from
the stack, which means that the most recently added insertion mode must be removed from the
stack.</p>
<hr>
<p>When the steps below require the UA to <dfn id=reset-the-insertion-mode-appropriately>reset the insertion mode appropriately</dfn>, it
means the UA must follow these steps:</p>
<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
elements</a>.<li><p><i>Loop</i>: If <var>node</var> is the first node in the stack of open elements,
then set <var>last</var> to true, and, if the parser was originally created as part of
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>
element.<li>
<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>
<ol><li><p>If <var>last</var> is true, jump to the step below labeled
<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
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
<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
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
mode</a> to "<a href=#parsing-main-inselectintable id=the-insertion-mode:parsing-main-inselectintable-2>in select in table</a>" and
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>
<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
mode</a> to "<a href=#parsing-main-intr id=the-insertion-mode:parsing-main-intr-2>in row</a>" and abort these
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
<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
<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
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
<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
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
<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
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
<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
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
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
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
<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
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
<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
abort these steps. (<a href=#fragment-case id=the-insertion-mode:fragment-case-2>fragment case</a>)<li>
<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>
<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
<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>"
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
<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
abort these steps.</ol>
<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
case</a>)<li><p>Let <var>node</var> now be the node before <var>node</var> in the
<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>
<h5 id=the-stack-of-open-elements>12.2.3.2 The stack of open elements</h5>
<p>Initially, the <dfn id=stack-of-open-elements>stack of open elements</dfn> is empty. The stack grows downwards; the
topmost node on the stack is the first one added to the stack, and the bottommost node of the
stack is the most recently added node in the stack (notwithstanding when the stack is manipulated
in a random access fashion as part of <a href=#adoptionAgency>the handling for misnested
tags</a>).</p>
<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
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>
<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
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
"<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>
<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
gets popped off the stack when the parser <a href=#stop-parsing id=the-stack-of-open-elements:stop-parsing>finishes</a>.</p>
<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
elements</a>.</p>
<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>
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
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
node</a> is the <a href=#current-node id=the-stack-of-open-elements:current-node>current node</a>.</p>
<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>
<dl><dt><dfn id=special>Special</dfn><dd><p>The following elements have varying levels of special parsing rules: HTML's
<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>,
<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>,
<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>,
<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>,
<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>,
<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>,
<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>,
<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>,
<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>,
<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>,
<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>,
<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>,
<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>,
<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>,
<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>,
<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>,
<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>,
<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>,
<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>,
<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>,
<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
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>,
<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>,
<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
<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>
<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
list of element types <var>list</var> when the following algorithm terminates in a match
state:</p>
<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
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
elements</a> and return to step 2. (This will never fail, since the loop will always terminate
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
reached.)</ol>
<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
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
that element in the specific scope</a> consisting of the following element types:</p>
<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>
<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
element types:</p>
<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>
<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
types:</p>
<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>
<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
types:</p>
<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>
<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
<em>except</em> the following:</p>
<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>
<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>
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,
the stack is not changed in this situation. This can cause, amongst other strange effects, content
to be appended to nodes that are no longer in the DOM.</p>
<p class=note>In some cases (namely, when <a href=#adoptionAgency>closing misnested formatting
elements</a>), the stack is manipulated in a random-access fashion.</p>
<h5 id=the-list-of-active-formatting-elements>12.2.3.3 The list of active formatting elements</h5>
<p>Initially, the <dfn id=list-of-active-formatting-elements>list of active formatting elements</dfn> is empty. It is used to handle
mis-nested <a href=#formatting id=the-list-of-active-formatting-elements:formatting>formatting element tags</a>.</p>
<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>
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
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,
<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>
<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
with the token for which it was created, so that further elements can be created for that token if
necessary.</p>
<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
elements</dfn> an element <var>element</var>, the UA must perform the following
steps:</p>
<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>
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
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
name, namespace, and attributes as <var>element</var>, then remove the earliest such
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
attributes must be compared as they were when the elements were created by the parser; two
elements have the same attributes if all their parsed attributes can be paired such that the two
attributes in each pair have identical names, namespaces, and values (the order of the attributes
does not matter).</p>
<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
elements</a>.</ol>
<p>When the steps below require the UA to <dfn id=reconstruct-the-active-formatting-elements>reconstruct the active formatting elements</dfn>,
the UA must perform the following steps:</p>
<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
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
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
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
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
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
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
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
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
<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
elements</a> is not the last entry in the list, return to the step labeled
<i>advance</i>.</ol>
<p>This has the effect of reopening all the formatting elements that were opened in the current
body, cell, or caption (whichever is youngest) that haven't been explicitly closed.</p>
<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
elements</a> always consists of elements in chronological order with the least recently added
element first and the most recently added element last (except for while steps 8 to 11 of the
above algorithm are being executed, of course).</p>
<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
the last marker</dfn>, the UA must perform the following steps:</p>
<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
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
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>,
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>
<h5 id=the-element-pointers>12.2.3.4 The element pointers</h5>
<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>
<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
<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>
<p>The <a href=#form-element-pointer id=the-element-pointers:form-element-pointer><code>form</code> element pointer</a> points to the last
<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
make form controls associate with forms in the face of dramatically bad markup, for historical
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>
<h5 id=other-parsing-state-flags>12.2.3.5 Other parsing state flags</h5>
<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
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
parser was created, and "disabled" otherwise.</p>
<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
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>
elements don't execute in that case.</p>
<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
ok" after certain tokens are seen.</p>
<h4 id=tokenization>12.2.4 <dfn>Tokenization</dfn></h4>
<p>Implementations must act as if they used the following state machine to tokenise HTML. The
state machine must start in the <a href=#data-state id=tokenization:data-state>data state</a>. Most states consume a single character,
which may have various side-effects, and either switches the state machine to a new state to
<i>reconsume</i> the same character, or switches it to a new state to consume the next character,
or stays in the same state to consume the next character. Some states have more complicated
behavior and can consume several characters before switching to another state. In some cases, the
tokenizer state is also changed by the tree construction stage.</p>
<p>The exact behavior of certain states depends on the <a href=#insertion-mode id=tokenization:insertion-mode>insertion mode</a> and the
<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>
<p>The output of the tokenization step is a series of zero or more of the following tokens:
DOCTYPE, start tag, end tag, comment, character, end-of-file. DOCTYPE tokens have a name, a public
identifier, a system identifier, and a <dfn id=force-quirks-flag><i>force-quirks flag</i></dfn>. When a DOCTYPE token
is created, its name, public identifier, and system identifier must be marked as missing (which is
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
<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
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
list must be empty. Comment and character tokens have data.</p>
<p>When a token is emitted, it must immediately be handled by the <a href=#tree-construction id=tokenization:tree-construction>tree construction</a>
stage. The tree construction stage can affect the state of the tokenization stage, and can insert
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
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
into the stream being tokenized.)</p>
<p class=note>Creating a token and emitting it are distinct actions. It is possible for a token
to be created but implicitly abandoned (never emitted), e.g. if the file ends unexpectedly while
processing the characters that are being parsed into a start tag token.</p>
<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
<dfn id=acknowledge-self-closing-flag>acknowledged</dfn> when it is processed by the tree
construction stage, that is a <a href=#parse-error id=tokenization:parse-error>parse error</a>.</p>
<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>
<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
error</a>.</p>
<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
of the last start tag to have been emitted from this tokenizer, if any. If no start tag has been
emitted from this tokenizer, then no end tag token is appropriate.</p>
<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
flag</a>. If it is true, then the tokenizer must abort the processing of any nested invocations
of the tokenizer, yielding control back to the caller.</p>
<p>The tokenizer state machine consists of the states defined in the following subsections.</p>
<h5 id=data-state>12.2.4.1 <dfn>Data state</dfn></h5>
<p>Consume the <a href=#next-input-character id=data-state:next-input-character>next input character</a>:</p>
<dl class=switch><dt>U+0026 AMPERSAND (&amp;)<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 (&lt;)<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
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>
<h5 id=character-reference-in-data-state>12.2.4.2 <dfn>Character reference in data state</dfn></h5>
<p>Switch to the <a href=#data-state id=character-reference-in-data-state:data-state>data state</a>.</p>
<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
character</a>.</p>
<p>If nothing is returned, emit a U+0026 AMPERSAND character (&amp;) token.</p>
<p>Otherwise, emit the character tokens that were returned.</p>
<h5 id=rcdata-state>12.2.4.3 <dfn>RCDATA state</dfn></h5>
<p>Consume the <a href=#next-input-character id=rcdata-state:next-input-character>next input character</a>:</p>
<dl class=switch><dt>U+0026 AMPERSAND (&amp;)<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 (&lt;)<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>
<h5 id=character-reference-in-rcdata-state>12.2.4.4 <dfn>Character reference in RCDATA state</dfn></h5>
<p>Switch to the <a href=#rcdata-state id=character-reference-in-rcdata-state:rcdata-state>RCDATA state</a>.</p>
<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
character</a>.</p>
<p>If nothing is returned, emit a U+0026 AMPERSAND character (&amp;) token.</p>
<p>Otherwise, emit the character tokens that were returned.</p>
<h5 id=rawtext-state>12.2.4.5 <dfn>RAWTEXT state</dfn></h5>
<p>Consume the <a href=#next-input-character id=rawtext-state:next-input-character>next input character</a>:</p>
<dl class=switch><dt>U+003C LESS-THAN SIGN (&lt;)<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>
<h5 id=script-data-state>12.2.4.6 <dfn>Script data state</dfn></h5>
<p>Consume the <a href=#next-input-character id=script-data-state:next-input-character>next input character</a>:</p>
<dl class=switch><dt>U+003C LESS-THAN SIGN (&lt;)<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>
<h5 id=plaintext-state>12.2.4.7 <dfn>PLAINTEXT state</dfn></h5>
<p>Consume the <a href=#next-input-character id=plaintext-state:next-input-character>next input character</a>:</p>
<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>
<h5 id=tag-open-state>12.2.4.8 <dfn>Tag open state</dfn></h5>
<p>Consume the <a href=#next-input-character id=tag-open-state:next-input-character>next input character</a>:</p>
<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
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
name state</a>. (Don't emit the token yet; further details will be filled in before it is
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>,
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
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
character token. Reconsume the <a href=#current-input-character id=tag-open-state:current-input-character-3>current input character</a>.</dl>
<h5 id=end-tag-open-state>12.2.4.9 <dfn>End tag open state</dfn></h5>
<p>Consume the <a href=#next-input-character id=end-tag-open-state:next-input-character>next input character</a>:</p>
<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
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
name state</a>. (Don't emit the token yet; further details will be filled in before it is
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>,
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
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
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>
<h5 id=tag-name-state>12.2.4.10 <dfn>Tag name state</dfn></h5>
<p>Consume the <a href=#next-input-character id=tag-name-state:next-input-character>next input character</a>:</p>
<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
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
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
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>
<h5 id=rcdata-less-than-sign-state>12.2.4.11 <dfn>RCDATA less-than sign state</dfn></h5>
<p>Consume the <a href=#next-input-character id=rcdata-less-than-sign-state:next-input-character>next input character</a>:</p>
<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
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.
Reconsume the <a href=#current-input-character id=rcdata-less-than-sign-state:current-input-character>current input character</a>.</dl>
<h5 id=rcdata-end-tag-open-state>12.2.4.12 <dfn>RCDATA end tag open state</dfn></h5>
<p>Consume the <a href=#next-input-character id=rcdata-end-tag-open-state:next-input-character>next input character</a>:</p>
<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
<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
<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
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
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>.
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
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
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
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>
<h5 id=rcdata-end-tag-name-state>12.2.4.13 <dfn>RCDATA end tag name state</dfn></h5>
<p>Consume the <a href=#next-input-character id=rcdata-end-tag-name-state:next-input-character>next input character</a>:</p>
<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
<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
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
<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
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
<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
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
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
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
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
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
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).
Reconsume the <a href=#current-input-character id=rcdata-end-tag-name-state:current-input-character-5>current input character</a>.</dl>
<h5 id=rawtext-less-than-sign-state>12.2.4.14 <dfn>RAWTEXT less-than sign state</dfn></h5>
<p>Consume the <a href=#next-input-character id=rawtext-less-than-sign-state:next-input-character>next input character</a>:</p>
<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
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.
Reconsume the <a href=#current-input-character id=rawtext-less-than-sign-state:current-input-character>current input character</a>.</dl>
<h5 id=rawtext-end-tag-open-state>12.2.4.15 <dfn>RAWTEXT end tag open state</dfn></h5>
<p>Consume the <a href=#next-input-character id=rawtext-end-tag-open-state:next-input-character>next input character</a>:</p>
<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
<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
<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
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
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>.
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
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
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
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>
<h5 id=rawtext-end-tag-name-state>12.2.4.16 <dfn>RAWTEXT end tag name state</dfn></h5>
<p>Consume the <a href=#next-input-character id=rawtext-end-tag-name-state:next-input-character>next input character</a>:</p>
<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
<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
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
<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
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
<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
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
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
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
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
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
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).
Reconsume the <a href=#current-input-character id=rawtext-end-tag-name-state:current-input-character-5>current input character</a>.</dl>
<h5 id=script-data-less-than-sign-state>12.2.4.17 <dfn>Script data less-than sign state</dfn></h5>
<p>Consume the <a href=#next-input-character id=script-data-less-than-sign-state:next-input-character>next input character</a>:</p>
<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
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
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.
Reconsume the <a href=#current-input-character id=script-data-less-than-sign-state:current-input-character>current input character</a>.</dl>
<h5 id=script-data-end-tag-open-state>12.2.4.18 <dfn>Script data end tag open state</dfn></h5>
<p>Consume the <a href=#next-input-character id=script-data-end-tag-open-state:next-input-character>next input character</a>:</p>
<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
<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
<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
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
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>.
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
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
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
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>
<h5 id=script-data-end-tag-name-state>12.2.4.19 <dfn>Script data end tag name state</dfn></h5>
<p>Consume the <a href=#next-input-character id=script-data-end-tag-name-state:next-input-character>next input character</a>:</p>
<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
<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
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
<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
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
<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
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
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
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
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
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
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).
Reconsume the <a href=#current-input-character id=script-data-end-tag-name-state:current-input-character-5>current input character</a>.</dl>
<h5 id=script-data-escape-start-state>12.2.4.20 <dfn>Script data escape start state</dfn></h5>
<p>Consume the <a href=#next-input-character id=script-data-escape-start-state:next-input-character>next input character</a>:</p>
<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
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
character</a>.</dl>
<h5 id=script-data-escape-start-dash-state>12.2.4.21 <dfn>Script data escape start dash state</dfn></h5>
<p>Consume the <a href=#next-input-character id=script-data-escape-start-dash-state:next-input-character>next input character</a>:</p>
<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
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
character</a>.</dl>
<h5 id=script-data-escaped-state>12.2.4.22 <dfn>Script data escaped state</dfn></h5>
<p>Consume the <a href=#next-input-character id=script-data-escaped-state:next-input-character>next input character</a>:</p>
<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
character token.<dt>U+003C LESS-THAN SIGN (&lt;)<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
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>
<h5 id=script-data-escaped-dash-state>12.2.4.23 <dfn>Script data escaped dash state</dfn></h5>
<p>Consume the <a href=#next-input-character id=script-data-escaped-dash-state:next-input-character>next input character</a>:</p>
<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
character token.<dt>U+003C LESS-THAN SIGN (&lt;)<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
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
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
character</a> as a character token.</dl>
<h5 id=script-data-escaped-dash-dash-state>12.2.4.24 <dfn>Script data escaped dash dash state</dfn></h5>
<p>Consume the <a href=#next-input-character id=script-data-escaped-dash-dash-state:next-input-character>next input character</a>:</p>
<dl class=switch><dt>U+002D HYPHEN-MINUS (-)<dd>Emit a U+002D HYPHEN-MINUS character token.<dt>U+003C LESS-THAN SIGN (&lt;)<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
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
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
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
character</a> as a character token.</dl>
<h5 id=script-data-escaped-less-than-sign-state>12.2.4.25 <dfn>Script data escaped less-than sign state</dfn></h5>
<p>Consume the <a href=#next-input-character id=script-data-escaped-less-than-sign-state:next-input-character>next input character</a>:</p>
<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
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
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
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
data double escape start state</a>. Emit a U+003C LESS-THAN SIGN character token and the
<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
<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
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
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
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
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>
<h5 id=script-data-escaped-end-tag-open-state>12.2.4.26 <dfn>Script data escaped end tag open state</dfn></h5>
<p>Consume the <a href=#next-input-character id=script-data-escaped-end-tag-open-state:next-input-character>next input character</a>:</p>
<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
<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
<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
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
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>.
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
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
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
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
character</a>.</dl>
<h5 id=script-data-escaped-end-tag-name-state>12.2.4.27 <dfn>Script data escaped end tag name state</dfn></h5>
<p>Consume the <a href=#next-input-character id=script-data-escaped-end-tag-name-state:next-input-character>next input character</a>:</p>
<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
<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
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
<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
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
<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
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
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
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
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
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
token, a U+002F SOLIDUS character token, and a character token for each of the characters in the
<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
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>
<h5 id=script-data-double-escape-start-state>12.2.4.28 <dfn>Script data double escape start state</dfn></h5>
<p>Consume the <a href=#next-input-character id=script-data-double-escape-start-state:next-input-character>next input character</a>:</p>
<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>.
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
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
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
<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
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
character</a>.</dl>
<h5 id=script-data-double-escaped-state>12.2.4.29 <dfn>Script data double escaped state</dfn></h5>
<p>Consume the <a href=#next-input-character id=script-data-double-escaped-state:next-input-character>next input character</a>:</p>
<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
character token.<dt>U+003C LESS-THAN SIGN (&lt;)<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
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
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>
<h5 id=script-data-double-escaped-dash-state>12.2.4.30 <dfn>Script data double escaped dash state</dfn></h5>
<p>Consume the <a href=#next-input-character id=script-data-double-escaped-dash-state:next-input-character>next input character</a>:</p>
<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
HYPHEN-MINUS character token.<dt>U+003C LESS-THAN SIGN (&lt;)<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
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
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
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
character</a> as a character token.</dl>
<h5 id=script-data-double-escaped-dash-dash-state>12.2.4.31 <dfn>Script data double escaped dash dash state</dfn></h5>
<p>Consume the <a href=#next-input-character id=script-data-double-escaped-dash-dash-state:next-input-character>next input character</a>:</p>
<dl class=switch><dt>U+002D HYPHEN-MINUS (-)<dd>Emit a U+002D HYPHEN-MINUS character token.<dt>U+003C LESS-THAN SIGN (&lt;)<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
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
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
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
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
character</a> as a character token.</dl>
<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>
<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>
<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
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
input character</a>.</dl>
<h5 id=script-data-double-escape-end-state>12.2.4.33 <dfn>Script data double escape end state</dfn></h5>
<p>Consume the <a href=#next-input-character id=script-data-double-escape-end-state:next-input-character>next input character</a>:</p>
<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,
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
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
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
<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
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
input character</a>.</dl>
<h5 id=before-attribute-name-state>12.2.4.34 <dfn>Before attribute name state</dfn></h5>
<p>Consume the <a href=#next-input-character id=before-attribute-name-state:next-input-character>next input character</a>:</p>
<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
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),
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
attribute's name to a U+FFFD REPLACEMENT CHARACTER character, and its value to the empty string.
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 (&lt;)<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
character.<dt>Anything else<dd>Start a new attribute in the current tag token. Set that attribute's name to the
<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
<a href=#attribute-name-state id=before-attribute-name-state:attribute-name-state-3>attribute name state</a>.</dl>
<h5 id=attribute-name-state>12.2.4.35 <dfn>Attribute name state</dfn></h5>
<p>Consume the <a href=#next-input-character id=attribute-name-state:next-input-character>next input character</a>:</p>
<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
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
attribute's name.<dt>U+0022 QUOTATION MARK (")<dt>U+0027 APOSTROPHE (')<dt>U+003C LESS-THAN SIGN (&lt;)<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
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>
<p>When the user agent leaves the attribute name state (and before emitting the tag token, if
appropriate), the complete attribute's name must be compared to the other attributes on the same
token; if there is already an attribute on the token with the exact same name, then this is a
<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>
<p class=note>If an attribute is so removed from a token, it, and the value that gets associated
with it, if any, are never subsequently used by the parser, and are therefore effectively
discarded. Removing the attribute in this way does not change its status as the "current
attribute" for the purposes of the tokenizer, however.</p>
<h5 id=after-attribute-name-state>12.2.4.36 <dfn>After attribute name state</dfn></h5>
<p>Consume the <a href=#next-input-character id=after-attribute-name-state:next-input-character>next input character</a>:</p>
<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
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),
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
attribute's name to a U+FFFD REPLACEMENT CHARACTER character, and its value to the empty string.
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 (&lt;)<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
character.<dt>Anything else<dd>Start a new attribute in the current tag token. Set that attribute's name to the
<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
<a href=#attribute-name-state id=after-attribute-name-state:attribute-name-state-3>attribute name state</a>.</dl>
<h5 id=before-attribute-value-state>12.2.4.37 <dfn>Before attribute value state</dfn></h5>
<p>Consume the <a href=#next-input-character id=before-attribute-value-state:next-input-character>next input character</a>:</p>
<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 (&amp;)<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
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
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
token.<dt>U+003C LESS-THAN SIGN (&lt;)<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
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
the <a href=#attribute-value-(unquoted)-state id=before-attribute-value-state:attribute-value-(unquoted)-state-3>attribute value (unquoted) state</a>.</dl>
<h5 id=attribute-value-(double-quoted)-state>12.2.4.38 <dfn>Attribute value (double-quoted) state</dfn></h5>
<p>Consume the <a href=#next-input-character id=attribute-value-(double-quoted)-state:next-input-character>next input character</a>:</p>
<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 (&amp;)<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
<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
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
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>
<h5 id=attribute-value-(single-quoted)-state>12.2.4.39 <dfn>Attribute value (single-quoted) state</dfn></h5>
<p>Consume the <a href=#next-input-character id=attribute-value-(single-quoted)-state:next-input-character>next input character</a>:</p>
<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 (&amp;)<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
<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
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
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>
<h5 id=attribute-value-(unquoted)-state>12.2.4.40 <dfn>Attribute value (unquoted) state</dfn></h5>
<p>Consume the <a href=#next-input-character id=attribute-value-(unquoted)-state:next-input-character>next input character</a>:</p>
<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 (&amp;)<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
<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
attribute's value.<dt>U+0022 QUOTATION MARK (")<dt>U+0027 APOSTROPHE (')<dt>U+003C LESS-THAN SIGN (&lt;)<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
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>
<h5 id=character-reference-in-attribute-value-state>12.2.4.41 <dfn>Character reference in attribute value state</dfn></h5>
<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>
<p>If nothing is returned, append a U+0026 AMPERSAND character (&amp;) to the current attribute's
value.</p>
<p>Otherwise, append the returned character tokens to the current attribute's value.</p>
<p>Finally, switch back to the attribute value state that switched into this state.</p>
<h5 id=after-attribute-value-(quoted)-state>12.2.4.42 <dfn>After attribute value (quoted) state</dfn></h5>
<p>Consume the <a href=#next-input-character id=after-attribute-value-(quoted)-state:next-input-character>next input character</a>:</p>
<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
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
the character.</dl>
<h5 id=self-closing-start-tag-state>12.2.4.43 <dfn>Self-closing start tag state</dfn></h5>
<p>Consume the <a href=#next-input-character id=self-closing-start-tag-state:next-input-character>next input character</a>:</p>
<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
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
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
the character.</dl>
<h5 id=bogus-comment-state>12.2.4.44 <dfn>Bogus comment state</dfn></h5>
<p>Consume every character up to and including the first U+003E GREATER-THAN SIGN character (>)
or the end of the file (EOF), whichever comes first.
If more than one character was consumed, then emit a comment token whose data is the
concatenation of all the characters starting from and including the character that caused the
state machine to switch into the bogus comment state, up to and including the character
immediately before the last consumed character (i.e. up to the character just before the U+003E or
EOF character), but with any U+0000 NULL characters replaced by U+FFFD REPLACEMENT CHARACTER
characters. (If the comment was started by the end of the file (EOF), the token is empty.
Similarly, the token is empty if it was generated by the string "<code>&lt;!></code>".)</p>
<p>Switch to the <a href=#data-state id=bogus-comment-state:data-state>data state</a>.</p>
<p>If the end of the file was reached, reconsume the EOF character.</p>
<h5 id=markup-declaration-open-state>12.2.4.45 <dfn>Markup declaration open state</dfn></h5>
<p>If the next two characters are both U+002D HYPHEN-MINUS characters (-), consume those two
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
start state</a>.</p>
<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
the word "DOCTYPE", then consume those characters and switch to the <a href=#doctype-state id=markup-declaration-open-state:doctype-state>DOCTYPE
state</a>.</p>
<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
<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
for the string "[CDATA[" (the five uppercase letters "CDATA" with a U+005B LEFT SQUARE BRACKET
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
state</a>.</p>
<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>.
The next character that is consumed, if any, is the first character that will be in the
comment.</p>
<h5 id=comment-start-state>12.2.4.46 <dfn>Comment start state</dfn></h5>
<p>Consume the <a href=#next-input-character id=comment-start-state:next-input-character>next input character</a>:</p>
<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
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.
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
<a href=#comment-state id=comment-start-state:comment-state-2>comment state</a>.</dl>
<h5 id=comment-start-dash-state>12.2.4.47 <dfn>Comment start dash state</dfn></h5>
<p>Consume the <a href=#next-input-character id=comment-start-dash-state:next-input-character>next input character</a>:</p>
<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
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.
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
the comment token's data. Switch to the <a href=#comment-state id=comment-start-dash-state:comment-state-2>comment state</a>.</dl>
<h5 id=comment-state>12.2.4.48 <dfn id=comment>Comment state</dfn></h5>
<p>Consume the <a href=#next-input-character id=comment-state:next-input-character>next input character</a>:</p>
<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
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.
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>
<h5 id=comment-end-dash-state>12.2.4.49 <dfn>Comment end dash state</dfn></h5>
<p>Consume the <a href=#next-input-character id=comment-end-dash-state:next-input-character>next input character</a>:</p>
<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
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.
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
the comment token's data. Switch to the <a href=#comment-state id=comment-end-dash-state:comment-state-2>comment state</a>.</dl>
<h5 id=comment-end-state>12.2.4.50 <dfn>Comment end state</dfn></h5>
<p>Consume the <a href=#next-input-character id=comment-end-state:next-input-character>next input character</a>:</p>
<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
REPLACEMENT CHARACTER character to the comment token's data. Switch to the <a href=#comment-state id=comment-end-state:comment-state>comment
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
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.
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
input character</a> to the comment token's data. Switch to the <a href=#comment-state id=comment-end-state:comment-state-2>comment
state</a>.</dl>
<h5 id=comment-end-bang-state>12.2.4.51 <dfn>Comment end bang state</dfn></h5>
<p>Consume the <a href=#next-input-character id=comment-end-bang-state:next-input-character>next input character</a>:</p>
<dl class=switch><dt>U+002D HYPHEN-MINUS (-)<dd>Append two U+002D HYPHEN-MINUS characters (-) and a U+0021 EXCLAMATION MARK character (!) to
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
MARK character (!), and a U+FFFD REPLACEMENT CHARACTER character to the comment token's data.
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.
Reconsume the EOF character.<dt>Anything else<dd>Append two U+002D HYPHEN-MINUS characters (-), a U+0021 EXCLAMATION MARK character (!), and
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
state</a>.</dl>
<h5 id=doctype-state>12.2.4.52 <dfn>DOCTYPE state</dfn></h5>
<p>Consume the <a href=#next-input-character id=doctype-state:next-input-character>next input character</a>:</p>
<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.
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
character.</dl>
<h5 id=before-doctype-name-state>12.2.4.53 <dfn>Before DOCTYPE name state</dfn></h5>
<p>Consume the <a href=#next-input-character id=before-doctype-name-state:next-input-character>next input character</a>:</p>
<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
<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
<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
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
<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.
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>.
Switch to the <a href=#doctype-name-state id=before-doctype-name-state:doctype-name-state-3>DOCTYPE name state</a>.</dl>
<h5 id=doctype-name-state>12.2.4.54 <dfn>DOCTYPE name state</dfn></h5>
<p>Consume the <a href=#next-input-character id=doctype-name-state:next-input-character>next input character</a>:</p>
<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
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
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
<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>
<h5 id=after-doctype-name-state>12.2.4.55 <dfn>After DOCTYPE name state</dfn></h5>
<p>Consume the <a href=#next-input-character id=after-doctype-name-state:next-input-character>next input character</a>:</p>
<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
<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>
<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
<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
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>
<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
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
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>
<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>
</dl>
<h5 id=after-doctype-public-keyword-state>12.2.4.56 <dfn>After DOCTYPE public keyword state</dfn></h5>
<p>Consume the <a href=#next-input-character id=after-doctype-public-keyword-state:next-input-character>next input character</a>:</p>
<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
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
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>.
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
<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>.
Switch to the <a href=#bogus-doctype-state id=after-doctype-public-keyword-state:bogus-doctype-state>bogus DOCTYPE state</a>.</dl>
<h5 id=before-doctype-public-identifier-state>12.2.4.57 <dfn>Before DOCTYPE public identifier state</dfn></h5>
<p>Consume the <a href=#next-input-character id=before-doctype-public-identifier-state:next-input-character>next input character</a>:</p>
<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
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
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>.
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
<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>.
Switch to the <a href=#bogus-doctype-state id=before-doctype-public-identifier-state:bogus-doctype-state>bogus DOCTYPE state</a>.</dl>
<h5 id=doctype-public-identifier-(double-quoted)-state>12.2.4.58 <dfn>DOCTYPE public identifier (double-quoted) state</dfn></h5>
<p>Consume the <a href=#next-input-character id=doctype-public-identifier-(double-quoted)-state:next-input-character>next input character</a>:</p>
<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
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>.
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
<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
identifier.</dl>
<h5 id=doctype-public-identifier-(single-quoted)-state>12.2.4.59 <dfn>DOCTYPE public identifier (single-quoted) state</dfn></h5>
<p>Consume the <a href=#next-input-character id=doctype-public-identifier-(single-quoted)-state:next-input-character>next input character</a>:</p>
<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
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>.
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
<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
identifier.</dl>
<h5 id=after-doctype-public-identifier-state>12.2.4.60 <dfn>After DOCTYPE public identifier state</dfn></h5>
<p>Consume the <a href=#next-input-character id=after-doctype-public-identifier-state:next-input-character>next input character</a>:</p>
<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
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
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
<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>.
Switch to the <a href=#bogus-doctype-state id=after-doctype-public-identifier-state:bogus-doctype-state>bogus DOCTYPE state</a>.</dl>
<h5 id=between-doctype-public-and-system-identifiers-state>12.2.4.61 <dfn>Between DOCTYPE public and system identifiers state</dfn></h5>
<p>Consume the <a href=#next-input-character id=between-doctype-public-and-system-identifiers-state:next-input-character>next input character</a>:</p>
<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
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
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
<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>.
Switch to the <a href=#bogus-doctype-state id=between-doctype-public-and-system-identifiers-state:bogus-doctype-state>bogus DOCTYPE state</a>.</dl>
<h5 id=after-doctype-system-keyword-state>12.2.4.62 <dfn>After DOCTYPE system keyword state</dfn></h5>
<p>Consume the <a href=#next-input-character id=after-doctype-system-keyword-state:next-input-character>next input character</a>:</p>
<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
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
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>.
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
<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>.
Switch to the <a href=#bogus-doctype-state id=after-doctype-system-keyword-state:bogus-doctype-state>bogus DOCTYPE state</a>.</dl>
<h5 id=before-doctype-system-identifier-state>12.2.4.63 <dfn>Before DOCTYPE system identifier state</dfn></h5>
<p>Consume the <a href=#next-input-character id=before-doctype-system-identifier-state:next-input-character>next input character</a>:</p>
<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
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
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>.
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
<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>.
Switch to the <a href=#bogus-doctype-state id=before-doctype-system-identifier-state:bogus-doctype-state>bogus DOCTYPE state</a>.</dl>
<h5 id=doctype-system-identifier-(double-quoted)-state>12.2.4.64 <dfn>DOCTYPE system identifier (double-quoted) state</dfn></h5>
<p>Consume the <a href=#next-input-character id=doctype-system-identifier-(double-quoted)-state:next-input-character>next input character</a>:</p>
<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
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>.
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
<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
identifier.</dl>
<h5 id=doctype-system-identifier-(single-quoted)-state>12.2.4.65 <dfn>DOCTYPE system identifier (single-quoted) state</dfn></h5>
<p>Consume the <a href=#next-input-character id=doctype-system-identifier-(single-quoted)-state:next-input-character>next input character</a>:</p>
<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
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>.
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
<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
identifier.</dl>
<h5 id=after-doctype-system-identifier-state>12.2.4.66 <dfn>After DOCTYPE system identifier state</dfn></h5>
<p>Consume the <a href=#next-input-character id=after-doctype-system-identifier-state:next-input-character>next input character</a>:</p>
<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
<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
<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>
<h5 id=bogus-doctype-state>12.2.4.67 <dfn>Bogus DOCTYPE state</dfn></h5>
<p>Consume the <a href=#next-input-character id=bogus-doctype-state:next-input-character>next input character</a>:</p>
<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
character.<dt>Anything else<dd>Ignore the character.</dl>
<h5 id=cdata-section-state>12.2.4.68 <dfn>CDATA section state</dfn></h5>
<p>Switch to the <a href=#data-state id=cdata-section-state:data-state>data state</a>.</p>
<p>Consume every character up to the next occurrence of the three character sequence U+005D RIGHT
SQUARE BRACKET U+005D RIGHT SQUARE BRACKET U+003E GREATER-THAN SIGN (<code>]]></code>),
or the end of the file (EOF), whichever comes first. Emit a series of character tokens consisting
of all the characters consumed except the matching three character sequence at the end (if one was
found before the end of the file).</p>
<p>If the end of the file was reached, reconsume the EOF character.</p>
<h5 id=tokenizing-character-references>12.2.4.69 Tokenizing character references</h5>
<p>This section defines how to <dfn id=consume-a-character-reference>consume a character reference</dfn>, optionally with an
<dfn id=additional-allowed-character>additional allowed character</dfn>, which, if specified where the algorithm is invoked, adds
a character to the list of characters that cause there to not be a character reference.</p>
<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
attributes</a>.</p>
<p>The behavior depends on the identity of the next character (the one immediately after the
U+0026 AMPERSAND character), as follows:</p>
<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
an error, either.)<dt>U+0023 NUMBER SIGN (#)<dd>
<p>Consume the U+0023 NUMBER SIGN.</p>
<p>The behavior further depends on the character after the U+0023 NUMBER SIGN:</p>
<dl class=switch><dt>U+0078 LATIN SMALL LETTER X<dt>U+0058 LATIN CAPITAL LETTER X<dd>
<p>Consume the X.</p>
<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>
<p>When it comes to interpreting the number, interpret it as a hexadecimal number.</p>
<dt>Anything else<dd>
<p>Follow the steps below, but using <a id=tokenizing-character-references:ascii-digits href=infrastructure.html#ascii-digits>ASCII digits</a>.</p>
<p>When it comes to interpreting the number, interpret it as a decimal number.</p>
</dl>
<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
digits</a> or <a id=tokenizing-character-references:ascii-digits-2 href=infrastructure.html#ascii-digits>ASCII digits</a>).</p>
<p>If no characters match the range, then don't consume any characters (and unconsume the U+0023
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>;
nothing is returned.</p>
<p>Otherwise, if the next character is a U+003B SEMICOLON, consume that too. If it isn't, there
is a <a href=#parse-error id=tokenizing-character-references:parse-error-2>parse error</a>.</p>
<p>If one or more characters match the range, then take them all and interpret the string of
characters as a number (either hexadecimal or decimal as appropriate).</p>
<p>If that number is one of the numbers in the first column of the following table, then this is
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
character token for the Unicode character given in the second column of that row.</p>
<table id=table-charref-overrides><thead><tr><th>Number <th colspan=2>Unicode character
<tbody><tr><td>0x00 <td>U+FFFD <td>REPLACEMENT CHARACTER
<tr><td>0x80 <td>U+20AC <td>EURO SIGN (€)
<tr><td>0x82 <td>U+201A <td>SINGLE LOW-9 QUOTATION MARK (‚)
<tr><td>0x83 <td>U+0192 <td>LATIN SMALL LETTER F WITH HOOK (ƒ)
<tr><td>0x84 <td>U+201E <td>DOUBLE LOW-9 QUOTATION MARK („)
<tr><td>0x85 <td>U+2026 <td>HORIZONTAL ELLIPSIS (…)
<tr><td>0x86 <td>U+2020 <td>DAGGER (†)
<tr><td>0x87 <td>U+2021 <td>DOUBLE DAGGER (‡)
<tr><td>0x88 <td>U+02C6 <td>MODIFIER LETTER CIRCUMFLEX ACCENT (ˆ)
<tr><td>0x89 <td>U+2030 <td>PER MILLE SIGN (‰)
<tr><td>0x8A <td>U+0160 <td>LATIN CAPITAL LETTER S WITH CARON (Š)
<tr><td>0x8B <td>U+2039 <td>SINGLE LEFT-POINTING ANGLE QUOTATION MARK (‹)
<tr><td>0x8C <td>U+0152 <td>LATIN CAPITAL LIGATURE OE (Œ)
<tr><td>0x8E <td>U+017D <td>LATIN CAPITAL LETTER Z WITH CARON (Ž)
<tr><td>0x91 <td>U+2018 <td>LEFT SINGLE QUOTATION MARK (‘)
<tr><td>0x92 <td>U+2019 <td>RIGHT SINGLE QUOTATION MARK (’)
<tr><td>0x93 <td>U+201C <td>LEFT DOUBLE QUOTATION MARK (“)
<tr><td>0x94 <td>U+201D <td>RIGHT DOUBLE QUOTATION MARK (”)
<tr><td>0x95 <td>U+2022 <td>BULLET (•)
<tr><td>0x96 <td>U+2013 <td>EN DASH (–)
<tr><td>0x97 <td>U+2014 <td>EM DASH (—)
<tr><td>0x98 <td>U+02DC <td>SMALL TILDE (˜)
<tr><td>0x99 <td>U+2122 <td>TRADE MARK SIGN (™)
<tr><td>0x9A <td>U+0161 <td>LATIN SMALL LETTER S WITH CARON (š)
<tr><td>0x9B <td>U+203A <td>SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (›)
<tr><td>0x9C <td>U+0153 <td>LATIN SMALL LIGATURE OE (œ)
<tr><td>0x9E <td>U+017E <td>LATIN SMALL LETTER Z WITH CARON (ž)
<tr><td>0x9F <td>U+0178 <td>LATIN CAPITAL LETTER Y WITH DIAERESIS (Ÿ)
</table>
<p>Otherwise, if the number is in the range 0xD800 to 0xDFFF or is greater
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
character token.</p>
<p>Otherwise, return a character token for the Unicode character whose code point is that
number.
Additionally, if the number is in the range 0x0001 to 0x0008, 0x000D to 0x001F, 0x007F to 0x009F, 0xFDD0 to 0xFDEF, or is
one of 0x000B, 0xFFFE, 0xFFFF, 0x1FFFE, 0x1FFFF, 0x2FFFE, 0x2FFFF, 0x3FFFE, 0x3FFFF, 0x4FFFE,
0x4FFFF, 0x5FFFE, 0x5FFFF, 0x6FFFE, 0x6FFFF, 0x7FFFE, 0x7FFFF, 0x8FFFE, 0x8FFFF, 0x9FFFE,
0x9FFFF, 0xAFFFE, 0xAFFFF, 0xBFFFE, 0xBFFFF, 0xCFFFE, 0xCFFFF, 0xDFFFE, 0xDFFFF, 0xEFFFE,
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>
<dt>Anything else<dd>
<p>Consume the maximum number of characters possible, with the consumed characters matching one
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
a <a id=tokenizing-character-references:case-sensitive href=infrastructure.html#case-sensitive>case-sensitive</a> manner).</p>
<p>If no match can be made, then no characters are consumed, and nothing is returned. In this
case, if the characters after the U+0026 AMPERSAND character (&amp;) consist of a sequence of
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
(;), then this is a <a href=#parse-error id=tokenizing-character-references:parse-error-6>parse error</a>.</p>
<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
SEMICOLON character (;), and the next character is either a U+003D EQUALS SIGN character (=) or
an <a href=infrastructure.html#alphanumeric-ascii-characters id=tokenizing-character-references:alphanumeric-ascii-characters-2>alphanumeric ASCII character</a>, then, for
historical reasons, all the characters that were matched after the U+0026 AMPERSAND character
(&amp;) must be unconsumed, and nothing is returned.
However, if this next character is in fact a U+003D EQUALS SIGN character (=), then this is a
<a href=#parse-error id=tokenizing-character-references:parse-error-7>parse error</a>, because some legacy user agents will
misinterpret the markup in those cases.</p>
<p>Otherwise, a character reference is parsed. If the last character matched is not a U+003B
SEMICOLON character (;), there is a <a href=#parse-error id=tokenizing-character-references:parse-error-8>parse error</a>.</p>
<p>Return one or two character tokens for the character(s) corresponding to the character
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>
table).</p>
<div class=example>
<p>If the markup contains (not in an attribute) the string <code>I'm &amp;notit; I
tell you</code>, the character reference is parsed as "not", as in, <code>I'm ¬it;
I tell you</code> (and this is a parse error). But if the markup was <code>I'm
&amp;notin; I tell you</code>, the character reference would be parsed as "notin;", resulting
in <code>I'm ∉ I tell you</code> (and no parse error).</p>
</div>
</dl>
<h4 id=tree-construction>12.2.5 <dfn>Tree construction</dfn></h4>
<p>The input to the tree construction stage is a sequence of tokens from the
<a href=#tokenization id=tree-construction:tokenization>tokenization</a> stage. The tree construction stage is associated with a DOM
<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
dynamically modifying or extending that document's DOM tree.</p>
<p>This specification does not define when an interactive user agent has to render the
<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
input.</p>
<hr>
<p>As each token is emitted from the tokenizer, the user agent must follow the appropriate steps
from the following list, known as the <dfn id=tree-construction-dispatcher>tree construction dispatcher</dfn>:</p>
<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
<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>
<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
construction dispatcher</a> (even if the token is subsequently just ignored).</p>
<p>A node is a <dfn id=mathml-text-integration-point>MathML text integration point</dfn> if it is one of the following
elements:</p>
<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>
<p>A node is an <dfn id=html-integration-point>HTML integration point</dfn> if it is one of the following elements:</p>
<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
namespace</a> whose start tag token had an attribute with the name "encoding" whose value was
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
namespace</a> whose start tag token had an attribute with the name "encoding" whose value was
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>
<p class=note>Not all of the tag names mentioned below are conformant tag names in this
specification; many are included to handle legacy content. They still form part of the algorithm
that implementations are required to implement to claim conformance.</p>
<p class=note>The algorithm described below places no limit on the depth of the DOM tree
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>
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
depth constraints.</p>
<h5 id=creating-and-inserting-nodes>12.2.5.1 Creating and inserting nodes</h5>
<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>
<p>The <dfn id=appropriate-place-for-inserting-a-node>appropriate place for inserting a node</dfn>, optionally using a particular
<i>override target</i>, is the position in an element returned by running the following steps:</p>
<ol><li>
<p>If there was an <i>override target</i> specified, then let <var>target</var> be the
<i>override target</i>.</p>
<p>Otherwise, let <var>target</var> be the <a href=#current-node id=creating-and-inserting-nodes:current-node>current node</a>.</p>
<li>
<p>Determine the <var>adjusted insertion location</var> using the first matching steps
from the following list:</p>
<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>,
<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>
<p class=note>Foster parenting happens when content is misnested in tables.</p>
<p>Run these substeps:</p>
<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
<a href=#stack-of-open-elements id=creating-and-inserting-nodes:stack-of-open-elements>stack of open elements</a>, if any.</p>
<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
<a href=#stack-of-open-elements id=creating-and-inserting-nodes:stack-of-open-elements-2>stack of open elements</a>, if any.</p>
<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
(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
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),
and abort these substeps.<li><p>If there is no <var>last table</var>, then let <var>adjusted insertion
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
<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.
(<a href=#fragment-case id=creating-and-inserting-nodes:fragment-case>fragment case</a>)</p>
<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
node, immediately before <var>last table</var>, and abort these
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
element</var>, after its last child (if any).</ol>
<p class=note>These steps are involved in part because it's possible for elements, the
<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
in the DOM, or indeed removed from the DOM entirely, after the element was inserted by the
parser.</p>
<dt>Otherwise<dd>
<p>Let <var>adjusted insertion location</var> be inside <var>target</var>,
after its last child (if any).</p>
</dl>
<li>
<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>
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
contents</a>, after its last child (if any).</p>
<li>
<p>Return the <var>adjusted insertion location</var>.</p>
</ol>
<hr>
<p>When the steps below require the UA to <dfn id=create-an-element-for-the-token>create an
element for a token</dfn> in a particular <var>given namespace</var> and with a
particular <var>intended parent</var>, the UA must run the following steps:</p>
<ol><li>
<p>Create a node implementing the interface appropriate for the element type corresponding to
the tag name of the token in <var>given namespace</var> (as given in the specification
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
namespace</a>, this specification defines it to be the <code id=creating-and-inserting-nodes:htmlanchorelement><a href=semantics.html#htmlanchorelement>HTMLAnchorElement</a></code>
interface), with the tag name being the name of that element, with the node being in the given
namespace, and with the attributes on the node being those given in the given token.</p>
<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
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
<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
that namespace's specification must use the interface <code id=creating-and-inserting-nodes:element><a href=infrastructure.html#element>Element</a></code>.</p>
<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
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>
<li><p>If the newly created element has an <code>xmlns</code> attribute <em>in the
<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,
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
<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>,
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
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>
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
<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
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
<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
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
the parser subsequently attempts to insert the element.<li><p>Return the newly created element.</ol>
<hr>
<p>When the steps below require the user agent to <dfn id=insert-a-foreign-element>insert a foreign element</dfn> for a token
in a given namespace, the user agent must run these steps:</p>
<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
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
parent being the element in which the <var>adjusted insertion location</var> finds
itself.<li>
<p>If it is possible to insert an element at the <var>adjusted insertion
location</var>, then insert the newly created element at the <var>adjusted insertion
location</var>.</p>
<p class=note>If the <var>adjusted insertion location</var> cannot accept more
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
newly created element is dropped on the floor.</p>
<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
<a href=#current-node id=creating-and-inserting-nodes:current-node-2>current node</a>.<li><p>Return the newly created element.</ol>
<p>When the steps below require the user agent to <dfn id=insert-an-html-element>insert an HTML element</dfn> for a token,
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
namespace</a>.</p>
<hr>
<p>When the steps below require the user agent to <dfn id=adjust-mathml-attributes>adjust MathML attributes</dfn> for a token,
then, if the token has an attribute named <code>definitionurl</code>, change its name to
<code>definitionURL</code> (note the case difference).</p>
<p>When the steps below require the user agent to <dfn id=adjust-svg-attributes>adjust SVG attributes</dfn> for a token,
then, for each attribute on the token whose attribute name is one of the ones in the first column
of the following table, change the attribute's name to the name given in the corresponding cell in
the second column. (This fixes the case of SVG attributes that are not all lowercase.)</p>
<table><thead><tr><th> Attribute name on token <th> Attribute name on element
<tbody><tr><td> <code>attributename</code> <td> <code>attributeName</code>
<tr><td> <code>attributetype</code> <td> <code>attributeType</code>
<tr><td> <code>basefrequency</code> <td> <code>baseFrequency</code>
<tr><td> <code>baseprofile</code> <td> <code>baseProfile</code>
<tr><td> <code>calcmode</code> <td> <code>calcMode</code>
<tr><td> <code>clippathunits</code> <td> <code>clipPathUnits</code>
<tr><td> <code>diffuseconstant</code> <td> <code>diffuseConstant</code>
<tr><td> <code>edgemode</code> <td> <code>edgeMode</code>
<tr><td> <code>filterunits</code> <td> <code>filterUnits</code>
<tr><td> <code>glyphref</code> <td> <code>glyphRef</code>
<tr><td> <code>gradienttransform</code> <td> <code>gradientTransform</code>
<tr><td> <code>gradientunits</code> <td> <code>gradientUnits</code>
<tr><td> <code>kernelmatrix</code> <td> <code>kernelMatrix</code>
<tr><td> <code>kernelunitlength</code> <td> <code>kernelUnitLength</code>
<tr><td> <code>keypoints</code> <td> <code>keyPoints</code>
<tr><td> <code>keysplines</code> <td> <code>keySplines</code>
<tr><td> <code>keytimes</code> <td> <code>keyTimes</code>
<tr><td> <code>lengthadjust</code> <td> <code>lengthAdjust</code>
<tr><td> <code>limitingconeangle</code> <td> <code>limitingConeAngle</code>
<tr><td> <code>markerheight</code> <td> <code>markerHeight</code>
<tr><td> <code>markerunits</code> <td> <code>markerUnits</code>
<tr><td> <code>markerwidth</code> <td> <code>markerWidth</code>
<tr><td> <code>maskcontentunits</code> <td> <code>maskContentUnits</code>
<tr><td> <code>maskunits</code> <td> <code>maskUnits</code>
<tr><td> <code>numoctaves</code> <td> <code>numOctaves</code>
<tr><td> <code>pathlength</code> <td> <code>pathLength</code>
<tr><td> <code>patterncontentunits</code> <td> <code>patternContentUnits</code>
<tr><td> <code>patterntransform</code> <td> <code>patternTransform</code>
<tr><td> <code>patternunits</code> <td> <code>patternUnits</code>
<tr><td> <code>pointsatx</code> <td> <code>pointsAtX</code>
<tr><td> <code>pointsaty</code> <td> <code>pointsAtY</code>
<tr><td> <code>pointsatz</code> <td> <code>pointsAtZ</code>
<tr><td> <code>preservealpha</code> <td> <code>preserveAlpha</code>
<tr><td> <code>preserveaspectratio</code> <td> <code>preserveAspectRatio</code>
<tr><td> <code>primitiveunits</code> <td> <code>primitiveUnits</code>
<tr><td> <code>refx</code> <td> <code>refX</code>
<tr><td> <code>refy</code> <td> <code>refY</code>
<tr><td> <code>repeatcount</code> <td> <code>repeatCount</code>
<tr><td> <code>repeatdur</code> <td> <code>repeatDur</code>
<tr><td> <code>requiredextensions</code> <td> <code>requiredExtensions</code>
<tr><td> <code>requiredfeatures</code> <td> <code>requiredFeatures</code>
<tr><td> <code>specularconstant</code> <td> <code>specularConstant</code>
<tr><td> <code>specularexponent</code> <td> <code>specularExponent</code>
<tr><td> <code>spreadmethod</code> <td> <code>spreadMethod</code>
<tr><td> <code>startoffset</code> <td> <code>startOffset</code>
<tr><td> <code>stddeviation</code> <td> <code>stdDeviation</code>
<tr><td> <code>stitchtiles</code> <td> <code>stitchTiles</code>
<tr><td> <code>surfacescale</code> <td> <code>surfaceScale</code>
<tr><td> <code>systemlanguage</code> <td> <code>systemLanguage</code>
<tr><td> <code>tablevalues</code> <td> <code>tableValues</code>
<tr><td> <code>targetx</code> <td> <code>targetX</code>
<tr><td> <code>targety</code> <td> <code>targetY</code>
<tr><td> <code>textlength</code> <td> <code>textLength</code>
<tr><td> <code>viewbox</code> <td> <code>viewBox</code>
<tr><td> <code>viewtarget</code> <td> <code>viewTarget</code>
<tr><td> <code>xchannelselector</code> <td> <code>xChannelSelector</code>
<tr><td> <code>ychannelselector</code> <td> <code>yChannelSelector</code>
<tr><td> <code>zoomandpan</code> <td> <code>zoomAndPan</code>
</table>
<p>When the steps below require the user agent to <dfn id=adjust-foreign-attributes>adjust foreign attributes</dfn> for a
token, then, if any of the attributes on the token match the strings given in the first column of
the following table, let the attribute be a namespaced attribute, with the prefix being the string
given in the corresponding cell in the second column, the local name being the string given in the
corresponding cell in the third column, and the namespace being the namespace given in the
corresponding cell in the fourth column. (This fixes the use of namespaced attributes, in
particular <a href=dom.html#attr-xml-lang id=creating-and-inserting-nodes:attr-xml-lang><code>lang</code> attributes in the <span>XML
namespace</span></a>.)</p>
<table><thead><tr><th> Attribute name <th> Prefix <th> Local name <th> Namespace
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
</table>
<hr>
<p>When the steps below require the user agent to <dfn id=insert-a-character>insert a character</dfn> while processing a
token, the user agent must run the following steps:</p>
<ol><li><p>Let <var>data</var> be the characters passed to the algorithm, or, if no
characters were explicitly specified, the character of the character token being
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
place for inserting a node</a>.<li>
<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,
then abort these steps.
<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
children, so they are dropped on the floor.</p>
<li>
<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
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>
<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
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
element in which the <var>adjusted insertion location</var> finds itself, and insert
the newly created node at the <var>adjusted insertion location</var>.</p>
</ol>
<div class=example>
<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>
nodes that they result in, assuming a user agent that executes scripts.</p>
<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
<tbody><tr><td><pre>A&lt;script>
var script = document.getElementsByTagName('script')[0];
document.body.removeChild(script);
&lt;/script>B</pre>
<td>One <code id=creating-and-inserting-nodes:text-7><a href=infrastructure.html#text>Text</a></code> node in the document, containing "AB".
<tr><td><pre>A&lt;script>
var text = document.createTextNode('B');
document.body.appendChild(text);
&lt;/script>C</pre>
<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).
<tr><td><pre>A&lt;script>
var text = document.getElementsByTagName('script')[0].firstChild;
text.data = 'B';
document.body.appendChild(text);
&lt;/script>C</pre>
<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".
<tr><td><pre>A&lt;table>B&lt;tr>C&lt;/tr>D&lt;/table></pre>
<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>.)
<tr><td><pre>A&lt;table>&lt;tr> B&lt;/tr> C&lt;/table></pre>
<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>.)
<tr><td><pre>A&lt;table>&lt;tr> B&lt;/tr> &lt;/em>C&lt;/table></pre>
<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.)
</table>
</div>
<hr>
<p>When the steps below require the user agent to <dfn id=insert-a-comment>insert a comment</dfn> while processing a
comment token, optionally with an explicitly insertion position <var>position</var>, the
user agent must run the following steps:</p>
<ol><li><p>Let <var>data</var> be the data given in the comment token being
processed.<li><p>If <var>position</var> was specified, then let the <var>adjusted
insertion location</var> be <var>position</var>. Otherwise, let <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-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
<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
the same as that of the node in which the <var>adjusted insertion location</var> finds
itself.</p>
<li><p>Insert the newly created node at the <var>adjusted insertion
location</var>.</ol>
<hr>
<p id=mutation-during-parsing>DOM mutation events must not fire for changes caused by the UA
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>
<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>
<h5 id=parsing-elements-that-contain-only-text>12.2.5.2 Parsing elements that contain only text</h5>
<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
parsing algorithm</dfn> consist of the following steps. These algorithms are always invoked in
response to a start tag token.</p>
<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
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
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
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
mode</a>.</p>
<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>
<h5 id=closing-elements-that-have-implied-end-tags>12.2.5.3 Closing elements that have implied end tags</h5>
<p>When the steps below require the UA to <dfn id=generate-implied-end-tags>generate implied end tags</dfn>, then, while the
<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
<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
<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
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>
<p>If a step requires the UA to generate implied end tags but lists an element to exclude from the
process, then the UA must perform the above steps as if that element was not in the above
list.</p>
<p>When the steps below require the UA to <dfn id=generate-all-implied-end-tags-thoroughly>generate all implied end tags thoroughly</dfn>,
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
<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
<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
<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
<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
<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
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>
<h5 id=parsing-main-inhtml>12.2.5.4 The rules for parsing tokens in HTML content</h5>
<h6 id=the-initial-insertion-mode>12.2.5.4.1 The "<dfn>initial</dfn>" insertion mode</h6>
<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
follows:</p>
<dl class=switch><dt>A character token that is one of U+0009 CHARACTER
TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF),
U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dd>
<p>Ignore the token.</p>
<dt>A comment token<dd>
<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>
<dt>A DOCTYPE token<dd>
<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
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
"<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
matched, then there is a <a href=#parse-error id=the-initial-insertion-mode:parse-error>parse error</a>.</p>
<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
"<code>-//W3C//DTD HTML 4.0//EN</code>", and the token's system identifier
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
"<code>-//W3C//DTD HTML 4.01//EN</code>", and the token's system identifier
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
"<code>-//W3C//DTD XHTML 1.0 Strict//EN</code>", and the token's system
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
"<code>-//W3C//DTD XHTML 1.1//EN</code>", and the token's system identifier
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>
<p>Conformance checkers may, based on the values (including presence or lack thereof) of the
DOCTYPE token's name, public identifier, or system identifier, switch to a conformance checking
mode for another language (e.g. based on the DOCTYPE token a conformance checker could recognise
that the document is an HTML4-era document, and defer to an HTML4 conformance checker.)</p>
<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
if the name was missing; the <code>publicId</code> attribute set to the public
identifier given in the DOCTYPE token, or the empty string if the public identifier was missing;
the <code>systemId</code> attribute set to the system identifier given in the DOCTYPE
token, or the empty string if the system identifier was missing; and the other attributes
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.
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
returned as the value of the <code>doctype</code> attribute of the
<code id=the-initial-insertion-mode:document-4><a href=dom.html#document>Document</a></code> object.</p>
<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>
<code>srcdoc</code> document</a>, and the DOCTYPE token matches
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
mode</a>:</p>
<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>
<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
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
mode</a>:</p>
<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>
<p>The system identifier and public identifier strings must be compared to the values given in
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
value is the empty string is not considered missing for the purposes of the conditions
above.</p>
<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>
<dt>Anything else<dd>
<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
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>
<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>
</dl>
<h6 id=the-before-html-insertion-mode>12.2.5.4.2 The "<dfn>before html</dfn>" insertion mode</h6>
<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
follows:</p>
<dl class=switch><dt>A DOCTYPE token<dd>
<p><a href=#parse-error id=the-before-html-insertion-mode:parse-error>Parse error</a>. Ignore the token.</p>
<dt>A comment token<dd>
<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>
<dt>A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C
FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dd>
<p>Ignore the token.</p>
<dt>A start tag whose tag name is "html"<dd>
<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
<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
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>
<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
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
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
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
successful, run the <a href=browsers.html#concept-appcache-init id=the-before-html-insertion-mode:concept-appcache-init>application cache selection
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
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
fragment flag</i> set; otherwise, if there is no such attribute, or its value is the empty
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
cache selection algorithm</a> with no manifest. The algorithm must be passed the
<code id=the-before-html-insertion-mode:document-5><a href=dom.html#document>Document</a></code> object.</p>
<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
head</a>".</p>
<dt>An end tag whose tag name is one of: "head", "body", "html", "br"<dd>
<p>Act as described in the "anything else" entry below.</p>
<dt>Any other end tag<dd>
<p><a href=#parse-error id=the-before-html-insertion-mode:parse-error-2>Parse error</a>. Ignore the token.</p>
<dt>Anything else<dd>
<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
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
elements</a>.</p>
<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,
passing it the <code id=the-before-html-insertion-mode:document-9><a href=dom.html#document>Document</a></code> object.</p>
<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
head</a>", then reprocess the token.</p>
</dl>
<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
scripts; nothing in particular happens in such cases, content continues being appended to the
nodes as described in the next section.</p>
<h6 id=the-before-head-insertion-mode>12.2.5.4.3 The "<dfn>before head</dfn>" insertion mode</h6>
<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
follows:</p>
<dl class=switch><dt>A character token that is one of U+0009 CHARACTER
TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF),
U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dd>
<p>Ignore the token.</p>
<dt>A comment token<dd>
<p><a href=#insert-a-comment id=the-before-head-insertion-mode:insert-a-comment>Insert a comment</a>.</p>
<dt>A DOCTYPE token<dd>
<p><a href=#parse-error id=the-before-head-insertion-mode:parse-error>Parse error</a>. Ignore the token.</p>
<dt>A start tag whose tag name is "html"<dd>
<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>
<dt>A start tag whose tag name is "head"<dd>
<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>
<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
<code id=the-before-head-insertion-mode:the-head-element><a href=semantics.html#the-head-element>head</a></code> element.</p>
<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
head</a>".</p>
<dt>An end tag whose tag name is one of: "head", "body", "html", "br"<dd>
<p>Act as described in the "anything else" entry below.</p>
<dt>Any other end tag<dd>
<p><a href=#parse-error id=the-before-head-insertion-mode:parse-error-2>Parse error</a>. Ignore the token.</p>
<dt>Anything else<dd>
<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>
<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
<code id=the-before-head-insertion-mode:the-head-element-2><a href=semantics.html#the-head-element>head</a></code> element.</p>
<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
head</a>".</p>
<p>Reprocess the current token.</p>
</dl>
<h6 id=parsing-main-inhead>12.2.5.4.4 The "<dfn>in head</dfn>" insertion mode</h6>
<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
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>
<dl class=switch><dt>A character token that is one of U+0009 CHARACTER
TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF),
U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dd>
<p><a href=#insert-a-character id=parsing-main-inhead:insert-a-character>Insert the character</a>.</p>
<dt>A comment token<dd>
<p><a href=#insert-a-comment id=parsing-main-inhead:insert-a-comment>Insert a comment</a>.</p>
<dt>A DOCTYPE token<dd>
<p><a href=#parse-error id=parsing-main-inhead:parse-error>Parse error</a>. Ignore the token.</p>
<dt>A start tag whose tag name is "html"<dd>
<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>
<dt>A start tag whose tag name is one of: "base", "basefont",
"bgsound", "link"<dd>
<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
node</a> off the <a href=#stack-of-open-elements id=parsing-main-inhead:stack-of-open-elements>stack of open elements</a>.</p>
<p><a href=#acknowledge-self-closing-flag id=parsing-main-inhead:acknowledge-self-closing-flag>Acknowledge the token's <i>self-closing
flag</i></a>, if it is set.</p>
<dt>A start tag whose tag name is "meta"<dd>
<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
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>
<p><a href=#acknowledge-self-closing-flag id=parsing-main-inhead:acknowledge-self-closing-flag-2>Acknowledge the token's <i>self-closing
flag</i></a>, if it is set.</p>
<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
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
UTF-16 encoding</a>, and the <a href=#concept-encoding-confidence id=parsing-main-inhead:concept-encoding-confidence>confidence</a> is
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>
<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>
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
extracting a character encoding from a <code>meta</code> element</a> to that attribute's
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
encoding</a>, and the <a href=#concept-encoding-confidence id=parsing-main-inhead:concept-encoding-confidence-2>confidence</a> is
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>
<dt>A start tag whose tag name is "title"<dd>
<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>
<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>
<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>
<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>
<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>
<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
head noscript</a>".</p>
<dt id=scriptTag>A start tag whose tag name is "script"<dd>
<p>Run these steps:</p>
<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
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
the intended parent being the element in which the <var>adjusted insertion
location</var> finds itself.<li>
<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
<a id=parsing-main-inhead:non-blocking href=scripting.html#non-blocking>"non-blocking"</a> flag.</p>
<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,
instead of blowing the document away, as would happen in most other cases. It also prevents
the script from executing until the end tag is seen.</p>
<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
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>.
(<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
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
<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
mode</a>.</p>
<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>
<dt>An end tag whose tag name is "head"<dd>
<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
<a href=#stack-of-open-elements id=parsing-main-inhead:stack-of-open-elements-4>stack of open elements</a>.</p>
<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
head</a>".</p>
<dt>An end tag whose tag name is one of: "body", "html", "br"<dd>
<p>Act as described in the "anything else" entry below.</p>
<dt>A start tag whose tag name is "template"<dd>
<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>
<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
active formatting elements</a>.</p>
<p>Set the <a href=#frameset-ok-flag id=parsing-main-inhead:frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>
<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
template</a>".</p>
<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
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
mode</a>.</p>
<dt>An end tag whose tag name is "template"<dd>
<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
this is a <a href=#parse-error id=parsing-main-inhead:parse-error-2>parse error</a>; ignore the token.</p>
<p>Otherwise, run these steps:</p>
<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
<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>
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
insertion modes</a>.</p>
<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>
<dt>A start tag whose tag name is "head"<dt>Any other end tag<dd>
<p><a href=#parse-error id=parsing-main-inhead:parse-error-4>Parse error</a>. Ignore the token.</p>
<dt>Anything else<dd>
<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
<a href=#stack-of-open-elements id=parsing-main-inhead:stack-of-open-elements-7>stack of open elements</a>.</p>
<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
head</a>".</p>
<p>Reprocess the token.</p>
</dl>
<h6 id=parsing-main-inheadnoscript>12.2.5.4.5 The "<dfn>in head noscript</dfn>" insertion mode</h6>
<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
token as follows:</p>
<dl class=switch><dt>A DOCTYPE token<dd>
<p><a href=#parse-error id=parsing-main-inheadnoscript:parse-error>Parse error</a>. Ignore the token.</p>
<dt>A start tag whose tag name is "html"<dd>
<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>
<dt>An end tag whose tag name is "noscript"<dd>
<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
<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
<code id=parsing-main-inheadnoscript:the-head-element><a href=semantics.html#the-head-element>head</a></code> element.</p>
<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
head</a>".</p>
<dt>A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C
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",
"style"<dd>
<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>
<dt>An end tag whose tag name is "br"<dd>
<p>Act as described in the "anything else" entry below.</p>
<dt>A start tag whose tag name is one of: "head", "noscript"<dt>Any other end tag<dd>
<p><a href=#parse-error id=parsing-main-inheadnoscript:parse-error-2>Parse error</a>. Ignore the token.</p>
<dt>Anything else<dd>
<p><a href=#parse-error id=parsing-main-inheadnoscript:parse-error-3>Parse error</a>.</p>
<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
<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
<code id=parsing-main-inheadnoscript:the-head-element-2><a href=semantics.html#the-head-element>head</a></code> element.</p>
<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
head</a>".</p>
<p>Reprocess the token.</p>
</dl>
<h6 id=the-after-head-insertion-mode>12.2.5.4.6 The "<dfn>after head</dfn>" insertion mode</h6>
<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
follows:</p>
<dl class=switch><dt>A character token that is one of U+0009 CHARACTER
TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF),
U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dd>
<p><a href=#insert-a-character id=the-after-head-insertion-mode:insert-a-character>Insert the character</a>.</p>
<dt>A comment token<dd>
<p><a href=#insert-a-comment id=the-after-head-insertion-mode:insert-a-comment>Insert a comment</a>.</p>
<dt>A DOCTYPE token<dd>
<p><a href=#parse-error id=the-after-head-insertion-mode:parse-error>Parse error</a>. Ignore the token.</p>
<dt>A start tag whose tag name is "html"<dd>
<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>
<dt>A start tag whose tag name is "body"<dd>
<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>
<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>
<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
body</a>".</p>
<dt>A start tag whose tag name is "frameset"<dd>
<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>
<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
frameset</a>".</p>
<dt>A start tag whose tag name is one of: "base", "basefont", "bgsound", "link", "meta",
"noframes", "script", "style", "template", "title"<dd>
<p><a href=#parse-error id=the-after-head-insertion-mode:parse-error-2>Parse error</a>.</p>
<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
the <a href=#stack-of-open-elements id=the-after-head-insertion-mode:stack-of-open-elements>stack of open elements</a>.</p>
<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>
<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>
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
this point.)</p>
<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
this point.</p>
<dt>An end tag whose tag name is "template"<dd>
<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>
<dt>An end tag whose tag name is one of: "body", "html", "br"<dd>
<p>Act as described in the "anything else" entry below.</p>
<dt>A start tag whose tag name is "head"<dt>Any other end tag<dd>
<p><a href=#parse-error id=the-after-head-insertion-mode:parse-error-3>Parse error</a>. Ignore the token.</p>
<dt>Anything else<dd>
<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>
<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
body</a>".</p>
<p>Reprocess the current token.</p>
</dl>
<h6 id=parsing-main-inbody>12.2.5.4.7 The "<dfn>in body</dfn>" insertion mode</h6>
<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
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>
<dl class=switch><dt>A character token that is U+0000 NULL<dd>
<p><a href=#parse-error id=parsing-main-inbody:parse-error>Parse error</a>. Ignore the token.</p>
<dt>A character token that is one of U+0009 CHARACTER TABULATION,
U+000A LINE FEED (LF), U+000C FORM FEED (FF), U+000D CARRIAGE
RETURN (CR), or U+0020 SPACE<dd>
<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>
<p><a href=#insert-a-character id=parsing-main-inbody:insert-a-character>Insert the token's character</a>.</p>
<dt>Any other character token<dd>
<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>
<p><a href=#insert-a-character id=parsing-main-inbody:insert-a-character-2>Insert the token's character</a>.</p>
<p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>
<dt>A comment token<dd>
<p><a href=#insert-a-comment id=parsing-main-inbody:insert-a-comment>Insert a comment</a>.</p>
<dt>A DOCTYPE token<dd>
<p><a href=#parse-error id=parsing-main-inbody:parse-error-2>Parse error</a>. Ignore the token.</p>
<dt>A start tag whose tag name is "html"<dd>
<p><a href=#parse-error id=parsing-main-inbody:parse-error-3>Parse error</a>.</p>
<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
ignore the token.</p>
<p>Otherwise, for each attribute on the token, check to see if the attribute is already present
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
and its corresponding value to that element.</p>
<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>
<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>
<dt>A start tag whose tag name is "body"<dd>
<p><a href=#parse-error id=parsing-main-inbody:parse-error-4>Parse error</a>.</p>
<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>
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
<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.
(<a href=#fragment-case id=parsing-main-inbody:fragment-case>fragment case</a>)</p>
<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
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
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
and its corresponding value to that element.</p>
<dt>A start tag whose tag name is "frameset"<dd>
<p><a href=#parse-error id=parsing-main-inbody:parse-error-5>Parse error</a>.</p>
<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
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
token. (<a href=#fragment-case id=parsing-main-inbody:fragment-case-2>fragment case</a>)</p>
<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>
<p>Otherwise, run the following steps:</p>
<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
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
<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>
<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
frameset</a>".</p>
</ol>
<dt>An end-of-file token<dd>
<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
<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
template</a>" <a href=#insertion-mode id=parsing-main-inbody:insertion-mode-4>insertion mode</a>.</p>
<p>Otherwise, follow these steps:</p>
<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
<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
<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
<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
<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
<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
<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>
<dt>An end tag whose tag name is "body"<dd>
<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>;
ignore the token.</p>
<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
<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
<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
<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
<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
<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
<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>
<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
body</a>".</p>
<dt>An end tag whose tag name is "html"<dd>
<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>;
ignore the token.</p>
<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
<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
<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
<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
<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
<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
<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>
<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
body</a>".</p>
<p>Reprocess the token.</p>
<dt>A start tag whose tag name is one of: "address", "article", "aside", "blockquote", "center",
"details", "dialog", "dir", "div", "dl", "fieldset", "figcaption", "figure", "footer", "header",
"hgroup", "main", "menu", "nav", "ol", "p", "section", "summary", "ul"<dd>
<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
<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>
element</a>.</p>
<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>
<dt>A start tag whose tag name is one of: "h1", "h2", "h3", "h4",
"h5", "h6"<dd>
<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
<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>
element</a>.</p>
<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
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
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>
<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>
<dt>A start tag whose tag name is one of: "pre", "listing"<dd>
<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
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>
element</a>.</p>
<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>
<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
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
as an authoring convenience.)</p>
<p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-4>frameset-ok flag</a> to "not ok".</p>
<dt>A start tag whose tag name is "form"<dd>
<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
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
<a href=#parse-error id=parsing-main-inbody:parse-error-12>parse error</a>; ignore the token.</p>
<p>Otherwise:</p>
<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
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>
element</a>.</p>
<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>
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>
<dt>A start tag whose tag name is "li"<dd>
<p>Run these steps:</p>
<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
node</a> (the bottommost node of the stack).<li>
<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
substeps:</p>
<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
<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>
element has been popped from the stack.<li><p>Jump to the step labeled <i>done</i> below.</ol>
<li><p>If <var>node</var> is in the <a href=#special id=parsing-main-inbody:special>special</a> category, but is not an
<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
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
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
<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>
<dt>A start tag whose tag name is one of: "dd", "dt"<dd>
<p>Run these steps:</p>
<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
node</a> (the bottommost node of the stack).<li>
<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
substeps:</p>
<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
<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>
element has been popped from the stack.<li><p>Jump to the step labeled <i>done</i> below.</ol>
<li>
<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>
<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
<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>
element has been popped from the stack.<li><p>Jump to the step labeled <i>done</i> below.</ol>
<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
<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
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
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
<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>
<dt>A start tag whose tag name is "plaintext"<dd>
<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
<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>
element</a>.</p>
<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>
<p>Switch the tokenizer to the <a href=#plaintext-state id=parsing-main-inbody:plaintext-state>PLAINTEXT state</a>.</p>
<p class=note>Once a start tag with the tag name "plaintext" has been seen, that will be the
last token ever seen other than character tokens (and the end-of-file token), because there is
no way to switch out of the <a href=#plaintext-state id=parsing-main-inbody:plaintext-state-2>PLAINTEXT state</a>.</p>
<dt>A start tag whose tag name is "button"<dd>
<ol><li>
<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
<code>button</code> element in scope</a>, then run these substeps:</p>
<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>
element has been popped from the stack.</ol>
<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>
<dt>An end tag whose tag name is one of: "address", "article", "aside", "blockquote", "button",
"center", "details", "dialog", "dir", "div", "dl", "fieldset", "figcaption", "figure", "footer",
"header", "hgroup", "listing", "main", "menu", "nav", "ol", "pre", "section", "summary",
"ul"<dd>
<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
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
error</a>; ignore the token.</p>
<p>Otherwise, run these steps:</p>
<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
the same tag name as that of the token, then this is a
<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
stack.</ol>
<dt>An end tag whose tag name is "form"<dd>
<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
run these substeps:</p>
<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>
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
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
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
<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>
<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
elements</a>, then run these substeps instead:</p>
<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
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
<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>
element has been popped from the stack.</ol>
<dt>An end tag whose tag name is "p"<dd>
<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
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
attributes.</p>
<p><a href=#close-a-p-element id=parsing-main-inbody:close-a-p-element-8>Close a <code>p</code> element</a>.</p>
<dt>An end tag whose tag name is "li"<dd>
<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
error</a>; ignore the token.</p>
<p>Otherwise, run these steps:</p>
<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
<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>
element has been popped from the stack.</ol>
<dt>An end tag whose tag name is one of: "dd", "dt"<dd>
<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
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
error</a>; ignore the token.</p>
<p>Otherwise, run these steps:</p>
<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
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
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
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
stack.</ol>
<dt>An end tag whose tag name is one of: "h1", "h2", "h3", "h4", "h5", "h6"<dd>
<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
element</a> and whose 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-28>parse error</a>; ignore the token.</p>
<p>Otherwise, run these steps:</p>
<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
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
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"
has been popped from the stack.</ol>
<dt>An end tag whose tag name is "sarcasm"<dd>
<p>Take a deep breath, then act as described in the "any other end
tag" entry below.</p>
<dt>A start tag whose tag name is "a"<dd>
<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
between the end of the list and the last <a href=#concept-parser-marker id=parsing-main-inbody:concept-parser-marker>marker</a> on
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
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
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
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
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
scope</a>).</p>
<p class=example>In the non-conforming stream
<code>&lt;a href="a">a&lt;table>&lt;a href="b">b&lt;/table>x</code>, the first
<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
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>
element is not in table scope (meaning that a regular <code>&lt;/a></code> end tag at the start
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
<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
will often result in non-conforming DOMs when parsed.</p>
<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>
<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
formatting elements</a> that element.</p>
<dt>A start tag whose tag name is one of: "b", "big", "code", "em",
"font", "i", "s", "small", "strike", "strong", "tt", "u"<dd>
<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>
<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
formatting elements</a> that element.</p>
<dt>A start tag whose tag name is "nobr"<dd>
<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>
<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
<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
<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
<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>
<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
formatting elements</a> that element.</p>
<dt>An end tag whose tag name is one of: "a",
"b", "big", "code", "em", "font", "i", "nobr", "s", "small",
"strike", "strong", "tt", "u"<dd>
<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>
<dt>A start tag whose tag name is one of: "applet", "marquee", "object"<dd>
<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>
<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>
<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
active formatting elements</a>.</p>
<p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-8>frameset-ok flag</a> to "not ok".</p>
<dt>An end tag token whose tag name is one of: "applet", "marquee", "object"<dd>
<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
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
error</a>; ignore the token.</p>
<p>Otherwise, run these steps:</p>
<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
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
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
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>
<dt>A start tag whose tag name is "table"<dd>
<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
<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
<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>
element</a>.</p>
<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>
<p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-9>frameset-ok flag</a> to "not ok".</p>
<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
table</a>".</p>
<dt>An end tag whose tag name is "br"<dd>
<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
next entry; i.e. act as if this was a "br" start tag token with no attributes, rather than the
end tag token that it actually is.</p>
<dt>A start tag whose tag name is one of: "area", "br", "embed",
"img", "keygen", "wbr"<dd>
<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>
<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
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>
<p><a href=#acknowledge-self-closing-flag id=parsing-main-inbody:acknowledge-self-closing-flag>Acknowledge the token's <i>self-closing
flag</i></a>, if it is set.</p>
<p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-10>frameset-ok flag</a> to "not ok".</p>
<dt>A start tag whose tag name is "input"<dd>
<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>
<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
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>
<p><a href=#acknowledge-self-closing-flag id=parsing-main-inbody:acknowledge-self-closing-flag-2>Acknowledge the token's <i>self-closing
flag</i></a>, if it is set.</p>
<p>If the token does not have an attribute with the name "type", or if it does, but that
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>
<dt>A start tag whose tag name is one of: "menuitem", "param", "source", "track"<dd>
<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
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>
<p><a href=#acknowledge-self-closing-flag id=parsing-main-inbody:acknowledge-self-closing-flag-3>Acknowledge the token's <i>self-closing
flag</i></a>, if it is set.</p>
<dt>A start tag whose tag name is "hr"<dd>
<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
<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>
element</a>.</p>
<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
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>
<p><a href=#acknowledge-self-closing-flag id=parsing-main-inbody:acknowledge-self-closing-flag-4>Acknowledge the token's <i>self-closing
flag</i></a>, if it is set.</p>
<p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-12>frameset-ok flag</a> to "not ok".</p>
<dt>A start tag whose tag name is "image"<dd>
<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
ask.)</p>
<dt id=isindex>A start tag whose tag name is "isindex"<dd>
<p><a href=#parse-error id=parsing-main-inbody:parse-error-36>Parse error</a>.</p>
<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
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
token.</p>
<p>Otherwise:</p>
<p><a href=#acknowledge-self-closing-flag id=parsing-main-inbody:acknowledge-self-closing-flag-5>Acknowledge the token's <i>self-closing
flag</i></a>, if it is set.</p>
<p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-13>frameset-ok flag</a> to "not ok".</p>
<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
<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>
element</a>.</p>
<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
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
<a href=#form-element-pointer id=parsing-main-inbody:form-element-pointer-6><code>form</code> element pointer</a> to point to the element
created.</p>
<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
value of the "action" attribute of the token.</p>
<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.
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>
<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>
<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>
<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>
<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
from the "isindex" token except "name", "action", and "prompt", and with an attribute named
"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
the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-62>stack of open elements</a>.</p>
<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>
<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
earlier) off the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-63>stack of open elements</a>.</p>
<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.
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>
<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
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>
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>
<p><dfn id=attr-isindex-prompt><strong>Prompt</strong></dfn>: If the token has an attribute
with the name "prompt", then the first stream of characters must be the same string as given in
that attribute, and the second stream of characters must be empty. Otherwise, the two streams of
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
equivalent of "This is a searchable index. Enter search keywords: (input field)" in the user's
preferred language.</p>
<dt>A start tag whose tag name is "textarea"<dd>
<p>Run these steps:</p>
<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
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>
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
mode</a>.</p>
<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>
<dt>A start tag whose tag name is "xmp"<dd>
<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
<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>
element</a>.</p>
<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>
<p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-15>frameset-ok flag</a> to "not ok".</p>
<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>
<dt>A start tag whose tag name is "iframe"<dd>
<p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-16>frameset-ok flag</a> to "not ok".</p>
<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>
<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>
<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>
<dt>A start tag whose tag name is "select"<dd>
<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>
<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>
<p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-17>frameset-ok flag</a> to "not ok".</p>
<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
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
<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
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>
<dt>A start tag whose tag name is one of: "optgroup", "option"<dd>
<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
<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>
<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>
<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>
<dt>A start tag whose tag name is one of: "rp", "rt"<dd>
<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
<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
<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
error</a>.</p>
<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>
<dt>A start tag whose tag name is "math"<dd>
<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>
<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
attributes that are not all lowercase.)</p>
<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
attributes, in particular XLink.)</p>
<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
namespace</a>.</p>
<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
<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
the token's <i>self-closing flag</i></a>.</p>
<dt>A start tag whose tag name is "svg"<dd>
<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>
<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
are not all lowercase.)</p>
<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
attributes, in particular XLink in SVG.)</p>
<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>
<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
<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
the token's <i>self-closing flag</i></a>.</p>
<dt>A start tag whose tag name is one of: "caption", "col", "colgroup", "frame",
"head", "tbody", "td", "tfoot", "th", "thead", "tr"<dd>
<p><a href=#parse-error id=parsing-main-inbody:parse-error-38>Parse error</a>. Ignore the token.</p>
<dt>Any other start tag<dd>
<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>
<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>
<p class=note>This element will be an <a href=#ordinary id=parsing-main-inbody:ordinary>ordinary</a>
element.</p>
<dt>Any other end tag<dd>
<p>Run these steps:</p>
<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
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
element</a> with the same tag name as the token, then:</p>
<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
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
<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>,
including <var>node</var>, then stop these steps.</ol>
<li><p>Otherwise, if <var>node</var> is in the <a href=#special id=parsing-main-inbody:special-3>special</a> category, then
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
elements</a>.<li><p>Return to the step labeled <i>loop</i>.</ol>
</dl>
<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
means that the user agent must run the following steps:</p>
<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
<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
has been popped from the stack.</ol>
<p id=adoptionAgency>The <dfn id=adoption-agency-algorithm>adoption agency algorithm</dfn>, which takes as its only argument
a tag name <var>subject</var> for which the algorithm is being run, consists of the
following steps:</p>
<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>
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
<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
<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
eight, then abort these steps.<li><p>Increment <var>outer loop counter</var> by one.<li>
<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
formatting elements</a> that:</p>
<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
otherwise, and<li>has the tag name <var>subject</var>.</ul>
<p>If there is no such element, then abort these steps and instead act as described in the "any
other end tag" entry above.</p>
<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
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
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>,
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
<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
<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
elements</a> that is lower in the stack than <var>formatting element</var>, and is an
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
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
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
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
<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
the list.<li>
<p>Let <var>node</var> and <var>last node</var> be <var>furthest
block</var>. Follow these steps:</p>
<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>
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
<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>
was removed.<li><p>If <var>node</var> is <var>formatting element</var>, then go to the
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
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
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
ancestor</var> as the intended parent; replace the entry for <var>node</var> in the
<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
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
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
aforementioned bookmark to be immediately after the new <var>node</var> in the
<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
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>
<li><p>Insert whatever <var>last node</var> ended up being in the previous step at the
<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
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
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
block</var> as the intended parent.<li><p>Take all of the child nodes of <var>furthest block</var> and append them to the
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
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
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
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>
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>
<p class=note>This algorithm's name, the "adoption agency algorithm", comes from the way it
causes elements to change parents, and is in contrast with other possible algorithms for dealing
with misnested content, which included the "incest algorithm", the "secret affair algorithm", and
the "Heisenberg algorithm".</p>
<h6 id=parsing-main-incdata>12.2.5.4.8 The "<dfn>text</dfn>" insertion mode</h6>
<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
follows:</p>
<dl class=switch><dt>A character token<dd>
<p><a href=#insert-a-character id=parsing-main-incdata:insert-a-character>Insert the token's character</a>.</p>
<p class=note>This can never be a U+0000 NULL character; the tokenizer converts those to
U+FFFD REPLACEMENT CHARACTER characters.</p>
<dt>An end-of-file token<dd>
<p><a href=#parse-error id=parsing-main-incdata:parse-error>Parse error</a>.</p>
<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
<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>
<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>
<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
reprocess the token.</p>
<dt id=scriptEndTag>An end tag whose tag name is "script"<dd>
<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>
<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
<code id=parsing-main-incdata:the-script-element-3><a href=scripting.html#the-script-element>script</a></code> element).</p>
<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>
<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>
<p>Let the <var>old insertion point</var> have the same value as the current
<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
input character</a>.</p>
<p>Increment the parser's <a href=#script-nesting-level id=parsing-main-incdata:script-nesting-level>script nesting level</a> by one.</p>
<p><a href=scripting.html#prepare-a-script id=parsing-main-incdata:prepare-a-script>Prepare</a> the <var>script</var>. This might
cause some script to execute, which might cause <a href=webappapis.html#dom-document-write id=parsing-main-incdata:dom-document-write>new characters
to be inserted into the tokenizer</a>, and might cause the tokenizer to output more tokens,
resulting in a <a href=#nestedParsing>reentrant invocation of the parser</a>.</p>
<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
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>
<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
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.
This value might be the "undefined" value.)</p>
<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
script</a>, then:</p>
<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>
<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
invocations of the tokenizer, yielding control back to the caller. (Tokenization will resume
when the caller returns to the "outer" tree construction stage.)</p>
<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>
<dt>Otherwise:<dd>
<p>Run these steps:</p>
<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
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
<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
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>
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>
<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
<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>
<p>If this <a href=#abort-a-parser id=parsing-main-incdata:abort-a-parser>parser has been aborted</a> in the meantime,
abort these steps.</p>
<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>
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
<code id=parsing-main-incdata:document-3><a href=dom.html#document>Document</a></code>.</p>
<li><p>Unblock the <a href=#tokenization id=parsing-main-incdata:tokenization-3>tokenizer</a> for this instance of the
<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
<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
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
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
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
<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
the <a href=#parser-pause-flag id=parsing-main-incdata:parser-pause-flag-3>parser pause flag</a> to false.</p>
<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
these steps from step 1.</ol>
</dl>
<dt>Any other end tag<dd>
<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>
<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>
</dl>
<h6 id=parsing-main-intable>12.2.5.4.9 The "<dfn>in table</dfn>" insertion mode</h6>
<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
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>
<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>
<p>Let the <dfn id=concept-pending-table-char-tokens><var>pending table character
tokens</var></dfn> be an empty list of tokens.</p>
<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>
<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
table text</a>" and reprocess the token.</p>
<dt>A comment token<dd>
<p><a href=#insert-a-comment id=parsing-main-intable:insert-a-comment>Insert a comment</a>.</p>
<dt>A DOCTYPE token<dd>
<p><a href=#parse-error id=parsing-main-intable:parse-error>Parse error</a>. Ignore the token.</p>
<dt>A start tag whose tag name is "caption"<dd>
<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>
<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
active formatting elements</a>.</p>
<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
mode</a> to "<a href=#parsing-main-incaption id=parsing-main-intable:parsing-main-incaption>in caption</a>".</p>
<dt>A start tag whose tag name is "colgroup"<dd>
<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>
<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
mode</a> to "<a href=#parsing-main-incolgroup id=parsing-main-intable:parsing-main-incolgroup>in column group</a>".</p>
<dt>A start tag whose tag name is "col"<dd>
<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>
<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
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
column group</a>".</p>
<p>Reprocess the current token.</p>
<dt>A start tag whose tag name is one of: "tbody", "tfoot", "thead"<dd>
<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>
<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
mode</a> to "<a href=#parsing-main-intbody id=parsing-main-intable:parsing-main-intbody>in table body</a>".</p>
<dt>A start tag whose tag name is one of: "td", "th", "tr"<dd>
<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>
<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
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
body</a>".</p>
<p>Reprocess the current token.</p>
<dt>A start tag whose tag name is "table"<dd>
<p><a href=#parse-error id=parsing-main-intable:parse-error-2>Parse error</a>.</p>
<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>
<p>Otherwise:</p>
<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
stack.</p>
<p><a href=#reset-the-insertion-mode-appropriately id=parsing-main-intable:reset-the-insertion-mode-appropriately>Reset the insertion mode appropriately</a>.</p>
<p>Reprocess the token.</p>
<dt>An end tag whose tag name is "table"<dd>
<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
error</a>; ignore the token.</p>
<p>Otherwise:</p>
<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
stack.</p>
<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>
<dt>An end tag whose tag name is one of: "body", "caption", "col", "colgroup", "html", "tbody",
"td", "tfoot", "th", "thead", "tr"<dd>
<p><a href=#parse-error id=parsing-main-intable:parse-error-4>Parse error</a>. Ignore the token.</p>
<dt>A start tag whose tag name is one of: "style", "script", "template"<dt>An end tag whose tag name is "template"<dd>
<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
mode</a>.</p>
<dt>A start tag whose tag name is "input"<dd>
<p>If the token does not have an attribute with the name "type", or if it does, but that
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>
<p>Otherwise:</p>
<p><a href=#parse-error id=parsing-main-intable:parse-error-5>Parse error</a>.</p>
<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>
<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>
<p><a href=#acknowledge-self-closing-flag id=parsing-main-intable:acknowledge-self-closing-flag>Acknowledge the token's <i>self-closing
flag</i></a>, if it is set.</p>
<dt>A start tag whose tag name is "form"<dd>
<p><a href=#parse-error id=parsing-main-intable:parse-error-6>Parse error</a>.</p>
<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
the <a href=#form-element-pointer id=parsing-main-intable:form-element-pointer><code>form</code> element pointer</a> is not null, ignore the
token.</p>
<p>Otherwise:</p>
<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>
<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>
<dt>An end-of-file token<dd>
<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>
<dt>Anything else<dd>
<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
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
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
parenting</a>.</p>
</dl>
<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
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>,
<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
elements</a>.</p>
<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>
<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
process is a <a href=#fragment-case id=parsing-main-intable:fragment-case>fragment case</a>.</p>
<h6 id=parsing-main-intabletext>12.2.5.4.10 The "<dfn>in table text</dfn>" insertion mode</h6>
<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
follows:</p>
<dl class=switch><dt>A character token that is U+0000 NULL<dd>
<p><a href=#parse-error id=parsing-main-intabletext:parse-error>Parse error</a>. Ignore the token.</p>
<dt>Any other character token<dd>
<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
table character tokens</a></var> list.</p>
<dt>Anything else<dd>
<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
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
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
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>
<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>
<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
reprocess the token.</p>
</dl>
<h6 id=parsing-main-incaption>12.2.5.4.11 The "<dfn>in caption</dfn>" insertion mode</h6>
<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
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>
<dl class=switch><dt>An end tag whose tag name is "caption"<dd>
<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
error</a>; ignore the token. (<a href=#fragment-case id=parsing-main-incaption:fragment-case>fragment case</a>)</p>
<p>Otherwise:</p>
<p><a href=#generate-implied-end-tags id=parsing-main-incaption:generate-implied-end-tags>Generate implied end tags</a>.</p>
<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
<a href=#parse-error id=parsing-main-incaption:parse-error-2>parse error</a>.</p>
<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
stack.</p>
<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>
<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
table</a>".</p>
<dt>A start tag whose tag name is one of: "caption", "col", "colgroup", "tbody", "td", "tfoot",
"th", "thead", "tr"<dt>An end tag whose tag name is "table"<dd>
<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
error</a>; ignore the token. (<a href=#fragment-case id=parsing-main-incaption:fragment-case-2>fragment case</a>)</p>
<p>Otherwise:</p>
<p><a href=#generate-implied-end-tags id=parsing-main-incaption:generate-implied-end-tags-2>Generate implied end tags</a>.</p>
<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
<a href=#parse-error id=parsing-main-incaption:parse-error-4>parse error</a>.</p>
<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
stack.</p>
<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>
<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
table</a>".</p>
<p>Reprocess the token.</p>
<dt>An end tag whose tag name is one of: "body", "col", "colgroup", "html", "tbody", "td",
"tfoot", "th", "thead", "tr"<dd>
<p><a href=#parse-error id=parsing-main-incaption:parse-error-5>Parse error</a>. Ignore the token.</p>
<dt>Anything else<dd>
<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>
</dl>
<h6 id=parsing-main-incolgroup>12.2.5.4.12 The "<dfn>in column group</dfn>" insertion mode</h6>
<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
as follows:</p>
<dl class=switch><dt>A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C
FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dd>
<p><a href=#insert-a-character id=parsing-main-incolgroup:insert-a-character>Insert the character</a>.</p>
<dt>A comment token<dd>
<p><a href=#insert-a-comment id=parsing-main-incolgroup:insert-a-comment>Insert a comment</a>.</p>
<dt>A DOCTYPE token<dd>
<p><a href=#parse-error id=parsing-main-incolgroup:parse-error>Parse error</a>. Ignore the token.</p>
<dt>A start tag whose tag name is "html"<dd>
<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>
<dt>A start tag whose tag name is "col"<dd>
<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
node</a> off the <a href=#stack-of-open-elements id=parsing-main-incolgroup:stack-of-open-elements>stack of open elements</a>.</p>
<p><a href=#acknowledge-self-closing-flag id=parsing-main-incolgroup:acknowledge-self-closing-flag>Acknowledge the token's <i>self-closing
flag</i></a>, if it is set.</p>
<dt>An end tag whose tag name is "colgroup"<dd>
<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
<a href=#parse-error id=parsing-main-incolgroup:parse-error-2>parse error</a>; ignore the token.</p>
<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>.
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
table</a>".</p>
<dt>An end tag whose tag name is "col"<dd>
<p><a href=#parse-error id=parsing-main-incolgroup:parse-error-3>Parse error</a>. Ignore the token.</p>
<dt>A start tag whose tag name is "template"<dt>An end tag whose tag name is "template"<dd>
<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>
<dt>An end-of-file token<dd>
<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>
<dt>Anything else<dd>
<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
<a href=#parse-error id=parsing-main-incolgroup:parse-error-4>parse error</a>; ignore the token.</p>
<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
elements</a>.</p>
<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
table</a>".</p>
<p>Reprocess the token.</p>
</dl>
<h6 id=parsing-main-intbody>12.2.5.4.13 The "<dfn>in table body</dfn>" insertion mode</h6>
<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
follows:</p>
<dl class=switch><dt>A start tag whose tag name is "tr"<dd>
<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>
<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
mode</a> to "<a href=#parsing-main-intr id=parsing-main-intbody:parsing-main-intr>in row</a>".</p>
<dt>A start tag whose tag name is one of: "th", "td"<dd>
<p><a href=#parse-error id=parsing-main-intbody:parse-error>Parse error</a>.</p>
<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>
<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
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
row</a>".</p>
<p>Reprocess the current token.</p>
<dt>An end tag whose tag name is one of: "tbody", "tfoot",
"thead"<dd>
<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
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>;
ignore the token.</p>
<p>Otherwise:</p>
<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>
<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
<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>
<dt>A start tag whose tag name is one of: "caption", "col",
"colgroup", "tbody", "tfoot", "thead"<dt>An end tag whose tag name is "table"<dd>
<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
scope</a>, this is a <a href=#parse-error id=parsing-main-intbody:parse-error-3>parse error</a>; ignore the token.</p>
<p>Otherwise:</p>
<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>
<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
<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>
<p>Reprocess the token.</p>
<dt>An end tag whose tag name is one of: "body", "caption", "col", "colgroup", "html", "td",
"th", "tr"<dd>
<p><a href=#parse-error id=parsing-main-intbody:parse-error-4>Parse error</a>. Ignore the token.</p>
<dt>Anything else<dd>
<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>
</dl>
<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>,
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>,
<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
elements from the <a href=#stack-of-open-elements id=parsing-main-intbody:stack-of-open-elements-5>stack of open elements</a>.</p>
<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
process is a <a href=#fragment-case id=parsing-main-intbody:fragment-case>fragment case</a>.</p>
<h6 id=parsing-main-intr>12.2.5.4.14 The "<dfn>in row</dfn>" insertion mode</h6>
<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
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>
<dl class=switch><dt>A start tag whose tag name is one of: "th", "td"<dd>
<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>
<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
mode</a> to "<a href=#parsing-main-intd id=parsing-main-intr:parsing-main-intd>in cell</a>".</p>
<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
active formatting elements</a>.</p>
<dt>An end tag whose tag name is "tr"<dd>
<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>;
ignore the token.</p>
<p>Otherwise:</p>
<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>
<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
<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>
<dt>A start tag whose tag name is one of: "caption", "col", "colgroup", "tbody", "tfoot",
"thead", "tr"<dt>An end tag whose tag name is "table"<dd>
<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>;
ignore the token.</p>
<p>Otherwise:</p>
<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>
<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
<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>
<p>Reprocess the token.</p>
<dt>An end tag whose tag name is one of: "tbody", "tfoot", "thead"<dd>
<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
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>;
ignore the token.</p>
<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>
<p>Otherwise:</p>
<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>
<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
<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>
<p>Reprocess the token.</p>
<dt>An end tag whose tag name is one of: "body", "caption", "col", "colgroup", "html", "td",
"th"<dd>
<p><a href=#parse-error id=parsing-main-intr:parse-error-4>Parse error</a>. Ignore the token.</p>
<dt>Anything else<dd>
<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>
</dl>
<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>,
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>,
<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
elements</a>.</p>
<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
process is a <a href=#fragment-case id=parsing-main-intr:fragment-case>fragment case</a>.</p>
<h6 id=parsing-main-intd>12.2.5.4.15 The "<dfn>in cell</dfn>" insertion mode</h6>
<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>
<dl class=switch><dt>An end tag whose tag name is one of: "td", "th"<dd>
<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
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
error</a>; ignore the token.</p>
<p>Otherwise:</p>
<p><a href=#generate-implied-end-tags id=parsing-main-intd:generate-implied-end-tags>Generate implied end tags</a>.</p>
<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
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>
<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
stack.</p>
<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>
<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
row</a>".</p>
<dt>A start tag whose tag name is one of: "caption", "col",
"colgroup", "tbody", "td", "tfoot", "th", "thead", "tr"<dd>
<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
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>
<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>
<dt>An end tag whose tag name is one of: "body", "caption",
"col", "colgroup", "html"<dd>
<p><a href=#parse-error id=parsing-main-intd:parse-error-4>Parse error</a>. Ignore the token.</p>
<dt>An end tag whose tag name is one of: "table", "tbody",
"tfoot", "thead", "tr"<dd>
<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
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
error</a>; ignore the token.</p>
<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>
<dt>Anything else<dd>
<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>
</dl>
<p>Where the steps above say to <dfn id=close-the-cell>close the cell</dfn>, they mean to run the following
algorithm:</p>
<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>
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>
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
row</a>".</ol>
<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
<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
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>
<h6 id=parsing-main-inselect>12.2.5.4.16 The "<dfn>in select</dfn>" insertion mode</h6>
<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
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>
<dl class=switch><dt>A character token that is U+0000 NULL<dd>
<p><a href=#parse-error id=parsing-main-inselect:parse-error>Parse error</a>. Ignore the token.</p>
<dt>Any other character token<dd>
<p><a href=#insert-a-character id=parsing-main-inselect:insert-a-character>Insert the token's character</a>.</p>
<dt>A comment token<dd>
<p><a href=#insert-a-comment id=parsing-main-inselect:insert-a-comment>Insert a comment</a>.</p>
<dt>A DOCTYPE token<dd>
<p><a href=#parse-error id=parsing-main-inselect:parse-error-2>Parse error</a>. Ignore the token.</p>
<dt>A start tag whose tag name is "html"<dd>
<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>
<dt>A start tag whose tag name is "option"<dd>
<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
<a href=#stack-of-open-elements id=parsing-main-inselect:stack-of-open-elements>stack of open elements</a>.</p>
<p><a href=#insert-an-html-element id=parsing-main-inselect:insert-an-html-element>Insert an HTML element</a> for the token.</p>
<dt>A start tag whose tag name is "optgroup"<dd>
<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
<a href=#stack-of-open-elements id=parsing-main-inselect:stack-of-open-elements-2>stack of open elements</a>.</p>
<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
<a href=#stack-of-open-elements id=parsing-main-inselect:stack-of-open-elements-3>stack of open elements</a>.</p>
<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>
<dt>An end tag whose tag name is "optgroup"<dd>
<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
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>
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
elements</a>.</p>
<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
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
the token.</p>
<dt>An end tag whose tag name is "option"<dd>
<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
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
the token.</p>
<dt>An end tag whose tag name is "select"<dd>
<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
error</a>; ignore the token. (<a href=#fragment-case id=parsing-main-inselect:fragment-case>fragment case</a>)</p>
<p>Otherwise:</p>
<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
has been popped from the stack.</p>
<p><a href=#reset-the-insertion-mode-appropriately id=parsing-main-inselect:reset-the-insertion-mode-appropriately>Reset the insertion mode appropriately</a>.</p>
<dt>A start tag whose tag name is "select"<dd>
<p><a href=#parse-error id=parsing-main-inselect:parse-error-6>Parse error</a>.</p>
<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.
(<a href=#fragment-case id=parsing-main-inselect:fragment-case-2>fragment case</a>)</p>
<p>Otherwise:</p>
<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
has been popped from the stack.</p>
<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>
<p class=note>It just gets treated like an end tag.</p>
<dt>A start tag whose tag name is one of: "input", "keygen", "textarea"<dd>
<p><a href=#parse-error id=parsing-main-inselect:parse-error-7>Parse error</a>.</p>
<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.
(<a href=#fragment-case id=parsing-main-inselect:fragment-case-3>fragment case</a>)</p>
<p>Otherwise:</p>
<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
has been popped from the stack.</p>
<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>
<p>Reprocess the token.</p>
<dt>A start tag whose tag name is one of: "script", "template"<dt>An end tag whose tag name is "template"<dd>
<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>
<dt>An end-of-file token<dd>
<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>
<dt>Anything else<dd>
<p><a href=#parse-error id=parsing-main-inselect:parse-error-8>Parse error</a>. Ignore the token.</p>
</dl>
<h6 id=parsing-main-inselectintable>12.2.5.4.17 The "<dfn>in select in table</dfn>" insertion mode</h6>
<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
token as follows:</p>
<dl class=switch><dt>A start tag whose tag name is one of: "caption", "table", "tbody", "tfoot", "thead", "tr",
"td", "th"<dd>
<p><a href=#parse-error id=parsing-main-inselectintable:parse-error>Parse error</a>.</p>
<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
has been popped from the stack.</p>
<p><a href=#reset-the-insertion-mode-appropriately id=parsing-main-inselectintable:reset-the-insertion-mode-appropriately>Reset the insertion mode appropriately</a>.</p>
<p>Reprocess the token.</p>
<dt>An end tag whose tag name is one of: "caption", "table", "tbody", "tfoot", "thead", "tr",
"td", "th"<dd>
<p><a href=#parse-error id=parsing-main-inselectintable:parse-error-2>Parse error</a>.</p>
<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
element</a> with the same tag name as that of the token, then ignore the token.</p>
<p>Otherwise:</p>
<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
has been popped from the stack.</p>
<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>
<p>Reprocess the token.</p>
<dt>Anything else<dd>
<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>
</dl>
<h6 id=parsing-main-intemplate>12.2.5.4.18 The "<dfn>in template</dfn>" insertion mode</h6>
<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
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>
<dl class=switch><dt>A character token<dt>A comment token<dt>A DOCTYPE token<dd>
<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>
<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>
<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>
<dt>A start tag whose tag name is one of: "caption", "colgroup", "tbody", "tfoot", "thead"<dd>
<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
insertion modes</a>.</p>
<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
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
mode</a>.</p>
<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
table</a>", and reprocess the token.</p>
<dt>A start tag whose tag name is "col"<dd>
<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
insertion modes</a>.</p>
<p>Push "<a href=#parsing-main-incolgroup id=parsing-main-intemplate:parsing-main-incolgroup>in column group</a>" onto the
<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
insertion mode</a>.</p>
<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
column group</a>", and reprocess the token.</p>
<dt>A start tag whose tag name is "tr"<dd>
<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
insertion modes</a>.</p>
<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
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
mode</a>.</p>
<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
table body</a>", and reprocess the token.</p>
<dt>A start tag whose tag name is one of: "td", "th"<dd>
<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
insertion modes</a>.</p>
<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
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>
<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
row</a>", and reprocess the token.</p>
<dt>Any other start tag<dd>
<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
insertion modes</a>.</p>
<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
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>
<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
body</a>", and reprocess the token.</p>
<dt>Any other end tag<dd>
<p><a href=#parse-error id=parsing-main-intemplate:parse-error>Parse error</a>. Ignore the token.</p>
<dt>An end-of-file token<dd>
<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
<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>
<p>Otherwise, this is a <a href=#parse-error id=parsing-main-intemplate:parse-error-2>parse error</a>.</p>
<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>
element has been popped from the stack.</p>
<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>
<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
insertion modes</a>.</p>
<p><a href=#reset-the-insertion-mode-appropriately id=parsing-main-intemplate:reset-the-insertion-mode-appropriately>Reset the insertion mode appropriately</a>.</p>
<p>Reprocess the token.</p>
</dl>
<h6 id=parsing-main-afterbody>12.2.5.4.19 The "<dfn>after body</dfn>" insertion mode</h6>
<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>
<dl class=switch><dt>A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C
FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dd>
<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>
<dt>A comment token<dd>
<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
open elements</a> (the <code id=parsing-main-afterbody:the-html-element><a href=semantics.html#the-html-element>html</a></code> element).</p>
<dt>A DOCTYPE token<dd>
<p><a href=#parse-error id=parsing-main-afterbody:parse-error>Parse error</a>. Ignore the token.</p>
<dt>A start tag whose tag name is "html"<dd>
<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>
<dt>An end tag whose tag name is "html"<dd>
<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
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
case</a>)</p>
<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>
<dt>An end-of-file token<dd>
<p><a href=#stop-parsing id=parsing-main-afterbody:stop-parsing>Stop parsing</a>.</p>
<dt>Anything else<dd>
<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>
</dl>
<h6 id=parsing-main-inframeset>12.2.5.4.20 The "<dfn>in frameset</dfn>" insertion mode</h6>
<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
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>
<dl class=switch><dt>A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C
FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dd>
<p><a href=#insert-a-character id=parsing-main-inframeset:insert-a-character>Insert the character</a>.</p>
<dt>A comment token<dd>
<p><a href=#insert-a-comment id=parsing-main-inframeset:insert-a-comment>Insert a comment</a>.</p>
<dt>A DOCTYPE token<dd>
<p><a href=#parse-error id=parsing-main-inframeset:parse-error>Parse error</a>. Ignore the token.</p>
<dt>A start tag whose tag name is "html"<dd>
<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>
<dt>A start tag whose tag name is "frameset"<dd>
<p><a href=#insert-an-html-element id=parsing-main-inframeset:insert-an-html-element>Insert an HTML element</a> for the token.</p>
<dt>An end tag whose tag name is "frameset"<dd>
<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
<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>
<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
elements</a>.</p>
<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
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
<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>
<dt>A start tag whose tag name is "frame"<dd>
<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
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>
<p><a href=#acknowledge-self-closing-flag id=parsing-main-inframeset:acknowledge-self-closing-flag>Acknowledge the token's <i>self-closing
flag</i></a>, if it is set.</p>
<dt>A start tag whose tag name is "noframes"<dd>
<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>
<dt>An end-of-file token<dd>
<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
<a href=#parse-error id=parsing-main-inframeset:parse-error-3>parse error</a>.</p>
<p class=note>The <a href=#current-node id=parsing-main-inframeset:current-node-6>current node</a> can only be the root
<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>
<p><a href=#stop-parsing id=parsing-main-inframeset:stop-parsing>Stop parsing</a>.</p>
<dt>Anything else<dd>
<p><a href=#parse-error id=parsing-main-inframeset:parse-error-4>Parse error</a>. Ignore the token.</p>
</dl>
<h6 id=parsing-main-afterframeset>12.2.5.4.21 The "<dfn>after frameset</dfn>" insertion mode</h6>
<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
as follows:</p>
<dl class=switch><dt>A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C
FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dd>
<p><a href=#insert-a-character id=parsing-main-afterframeset:insert-a-character>Insert the character</a>.</p>
<dt>A comment token<dd>
<p><a href=#insert-a-comment id=parsing-main-afterframeset:insert-a-comment>Insert a comment</a>.</p>
<dt>A DOCTYPE token<dd>
<p><a href=#parse-error id=parsing-main-afterframeset:parse-error>Parse error</a>. Ignore the token.</p>
<dt>A start tag whose tag name is "html"<dd>
<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>
<dt>An end tag whose tag name is "html"<dd>
<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>
<dt>A start tag whose tag name is "noframes"<dd>
<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>
<dt>An end-of-file token<dd>
<p><a href=#stop-parsing id=parsing-main-afterframeset:stop-parsing>Stop parsing</a>.</p>
<dt>Anything else<dd>
<p><a href=#parse-error id=parsing-main-afterframeset:parse-error-2>Parse error</a>. Ignore the token.</p>
</dl>
<h6 id=the-after-after-body-insertion-mode>12.2.5.4.22 The "<dfn>after after body</dfn>" insertion mode</h6>
<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
as follows:</p>
<dl class=switch><dt>A comment token<dd>
<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>
<dt>A DOCTYPE token<dt>A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C
FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dt>A start tag whose tag name is "html"<dd>
<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>
<dt>An end-of-file token<dd>
<p><a href=#stop-parsing id=the-after-after-body-insertion-mode:stop-parsing>Stop parsing</a>.</p>
<dt>Anything else<dd>
<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>
</dl>
<h6 id=the-after-after-frameset-insertion-mode>12.2.5.4.23 The "<dfn>after after frameset</dfn>" insertion mode</h6>
<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
token as follows:</p>
<dl class=switch><dt>A comment token<dd>
<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>
<dt>A DOCTYPE token<dt>A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C
FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dt>A start tag whose tag name is "html"<dd>
<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>
<dt>An end-of-file token<dd>
<p><a href=#stop-parsing id=the-after-after-frameset-insertion-mode:stop-parsing>Stop parsing</a>.</p>
<dt>A start tag whose tag name is "noframes"<dd>
<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>
<dt>Anything else<dd>
<p><a href=#parse-error id=the-after-after-frameset-insertion-mode:parse-error>Parse error</a>. Ignore the token.</p>
</dl>
<h5 id=parsing-main-inforeign>12.2.5.5 The rules for parsing tokens <dfn>in foreign content</dfn></h5>
<p>When the user agent is to apply the rules for parsing tokens in foreign content, the user agent
must handle the token as follows:</p>
<dl class=switch><dt>A character token that is U+0000 NULL<dd>
<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
CHARACTER character</a>.</p>
<dt>A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C
FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dd>
<p><a href=#insert-a-character id=parsing-main-inforeign:insert-a-character-2>Insert the token's character</a>.</p>
<dt>Any other character token<dd>
<p><a href=#insert-a-character id=parsing-main-inforeign:insert-a-character-3>Insert the token's character</a>.</p>
<p>Set the <a href=#frameset-ok-flag id=parsing-main-inforeign:frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>
<dt>A comment token<dd>
<p><a href=#insert-a-comment id=parsing-main-inforeign:insert-a-comment>Insert a comment</a>.</p>
<dt>A DOCTYPE token<dd>
<p><a href=#parse-error id=parsing-main-inforeign:parse-error-2>Parse error</a>. Ignore the token.</p>
<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",
"li", "listing",
"menu", "meta", "nobr", "ol", "p", "pre", "ruby", "s", "small", "span", "strong", "strike", "sub",
"sup", "table", "tt", "u", "ul", "var"<dt>A start tag whose tag name is "font", if the token has any attributes named "color", "face",
or "size"<dd>
<p><a href=#parse-error id=parsing-main-inforeign:parse-error-3>Parse error</a>.</p>
<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>,
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>
<p>Otherwise:</p>
<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
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
<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
element in the <a id=parsing-main-inforeign:html-namespace-2 href=infrastructure.html#html-namespace-2>HTML namespace</a>.</p>
<p>Then, reprocess the token.</p>
<dt>Any other start tag<dd>
<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>,
<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
that are not all lowercase.)</p>
<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
token's tag name is one of the ones in the first column of the following table, change the tag
name to the name given in the corresponding cell in the second column. (This fixes the case of
SVG elements that are not all lowercase.)</p>
<table><thead><tr><th> Tag name <th> Element name
<tbody><tr><td> <code>altglyph</code> <td> <code>altGlyph</code>
<tr><td> <code>altglyphdef</code> <td> <code>altGlyphDef</code>
<tr><td> <code>altglyphitem</code> <td> <code>altGlyphItem</code>
<tr><td> <code>animatecolor</code> <td> <code>animateColor</code>
<tr><td> <code>animatemotion</code> <td> <code>animateMotion</code>
<tr><td> <code>animatetransform</code> <td> <code>animateTransform</code>
<tr><td> <code>clippath</code> <td> <code>clipPath</code>
<tr><td> <code>feblend</code> <td> <code>feBlend</code>
<tr><td> <code>fecolormatrix</code> <td> <code>feColorMatrix</code>
<tr><td> <code>fecomponenttransfer</code> <td> <code>feComponentTransfer</code>
<tr><td> <code>fecomposite</code> <td> <code>feComposite</code>
<tr><td> <code>feconvolvematrix</code> <td> <code>feConvolveMatrix</code>
<tr><td> <code>fediffuselighting</code> <td> <code>feDiffuseLighting</code>
<tr><td> <code>fedisplacementmap</code> <td> <code>feDisplacementMap</code>
<tr><td> <code>fedistantlight</code> <td> <code>feDistantLight</code>
<tr><td> <code>fedropshadow</code> <td> <code>feDropShadow</code>
<tr><td> <code>feflood</code> <td> <code>feFlood</code>
<tr><td> <code>fefunca</code> <td> <code>feFuncA</code>
<tr><td> <code>fefuncb</code> <td> <code>feFuncB</code>
<tr><td> <code>fefuncg</code> <td> <code>feFuncG</code>
<tr><td> <code>fefuncr</code> <td> <code>feFuncR</code>
<tr><td> <code>fegaussianblur</code> <td> <code>feGaussianBlur</code>
<tr><td> <code>feimage</code> <td> <code>feImage</code>
<tr><td> <code>femerge</code> <td> <code>feMerge</code>
<tr><td> <code>femergenode</code> <td> <code>feMergeNode</code>
<tr><td> <code>femorphology</code> <td> <code>feMorphology</code>
<tr><td> <code>feoffset</code> <td> <code>feOffset</code>
<tr><td> <code>fepointlight</code> <td> <code>fePointLight</code>
<tr><td> <code>fespecularlighting</code> <td> <code>feSpecularLighting</code>
<tr><td> <code>fespotlight</code> <td> <code>feSpotLight</code>
<tr><td> <code>fetile</code> <td> <code>feTile</code>
<tr><td> <code>feturbulence</code> <td> <code>feTurbulence</code>
<tr><td> <code>foreignobject</code> <td> <code>foreignObject</code>
<tr><td> <code>glyphref</code> <td> <code>glyphRef</code>
<tr><td> <code>lineargradient</code> <td> <code>linearGradient</code>
<tr><td> <code>radialgradient</code> <td> <code>radialGradient</code>
<tr><td> <code>textpath</code> <td> <code>textPath</code>
</table>
<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>,
<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
are not all lowercase.)</p>
<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
attributes, in particular XLink in SVG.)</p>
<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
<a href=#adjusted-current-node id=parsing-main-inforeign:adjusted-current-node-4>adjusted current node</a>.</p>
<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
following list:</p>
<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>
<p><a href=#acknowledge-self-closing-flag id=parsing-main-inforeign:acknowledge-self-closing-flag>Acknowledge the token's <i>self-closing
flag</i></a>, and then act as described in the steps for a "script" end tag below.</p>
<dt>Otherwise<dd>
<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
flag</i></a>.</p>
</dl>
<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>
<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>
<p>Let the <var>old insertion point</var> have the same value as the current
<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
input character</a>.</p>
<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
flag</a> to true.</p>
<p><a href=http://www.w3.org/TR/SVGMobile12/script.html#ScriptContentProcessing>Process the
<code>script</code> element</a> according to the SVG rules, if the user agent supports
SVG. <a href=references.html#refsSVG>[SVG]</a></p>
<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
inserted into the tokenizer</a>, the parser will not be executed reentrantly, since the
<a href=#parser-pause-flag id=parsing-main-inforeign:parser-pause-flag-2>parser pause flag</a> is true.</p>
<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
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>
<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
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.
This value might be the "undefined" value.)</p>
<dt>Any other end tag<dd>
<p>Run these steps:</p>
<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
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
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
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
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
elements</a> until <var>node</var> has been popped from the stack, and then abort
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
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
to the step labeled <i>loop</i>.<li><p>Otherwise, process the token according to the rules given in the section corresponding
to the current <a href=#insertion-mode id=parsing-main-inforeign:insertion-mode>insertion mode</a> in HTML content.</ol>
</dl>
<h4 id=the-end>12.2.6 The end</h4>
<p>Once the user agent <dfn id=stop-parsing>stops parsing</dfn> the document, the user agent
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>
<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>"
and the <a href=#insertion-point id=the-end:insertion-point>insertion point</a> to
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
parsing</a> is not empty, run these substeps:</p>
<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
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
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>
<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
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
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
execute when the document has finished parsing</a> (i.e. shift out the first entry in the
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
parsing</a> is still not empty, repeat these substeps again from substep 1.</p>
</ol>
<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
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
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>
<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>
<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>,
<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
<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>
object.</ol>
<li>
<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
task</a> to run the following substeps:</p>
<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
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
<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>
object,
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
event must not bubble, must not be cancelable, and has no default action.</ol>
<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
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
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
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
<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
loaded</dfn>.</ol>
<p>When the user agent is to <dfn id=abort-a-parser>abort a parser</dfn>, it must run the following steps:</p>
<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
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>
<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
source</a>.</p>
<h4 id=coercing-an-html-dom-into-an-infoset>12.2.7 Coercing an HTML DOM into an infoset</h4>
<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
possible that the constructed DOM is not compatible with the XML tool chain in certain subtle
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
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
section specifies some rules for handling these issues.</p>
<p>If the XML API being used doesn't support DOCTYPEs, the tool may drop DOCTYPEs altogether.</p>
<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
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>
<p>The tool may annotate the output with any namespace declarations required for proper
operation.</p>
<p>If the XML API being used restricts the allowable characters in the local names of elements and
attributes, then the tool may map all element and attribute local names that the API wouldn't
support to a set of names that <em>are</em> allowed, by replacing any character that isn't
supported with the uppercase letter U and the six digits of the character's Unicode code point
when expressed in hexadecimal, using digits 0-9 and capital letters A-F as the symbols, in
increasing numeric order.</p>
<p class=example>For example, the element name <code>foo&lt;bar</code>, which can be
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
well-formed XML element name, would be converted into <code>fooU00003Cbar</code>, which
<em>is</em> a well-formed XML element name (though it's still not legal in HTML by any means).</p>
<p class=example>As another example, consider the attribute <code>xlink:href</code>.
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
name "<code>href</code>". However, used on an HTML element, it becomes an attribute with
no prefix and the local name "<code>xlink:href</code>", which is not a valid NCName, and
thus might not be accepted by an XML API. It could thus get converted, becoming "<code>xlinkU00003Ahref</code>".</p>
<p class=note>The resulting names from this conversion conveniently can't clash with any
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
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>
<p>If the XML API restricts comments from having two consecutive U+002D HYPHEN-MINUS characters
(--), the tool may insert a single U+0020 SPACE character between any such offending
characters.</p>
<p>If the XML API restricts comments from ending in a U+002D HYPHEN-MINUS character (-), the tool
may insert a single U+0020 SPACE character at the end of such comments.</p>
<p>If the XML API restricts allowed characters in character data, attribute values, or comments,
the tool may replace any U+000C FORM FEED (FF) character with a U+0020 SPACE character, and any
other literal non-XML character with a U+FFFD REPLACEMENT CHARACTER.</p>
<p>If the tool has no way to convey out-of-band information, then the tool may drop the following
information:</p>
<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
<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>
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>
<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
parser</a>'s rules have been applied. For example, a <code>&lt;a::></code> start tag
will be closed by a <code>&lt;/a::></code> end tag, and never by a <code>&lt;/aU00003AU00003A></code> end tag, even if the user agent is using the rules above to
then generate an actual element in the DOM with the name <code>aU00003AU00003A</code> for
that start tag.</p>
<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>
<p><i>This section is non-normative.</i></p>
<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>
handles these cases.</p>
<h5 id=misnested-tags:-b-i-/b-/i>12.2.8.1 Misnested tags: &lt;b>&lt;i>&lt;/b>&lt;/i></h5>
<p><i>This section is non-normative.</i></p>
<p>The most-often discussed example of erroneous markup is as follows:</p>
<pre>&lt;p>1&lt;b>2&lt;i>3&lt;/b>4&lt;/i>5&lt;/p></pre>
<p>The parsing of this markup is straightforward up to the "3". At this point, the DOM looks like
this:</p>
<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>
<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>,
<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
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
mode</a> is "<a href=#parsing-main-inbody id=misnested-tags:-b-i-/b-/i:parsing-main-inbody>in body</a>".</p>
<p>Upon receiving the end tag token with the tag name "b", the "<a href=#adoptionAgency>adoption
agency algorithm</a>" is invoked. This is a simple case, in that the <var>formatting
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>.
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>,
<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>
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>
<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
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"
<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"
<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>
<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>
<h5 id=misnested-tags:-b-p-/b-/p>12.2.8.2 Misnested tags: &lt;b>&lt;p>&lt;/b>&lt;/p></h5>
<p><i>This section is non-normative.</i></p>
<p>A case similar to the previous one is the following:</p>
<pre>&lt;b>1&lt;p>2&lt;/b>3&lt;/p></pre>
<p>Up to the "2" the parsing here is straightforward:</p>
<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>
<p>The interesting part is when the end tag token with the tag name "b" is parsed.</p>
<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:
<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
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
"<a href=#parsing-main-inbody id=misnested-tags:-b-p-/b-/p:parsing-main-inbody>in body</a>".</p>
<p>Upon receiving the end tag token with the tag name "b", the "<a href=#adoptionAgency>adoption
agency algorithm</a>" is invoked, as in the previous example. However, in this case, there
<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
time the adoption agency algorithm isn't skipped over.</p>
<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
"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
elements</a>, but since that list has only one element in it, the bookmark won't have much
effect.</p>
<p>As the algorithm progresses, <var>node</var> ends up set to the formatting element
(<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
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>
<p>The <var>last node</var> gets appended (moved) to the <var>common
ancestor</var>, so that the DOM looks like:</p>
<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>
<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
moved to it:</p>
<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>
<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>
<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
DOM looks like:</p>
<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>
<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>
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
<code id=misnested-tags:-b-p-/b-/p:the-p-element-10><a href=semantics.html#the-p-element>p</a></code> element:</p>
<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>
<h5 id=unexpected-markup-in-tables>12.2.8.3 Unexpected markup in tables</h5>
<p><i>This section is non-normative.</i></p>
<p>Error handling in tables is, for historical reasons, especially strange. For example, consider
the following markup:</p>
<pre>&lt;table><strong>&lt;b></strong>&lt;tr>&lt;td>aaa&lt;/td>&lt;/tr><strong>bbb</strong>&lt;/table>ccc</pre>
<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
that, and the parser handles this case by placing the element <em>before</em> the table. (This is
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
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>
<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>
<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>
<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>
<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
<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,
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
<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>
<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
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
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>
<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>
<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>,
<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
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
<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>
<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
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
formatting elements</a> (it also switches to the "<a href=#parsing-main-intd id=unexpected-markup-in-tables:parsing-main-intd>in
cell</a>" <a href=#insertion-mode id=unexpected-markup-in-tables:insertion-mode-3>insertion mode</a>).</p>
<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>
<p>The <a href=#concept-parser-marker id=unexpected-markup-in-tables:concept-parser-marker-2>marker</a> means that when the "aaa" character
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>
node:</p>
<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>
<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
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>,
<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>
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>
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>
<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
insertion mode</a> set to "<a href=#parsing-main-intbody id=unexpected-markup-in-tables:parsing-main-intbody-3>in table body</a>").
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
tag) is seen, they are processed as a group. Since they are not all spaces, they are handled as
per the "anything else" rules in the "<a href=#parsing-main-intable id=unexpected-markup-in-tables:parsing-main-intable-2>in table</a>"
insertion mode, which defer to the "<a href=#parsing-main-inbody id=unexpected-markup-in-tables:parsing-main-inbody>in body</a>"
insertion mode but with <a href=#foster-parent id=unexpected-markup-in-tables:foster-parent-2>foster parenting</a>.</p>
<p>When <a href=#reconstruct-the-active-formatting-elements id=unexpected-markup-in-tables:reconstruct-the-active-formatting-elements>the active formatting elements
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>
<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>
<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>,
<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
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>
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>
<p>Had the character tokens been only <a href=infrastructure.html#space-character id=unexpected-markup-in-tables:space-character>space characters</a>
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
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>
<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
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
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
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
table:</p>
<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>
<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>
<p><i>This section is non-normative.</i></p>
<p>Consider the following markup, which for this example we will assume is the document with
<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
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>
<pre>&lt;div id=a>
&lt;script>
var div = document.getElementById('a');
parent.document.body.appendChild(div);
&lt;/script>
&lt;script>
alert(document.URL);
&lt;/script>
&lt;/div>
&lt;script>
alert(document.URL);
&lt;/script></pre>
<p>Up to the first "script" end tag, before the script is parsed, the result is relatively
straightforward:</p>
<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>
</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>
<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
<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>
<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>
<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
<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
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>
<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
<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>
<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
not execute, so the first alert does not show.</p>
<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
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
<code id=scripts-that-modify-the-page-as-it-is-being-parsed:document-4><a href=dom.html#document>Document</a></code>:</p>
<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>
<p>This script does execute, resulting in an alert that says "http://example.com/inner".</p>
<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>
<p><i>This section is non-normative.</i></p>
<p>Elaborating on the example in the previous section, consider the case where the second
<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
<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>
<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>
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
script is being downloaded, the element is moved to another document, the script continues to
download, but does not execute.</p>
<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
considered a bad practice.</p>
<h5 id=unclosed-formatting-elements>12.2.8.6 Unclosed formatting elements</h5>
<p><i>This section is non-normative.</i></p>
<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
collected and continue to be applied even as the elements they are contained in are closed, but
that excessive duplicates are thrown away.</p>
<pre>&lt;!DOCTYPE html>
&lt;p>&lt;b class=x>&lt;b class=x>&lt;b>&lt;b class=x>&lt;b class=x>&lt;b>X
&lt;p>X
&lt;p>&lt;b>&lt;b class=x>&lt;b>X
&lt;p>&lt;/b>&lt;/b>&lt;/b>&lt;/b>&lt;/b>&lt;/b>X</pre>
<p>The resulting DOM tree is as follows:</p>
<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>
<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>
elements, but in the resulting DOM, up to three of each kind of formatting element (in this case
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)
get reconstructed before the element's "X".</p>
<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
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
<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>
<h3 id=serialising-html-fragments>12.3 Serialising HTML fragments</h3>
<p>The following steps form the <dfn id=html-fragment-serialisation-algorithm>HTML fragment serialisation algorithm</dfn>. The algorithm
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>
referred to as <var>the node</var>, and either returns a string or throws an
exception.</p>
<p class=note>This algorithm serialises the <em>children</em> of the node being serialised, not
the node itself.</p>
<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
contents</a> (a <code id=serialising-html-fragments:documentfragment-2><a href=infrastructure.html#documentfragment>DocumentFragment</a></code> node).<li>
<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
following steps:
<ol><li><p>Let <var>current node</var> be the child node being processed.<li>
<p>Append the appropriate string from the following list to <var>s</var>:</p>
<dl class=switch><dt>If <var>current node</var> is an <code>Element</code><dd>
<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
<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>
<p>Append a U+003C LESS-THAN SIGN character (&lt;), followed by <var>tagname</var>.</p>
<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
<code>Document.createElement()</code>, <var>tagname</var> will be
lowercase.</p>
<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
U+003D EQUALS SIGN character (=), a U+0022 QUOTATION MARK character ("), the
attribute's value, <a href=#escapingString id=serialising-html-fragments:escapingString>escaped as described below</a> in
<i>attribute mode</i>, and a second U+0022 QUOTATION MARK character (").</p>
<p>An <dfn id="attribute's-serialised-name">attribute's serialised name</dfn> for the purposes of the previous paragraph must
be determined as follows:</p>
<dl class=switch><dt>If the attribute has no namespace<dd>
<p>The attribute's serialised name is the attribute's local name.</p>
<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
parser</a> or by <code>Element.setAttribute()</code>, the local name will be
lowercase.</p>
<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
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
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
is not <code>xmlns</code><dd><p>The attribute's serialised name is the string "<code>xmlns:</code>"
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>"
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>
<p>While the exact order of attributes is UA-defined, and may depend on factors such as the
order that the attributes were given in the original markup, the sort order must be stable,
such that consecutive invocations of this algorithm serialise an element's attributes in the
same order.</p>
<p>Append a U+003E GREATER-THAN SIGN character (>).</p>
<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>,
<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>,
<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>,
<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>,
<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
<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>
<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
<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
<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
(LF) character, then append a U+000A LINE FEED (LF) character.</p>
<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
<var>current node</var> element (thus recursing into this algorithm for that
element), followed by a U+003C LESS-THAN SIGN character (&lt;), a U+002F SOLIDUS character
(/), <var>tagname</var> again, and finally a U+003E GREATER-THAN SIGN character
(>).</p>
<dt>If <var>current node</var> is a <code>Text</code> node<dd>
<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>,
<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>,
<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
<var>current node</var>'s <code>data</code> IDL attribute literally.</p>
<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
below</a>.</p>
<dt>If <var>current node</var> is a <code>Comment</code><dd>
<p>Append the literal string "<code>&lt;!--</code>" (U+003C LESS-THAN SIGN, U+0021
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
literal string "<code>--></code>" (U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS,
U+003E GREATER-THAN SIGN).</p>
<dt>If <var>current node</var> is a <code>ProcessingInstruction</code><dd>
<p>Append the literal string "<code>&lt;?</code>" (U+003C LESS-THAN SIGN, U+003F
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
by the value of <var>current node</var>'s <code>data</code> IDL
attribute, followed by a single U+003E GREATER-THAN SIGN character (>).</p>
<dt>If <var>current node</var> is a <code>DocumentType</code><dd>
<p>Append the literal string "<code>&lt;!DOCTYPE</code>" (U+003C LESS-THAN SIGN, U+0021
EXCLAMATION MARK, U+0044 LATIN CAPITAL LETTER D, U+004F LATIN CAPITAL LETTER O, U+0043 LATIN
CAPITAL LETTER C, U+0054 LATIN CAPITAL LETTER T, U+0059 LATIN CAPITAL LETTER Y, U+0050 LATIN
CAPITAL LETTER P, U+0045 LATIN CAPITAL LETTER E), followed by a space (U+0020 SPACE),
followed by the value of <var>current node</var>'s <code>name</code> IDL
attribute, followed by the literal string "<code>></code>" (U+003E GREATER-THAN SIGN).</p>
</dl>
</ol>
<li><p>The result of the algorithm is the string <var>s</var>.</ol>
<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
parser</a>, will not return the original tree structure.</p>
<div class=example>
<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
has been appended is serialised and the output is then reparsed, the comment will end up being
displayed in the text field. Similarly, if, as a result of DOM manipulation, an element contains
a comment that contains the literal string "<code>--></code>", then when the result
of serialising the element is parsed, the comment will be truncated at that point and the rest of
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>
element contain a <code id=serialising-html-fragments:text-2><a href=infrastructure.html#text>Text</a></code> node with the text string "<code>&lt;/script></code>", or
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>
element's <a href=#syntax-start-tag id=serialising-html-fragments:syntax-start-tag>start tag</a> would imply the end tag for the
<code id=serialising-html-fragments:the-p-element-2><a href=semantics.html#the-p-element>p</a></code>).</p>
<p>This can enable cross-site scripting attacks. An example of this would be a page that lets the
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
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
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
"<code>&lt;/style>&lt;script>attack&lt;/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,
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
original DOM.</p>
</div>
<p><dfn id=escapingString>Escaping a string</dfn> (for the purposes of the algorithm above)
consists of running the following steps:</p>
<ol><li><p>Replace any occurrence of the "<code>&amp;</code>" character by the string "<code>&amp;amp;</code>".<li><p>Replace any occurrences of the U+00A0 NO-BREAK SPACE character by the string "<code>&amp;nbsp;</code>".<li><p>If the algorithm was invoked in the <i>attribute mode</i>, replace any occurrences of the
"<code>"</code>" character by the string "<code>&amp;quot;</code>".<li><p>If the algorithm was <em>not</em> invoked in the <i>attribute mode</i>, replace any
occurrences of the "<code>&lt;</code>" character by the string "<code>&amp;lt;</code>", and any occurrences of the "<code>></code>" character by
the string "<code>&amp;gt;</code>".</ol>
<h3 id=parsing-html-fragments>12.4 Parsing HTML fragments</h3>
<p>The following steps form the <dfn id=html-fragment-parsing-algorithm>HTML fragment parsing algorithm</dfn>. The algorithm
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
the parser, as well as <var>input</var>, a string to parse, and returns a list of zero or
more nodes.</p>
<p class=note>Parts marked <dfn id=fragment-case>fragment case</dfn> in algorithms in the parser section are
parts that only occur if the parser was created for the purposes of this algorithm (and with a
<var id=parsing-html-fragments:concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></var> element). The algorithms have been annotated
with such markings for informational purposes only; such markings have no normative weight. If it
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
parser wasn't created for the purposes of handling this algorithm, then that is an error in the
specification.</p>
<ol><li>
<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>
<li>
<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
<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
<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>.
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
<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
<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
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>
<li>
<p>Create a new <a href=#html-parser id=parsing-html-fragments:html-parser>HTML parser</a>, and associate it with the just created
<code id=parsing-html-fragments:document-5><a href=dom.html#document>Document</a></code> node.</p>
<li>
<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
substeps:</p>
<ol><li>
<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
follows:</p>
<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>,
<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
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>
<p class=note>For performance reasons, an implementation that does not report errors and
that uses the actual state machine described in this specification directly could use the
PLAINTEXT state instead of the RAWTEXT and script data states where those are mentioned in the
list above. Except for rules regarding parse errors, they are equivalent, since there is no
<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
transitions.</p>
<li>
<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>
<li>
<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
above.</p>
<li>
<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
element <var>root</var>.</p>
<li>
<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
<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
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
<a href=#current-template-insertion-mode id=parsing-html-fragments:current-template-insertion-mode>current template insertion mode</a>.</p>
<li>
<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
<var id=parsing-html-fragments:concept-frag-parse-context-9><a href=#concept-frag-parse-context>context</a></var>.</p>
<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
if it is an <a href=#html-integration-point id=parsing-html-fragments:html-integration-point>HTML integration point</a>.</p>
<li>
<p><a href=#reset-the-insertion-mode-appropriately id=parsing-html-fragments:reset-the-insertion-mode-appropriately>Reset the parser's insertion mode
appropriately</a>.</p>
<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>
<li>
<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
<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>
element (going straight up the ancestor chain, and including the element itself, if it is a
<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
<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>
</ol>
<li>
<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
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>
<li>
<p>Start the parser and let it run until it has consumed all the characters just inserted into
the input stream.</p>
<li>
<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
nodes of <var>root</var>, in <a id=parsing-html-fragments:tree-order href=infrastructure.html#tree-order>tree order</a>.</p>
<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
order</a>.</p>
</ol>
<h3 id=named-character-references>12.5 <dfn>Named character references</dfn></h3>
<p>This table lists the character reference names that are supported by HTML, and the code points
to which they refer. It is referenced by the previous sections.</p>
<div id=named-character-references-table>
<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>&amp;</span> <tr id=entity-AMP-legacy class=impl><td> <code>AMP</code> <td> U+00026 <td> <span>&amp;</span> <tr id=entity-amp><td> <code>amp;</code> <td> U+00026 <td> <span class=glyph>&amp;</span> <tr id=entity-amp-legacy class=impl><td> <code>amp</code> <td> U+00026 <td> <span>&amp;</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>IJ</span> <tr id=entity-ijlig><td> <code>ijlig;</code> <td> U+00133 <td> <span class=glyph>ij</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>&lt;</span> <tr id=entity-LT-legacy class=impl><td> <code>LT</code> <td> U+0003C <td> <span>&lt;</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>&lt;</span> <tr id=entity-lt-legacy class=impl><td> <code>lt</code> <td> U+0003C <td> <span>&lt;</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>ʼn</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">&lt;⃒</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>
</div>
<p>This data is also available <a href=entities.json>as a JSON file</a>.</p>
<p><i>The glyphs displayed above are non-normative. Refer to the Unicode specifications for formal
definitions of the characters listed above.</i></p>
<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>