193fb6ee3Sopenharmony_ci 293fb6ee3Sopenharmony_ci<!DOCTYPE html><html class=split data-revision="$Revision: 8844 $" lang=en-GB-x-hixie><title>HTML Standard</title><script> 393fb6ee3Sopenharmony_ci var loadTimer = new Date(); 493fb6ee3Sopenharmony_ci var current_revision = "r" + document.documentElement.getAttribute('data-revision').substr(11); 593fb6ee3Sopenharmony_ci current_revision = current_revision.substr(0, current_revision.length - 2); 693fb6ee3Sopenharmony_ci var last_known_revision = current_revision; 793fb6ee3Sopenharmony_ci function F( /* varargs... */) { 893fb6ee3Sopenharmony_ci var fragment = document.createDocumentFragment(); 993fb6ee3Sopenharmony_ci for (var index = 0; index < arguments.length; index += 1) { 1093fb6ee3Sopenharmony_ci if (arguments[index] instanceof Array) { 1193fb6ee3Sopenharmony_ci fragment.appendChild(F.apply(this, arguments[index])); 1293fb6ee3Sopenharmony_ci } else if (typeof arguments[index] == 'string') { 1393fb6ee3Sopenharmony_ci fragment.appendChild(document.createTextNode(arguments[index])); 1493fb6ee3Sopenharmony_ci } else { 1593fb6ee3Sopenharmony_ci fragment.appendChild(arguments[index]); 1693fb6ee3Sopenharmony_ci } 1793fb6ee3Sopenharmony_ci } 1893fb6ee3Sopenharmony_ci return fragment; 1993fb6ee3Sopenharmony_ci } 2093fb6ee3Sopenharmony_ci function E(name, /* optional */ attributes /*, varargs... */) { 2193fb6ee3Sopenharmony_ci var element = document.createElement(name); 2293fb6ee3Sopenharmony_ci var index = 1; 2393fb6ee3Sopenharmony_ci if ((arguments.length > 1) && (typeof attributes != 'string') && 2493fb6ee3Sopenharmony_ci (!(attributes instanceof Node)) && (!(attributes instanceof Array))) { 2593fb6ee3Sopenharmony_ci for (var attName in attributes) { 2693fb6ee3Sopenharmony_ci if (typeof attributes[attName] == 'boolean') { 2793fb6ee3Sopenharmony_ci if (attributes[attName]) 2893fb6ee3Sopenharmony_ci element.setAttribute(attName, ''); 2993fb6ee3Sopenharmony_ci } else if (typeof attributes[attName] == 'function') { 3093fb6ee3Sopenharmony_ci element[attName] = attributes[attName]; 3193fb6ee3Sopenharmony_ci } else { 3293fb6ee3Sopenharmony_ci element.setAttribute(attName, attributes[attName]); 3393fb6ee3Sopenharmony_ci } 3493fb6ee3Sopenharmony_ci } 3593fb6ee3Sopenharmony_ci index = 2; 3693fb6ee3Sopenharmony_ci } 3793fb6ee3Sopenharmony_ci for (; index < arguments.length; index += 1) { 3893fb6ee3Sopenharmony_ci if (arguments[index] instanceof Array) { 3993fb6ee3Sopenharmony_ci element.appendChild(F.apply(this, arguments[index])); 4093fb6ee3Sopenharmony_ci } else if (typeof arguments[index] == 'string') { 4193fb6ee3Sopenharmony_ci element.appendChild(document.createTextNode(arguments[index])); 4293fb6ee3Sopenharmony_ci } else { 4393fb6ee3Sopenharmony_ci element.appendChild(arguments[index]); 4493fb6ee3Sopenharmony_ci } 4593fb6ee3Sopenharmony_ci } 4693fb6ee3Sopenharmony_ci return element; 4793fb6ee3Sopenharmony_ci } 4893fb6ee3Sopenharmony_ci function getCookie(name) { 4993fb6ee3Sopenharmony_ci var params = location.search.substr(1).split("&"); 5093fb6ee3Sopenharmony_ci for (var index = 0; index < params.length; index++) { 5193fb6ee3Sopenharmony_ci if (params[index] == name) 5293fb6ee3Sopenharmony_ci return "1"; 5393fb6ee3Sopenharmony_ci var data = params[index].split("="); 5493fb6ee3Sopenharmony_ci if (data[0] == name) 5593fb6ee3Sopenharmony_ci return unescape(data[1]); 5693fb6ee3Sopenharmony_ci } 5793fb6ee3Sopenharmony_ci var cookies = document.cookie.split("; "); 5893fb6ee3Sopenharmony_ci for (var index = 0; index < cookies.length; index++) { 5993fb6ee3Sopenharmony_ci var data = cookies[index].split("="); 6093fb6ee3Sopenharmony_ci if (data[0] == name) 6193fb6ee3Sopenharmony_ci return unescape(data[1]); 6293fb6ee3Sopenharmony_ci } 6393fb6ee3Sopenharmony_ci return null; 6493fb6ee3Sopenharmony_ci } 6593fb6ee3Sopenharmony_ci var currentAlert; 6693fb6ee3Sopenharmony_ci var currentAlertTimeout; 6793fb6ee3Sopenharmony_ci function showAlert(s, href) { 6893fb6ee3Sopenharmony_ci if (!currentAlert) { 6993fb6ee3Sopenharmony_ci currentAlert = document.createElement('div'); 7093fb6ee3Sopenharmony_ci currentAlert.id = 'alert'; 7193fb6ee3Sopenharmony_ci var x = document.createElement('button'); 7293fb6ee3Sopenharmony_ci x.textContent = '\u2573'; 7393fb6ee3Sopenharmony_ci x.onclick = closeAlert2; 7493fb6ee3Sopenharmony_ci currentAlert.appendChild(x); 7593fb6ee3Sopenharmony_ci currentAlert.appendChild(document.createElement('span')); 7693fb6ee3Sopenharmony_ci currentAlert.onmousemove = function () { 7793fb6ee3Sopenharmony_ci clearTimeout(currentAlertTimeout); 7893fb6ee3Sopenharmony_ci currentAlert.className = ''; 7993fb6ee3Sopenharmony_ci currentAlertTimeout = setTimeout(closeAlert, 10000); 8093fb6ee3Sopenharmony_ci } 8193fb6ee3Sopenharmony_ci document.body.appendChild(currentAlert); 8293fb6ee3Sopenharmony_ci } else { 8393fb6ee3Sopenharmony_ci clearTimeout(currentAlertTimeout); 8493fb6ee3Sopenharmony_ci currentAlert.className = ''; 8593fb6ee3Sopenharmony_ci } 8693fb6ee3Sopenharmony_ci currentAlert.lastChild.textContent = ''; 8793fb6ee3Sopenharmony_ci currentAlert.lastChild.appendChild(F(s)); 8893fb6ee3Sopenharmony_ci if (href) { 8993fb6ee3Sopenharmony_ci var link = document.createElement('a'); 9093fb6ee3Sopenharmony_ci link.href = href; 9193fb6ee3Sopenharmony_ci link.textContent = href; 9293fb6ee3Sopenharmony_ci currentAlert.lastChild.appendChild(F(' ', link)); 9393fb6ee3Sopenharmony_ci } 9493fb6ee3Sopenharmony_ci currentAlertTimeout = setTimeout(closeAlert, 10000); 9593fb6ee3Sopenharmony_ci } 9693fb6ee3Sopenharmony_ci function closeAlert() { 9793fb6ee3Sopenharmony_ci clearTimeout(currentAlertTimeout); 9893fb6ee3Sopenharmony_ci if (currentAlert) { 9993fb6ee3Sopenharmony_ci currentAlert.className = 'closed'; 10093fb6ee3Sopenharmony_ci currentAlertTimeout = setTimeout(closeAlert2, 3000); 10193fb6ee3Sopenharmony_ci } 10293fb6ee3Sopenharmony_ci } 10393fb6ee3Sopenharmony_ci function closeAlert2() { 10493fb6ee3Sopenharmony_ci clearTimeout(currentAlertTimeout); 10593fb6ee3Sopenharmony_ci if (currentAlert) { 10693fb6ee3Sopenharmony_ci currentAlert.parentNode.removeChild(currentAlert); 10793fb6ee3Sopenharmony_ci currentAlert = null; 10893fb6ee3Sopenharmony_ci } 10993fb6ee3Sopenharmony_ci } 11093fb6ee3Sopenharmony_ci window.addEventListener('keydown', function (event) { 11193fb6ee3Sopenharmony_ci if (event.keyCode == 27) { 11293fb6ee3Sopenharmony_ci if (currentAlert) 11393fb6ee3Sopenharmony_ci closeAlert2(); 11493fb6ee3Sopenharmony_ci } else { 11593fb6ee3Sopenharmony_ci closeAlert(); 11693fb6ee3Sopenharmony_ci } 11793fb6ee3Sopenharmony_ci }, false); 11893fb6ee3Sopenharmony_ci window.addEventListener('scroll', function (event) { 11993fb6ee3Sopenharmony_ci closeAlert(); 12093fb6ee3Sopenharmony_ci }, false); 12193fb6ee3Sopenharmony_ci function load(script) { 12293fb6ee3Sopenharmony_ci var e = document.createElement('script'); 12393fb6ee3Sopenharmony_ci e.setAttribute('src', '/' + script); 12493fb6ee3Sopenharmony_ci document.body.appendChild(e); 12593fb6ee3Sopenharmony_ci } 12693fb6ee3Sopenharmony_ci 12793fb6ee3Sopenharmony_ci var startedInit = 0; 12893fb6ee3Sopenharmony_ci function init() { 12993fb6ee3Sopenharmony_ci startedInit = 1; 13093fb6ee3Sopenharmony_ci if (location.search == '?slow-browser') 13193fb6ee3Sopenharmony_ci return; 13293fb6ee3Sopenharmony_ci load('reviewer.js'); 13393fb6ee3Sopenharmony_ci if (document.documentElement.className == "big" || document.documentElement.className == "big split index") 13493fb6ee3Sopenharmony_ci load('toc.js'); 13593fb6ee3Sopenharmony_ci load('updater.js'); 13693fb6ee3Sopenharmony_ci load('dfn.js'); 13793fb6ee3Sopenharmony_ci load('status.js'); 13893fb6ee3Sopenharmony_ci if (getCookie('profile') == '1') 13993fb6ee3Sopenharmony_ci document.getElementsByTagName('h2')[0].textContent += '; load: ' + (new Date() - loadTimer) + 'ms'; 14093fb6ee3Sopenharmony_ci } 14193fb6ee3Sopenharmony_ci if (document.documentElement.className == "") 14293fb6ee3Sopenharmony_ci setTimeout(function () { 14393fb6ee3Sopenharmony_ci if (!startedInit) 14493fb6ee3Sopenharmony_ci showAlert("Too slow? Try reading the multipage copy of the spec instead:", "https://whatwg.org/html"); 14593fb6ee3Sopenharmony_ci }, 6000); 14693fb6ee3Sopenharmony_ci 14793fb6ee3Sopenharmony_ci window.addEventListener('keypress', function (event) { 14893fb6ee3Sopenharmony_ci if ((event.which == 114) && (event.metaKey)) { 14993fb6ee3Sopenharmony_ci if (!confirm('Are you sure you want to reload this page?')) 15093fb6ee3Sopenharmony_ci event.preventDefault(); 15193fb6ee3Sopenharmony_ci } 15293fb6ee3Sopenharmony_ci }, false); 15393fb6ee3Sopenharmony_ci </script><script> 15493fb6ee3Sopenharmony_ci function toggleStatus(div) { 15593fb6ee3Sopenharmony_ci div.parentNode.classList.toggle('wrapped'); 15693fb6ee3Sopenharmony_ci } 15793fb6ee3Sopenharmony_ci </script><link rel=stylesheet href=https://whatwg.org/style/specification><link rel=icon href=https://whatwg.org/images/icon><style> 15893fb6ee3Sopenharmony_ci [hidden] { display: none; } 15993fb6ee3Sopenharmony_ci 16093fb6ee3Sopenharmony_ci .proposal { border: blue solid; padding: 1em; } 16193fb6ee3Sopenharmony_ci .bad, .bad *:not(.X\58X) { color: gray; border-color: gray; background: transparent; } 16293fb6ee3Sopenharmony_ci #updatesStatus { display: none; z-index: 10; } 16393fb6ee3Sopenharmony_ci #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; } 16493fb6ee3Sopenharmony_ci div.head .logo { width: 11em; margin-bottom: 20em; } 16593fb6ee3Sopenharmony_ci 16693fb6ee3Sopenharmony_ci #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; } 16793fb6ee3Sopenharmony_ci #configUI p { margin: 0.75em 0; padding: 0.3em; } 16893fb6ee3Sopenharmony_ci #configUI p label { display: block; } 16993fb6ee3Sopenharmony_ci #configUI #updateUI, #configUI .loginUI { text-align: center; } 17093fb6ee3Sopenharmony_ci #configUI input[type=button] { display: block; margin: auto; } 17193fb6ee3Sopenharmony_ci #configUI :link, #configUI :visited { color: white; } 17293fb6ee3Sopenharmony_ci #configUI :link:hover, #configUI :visited:hover { background: transparent; } 17393fb6ee3Sopenharmony_ci 17493fb6ee3Sopenharmony_ci #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; } 17593fb6ee3Sopenharmony_ci #alert.closed { opacity: 0; } 17693fb6ee3Sopenharmony_ci #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; } 17793fb6ee3Sopenharmony_ci #alert :link, #alert :visited { color: white; text-decoration: underline; } 17893fb6ee3Sopenharmony_ci #alert :link:hover, #alert :visited:hover { background: transparent; } 17993fb6ee3Sopenharmony_ci 18093fb6ee3Sopenharmony_ci @media print { #configUI, #alert { display: none; } } 18193fb6ee3Sopenharmony_ci 18293fb6ee3Sopenharmony_ci .fingerprint { position: absolute; right: 0; z-index: 5; } 18393fb6ee3Sopenharmony_ci 18493fb6ee3Sopenharmony_ci .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; } 18593fb6ee3Sopenharmony_ci .status.wrapped { width: 1em; height: 1em; } 18693fb6ee3Sopenharmony_ci .status.wrapped > :not(input) { display: none; } 18793fb6ee3Sopenharmony_ci .status > input { position: absolute; right: 0; top: 0; width: 1em; height: 1em; border: none; background: transparent; padding: 0; margin: 0; } 18893fb6ee3Sopenharmony_ci .status > p { font-size: 0.6em; margin: 0; padding: 0; } 18993fb6ee3Sopenharmony_ci .status > p + p { padding-top: 0.5em; } 19093fb6ee3Sopenharmony_ci .status > .support { display: block; } 19193fb6ee3Sopenharmony_ci .status > .support > span { padding: 0.2em 0; display: block; display: table; } 19293fb6ee3Sopenharmony_ci .status > .support > span.partial { color: #666666; filter: grayscale(50%); } 19393fb6ee3Sopenharmony_ci .status > .support > span.no { color: #CCCCCC; filter: grayscale(100%); } 19493fb6ee3Sopenharmony_ci .status > .support > span:first-of-type { padding-top: 0.5em; } 19593fb6ee3Sopenharmony_ci .status > .support > span > span { padding: 0 0.5em; display: table-cell; vertical-align: top; } 19693fb6ee3Sopenharmony_ci .status > .support > span > span:first-child { width: 100%; } 19793fb6ee3Sopenharmony_ci .status > .support > span > span:last-child { width: 100%; white-space: pre; padding: 0; } 19893fb6ee3Sopenharmony_ci .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; } 19993fb6ee3Sopenharmony_ci .status > .support > .and_chr::before { background-image: url(https://resources.whatwg.org/browser-logos/chrome-android.png); } 20093fb6ee3Sopenharmony_ci .status > .support > .and_ff::before { background-image: url(https://resources.whatwg.org/browser-logos/firefox.png); } 20193fb6ee3Sopenharmony_ci .status > .support > .and_uc::before { background-image: url(https://resources.whatwg.org/browser-logos/uc.png); } /* UC Browser for Android */ 20293fb6ee3Sopenharmony_ci .status > .support > .android::before { background-image: url(https://resources.whatwg.org/browser-logos/android.svg); } 20393fb6ee3Sopenharmony_ci .status > .support > .bb::before { background-image: url(https://resources.whatwg.org/browser-logos/bb.jpg); } /* Blackberry Browser */ 20493fb6ee3Sopenharmony_ci .status > .support > .chrome::before { background-image: url(https://resources.whatwg.org/browser-logos/chrome.png); } 20593fb6ee3Sopenharmony_ci .status > .support > .firefox::before { background-image: url(https://resources.whatwg.org/browser-logos/firefox.png); } 20693fb6ee3Sopenharmony_ci .status > .support > .ie::before { background-image: url(https://resources.whatwg.org/browser-logos/ie.png); } 20793fb6ee3Sopenharmony_ci .status > .support > .ie_mob::before { background-image: url(https://resources.whatwg.org/browser-logos/ie-mobile.svg); } 20893fb6ee3Sopenharmony_ci .status > .support > .ios_saf::before { background-image: url(https://resources.whatwg.org/browser-logos/safari-ios.svg); } 20993fb6ee3Sopenharmony_ci .status > .support > .op_mini::before { background-image: url(https://resources.whatwg.org/browser-logos/opera-mobile.png); } 21093fb6ee3Sopenharmony_ci .status > .support > .op_mob::before { background-image: url(https://resources.whatwg.org/browser-logos/opera-mobile.png); } 21193fb6ee3Sopenharmony_ci .status > .support > .opera::before { background-image: url(https://resources.whatwg.org/browser-logos/opera.png); } 21293fb6ee3Sopenharmony_ci .status > .support > .safari::before { background-image: url(https://resources.whatwg.org/browser-logos/safari.png); } 21393fb6ee3Sopenharmony_ci .status > .caniuse { text-align: right; font-style: italic; } 21493fb6ee3Sopenharmony_ci 21593fb6ee3Sopenharmony_ci .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; } 21693fb6ee3Sopenharmony_ci .panel h2 { margin: 0; text-align: center; } 21793fb6ee3Sopenharmony_ci .panel ul { min-height: 6em; } 21893fb6ee3Sopenharmony_ci .panel p { text-align: right; margin: 0; } 21993fb6ee3Sopenharmony_ci .panel form { background: transparent; color: black; margin: 0.5em -0.5em 1em; padding: 0.5em; } 22093fb6ee3Sopenharmony_ci .panel form.changed { background: yellow; color: black; } 22193fb6ee3Sopenharmony_ci .panel form p { text-align: left; margin: 1em 0 0; } 22293fb6ee3Sopenharmony_ci .panel form p:first-child { margin-top: 0; } 22393fb6ee3Sopenharmony_ci .panel form p:last-child { margin-bottom: 0; } 22493fb6ee3Sopenharmony_ci .panel form p textarea { width: 100% /* need the keyword that makes it fit to the parent here XXX */; min-height: 4em; display: block; } 22593fb6ee3Sopenharmony_ci .panel form dl { line-height: 1.5em; } 22693fb6ee3Sopenharmony_ci .panel form dt { display: inline-block; width: 20em; white-space: nowrap; text-align: right; font-weight: normal; margin: 0; padding: 0; } 22793fb6ee3Sopenharmony_ci .panel form dd { display: inline; margin: 0 0 0 1em; padding: 0; } 22893fb6ee3Sopenharmony_ci .panel form dd:after { display: block; } 22993fb6ee3Sopenharmony_ci ul.checkboxes { list-style-type: none; } 23093fb6ee3Sopenharmony_ci .progress { text-decoration: blink; } 23193fb6ee3Sopenharmony_ci 23293fb6ee3Sopenharmony_ci .applies .yes { background: yellow; } 23393fb6ee3Sopenharmony_ci </style><style> 23493fb6ee3Sopenharmony_ci .applies thead th > * { display: block; } 23593fb6ee3Sopenharmony_ci .applies thead code { display: block; } 23693fb6ee3Sopenharmony_ci .applies td { text-align: center; } 23793fb6ee3Sopenharmony_ci 23893fb6ee3Sopenharmony_ci .matrix, .matrix td { border: hidden; text-align: right; } 23993fb6ee3Sopenharmony_ci .matrix { margin-left: 2em; } 24093fb6ee3Sopenharmony_ci 24193fb6ee3Sopenharmony_ci .vertical-summary-table tr > th[rowspan="2"]:first-child + th, 24293fb6ee3Sopenharmony_ci .vertical-summary-table tr > td[rowspan="2"]:first-child + td { border-bottom: hidden; } 24393fb6ee3Sopenharmony_ci 24493fb6ee3Sopenharmony_ci .dice-example { border-collapse: collapse; border-style: hidden solid solid hidden; border-width: thin; margin-left: 3em; } 24593fb6ee3Sopenharmony_ci .dice-example caption { width: 30em; font-size: smaller; font-style: italic; padding: 0.75em 0; text-align: left; } 24693fb6ee3Sopenharmony_ci .dice-example td, .dice-example th { border: solid thin; width: 1.35em; height: 1.05em; text-align: center; padding: 0; } 24793fb6ee3Sopenharmony_ci 24893fb6ee3Sopenharmony_ci td.eg { border-width: thin; text-align: center; } 24993fb6ee3Sopenharmony_ci 25093fb6ee3Sopenharmony_ci #table-example-1 { border: solid thin; border-collapse: collapse; margin-left: 3em; } 25193fb6ee3Sopenharmony_ci #table-example-1 caption { padding-bottom: 0.5em; } 25293fb6ee3Sopenharmony_ci #table-example-1 thead, #table-example-1 tbody { border: none; } 25393fb6ee3Sopenharmony_ci #table-example-1 th, #table-example-1 td { border: solid thin; } 25493fb6ee3Sopenharmony_ci #table-example-1 th { font-weight: normal; } 25593fb6ee3Sopenharmony_ci #table-example-1 td { border-style: none solid; vertical-align: top; } 25693fb6ee3Sopenharmony_ci #table-example-1 th { padding: 0.5em; vertical-align: middle; text-align: center; } 25793fb6ee3Sopenharmony_ci #table-example-1 tbody tr:first-child td { padding-top: 0.5em; } 25893fb6ee3Sopenharmony_ci #table-example-1 tbody tr:last-child td { padding-bottom: 1.5em; } 25993fb6ee3Sopenharmony_ci #table-example-1 tbody td:first-child { padding-left: 2.5em; padding-right: 0; width: 9em; } 26093fb6ee3Sopenharmony_ci #table-example-1 tbody td:first-child::after { content: leader(". "); } 26193fb6ee3Sopenharmony_ci #table-example-1 tbody td { padding-left: 2em; padding-right: 2em; } 26293fb6ee3Sopenharmony_ci #table-example-1 tbody td:first-child + td { width: 10em; } 26393fb6ee3Sopenharmony_ci #table-example-1 tbody td:first-child + td ~ td { width: 2.5em; } 26493fb6ee3Sopenharmony_ci #table-example-1 tbody td:first-child + td + td + td ~ td { width: 1.25em; } 26593fb6ee3Sopenharmony_ci 26693fb6ee3Sopenharmony_ci .apple-table-examples { border: none; border-collapse: separate; border-spacing: 1.5em 0em; width: 40em; margin-left: 3em; } 26793fb6ee3Sopenharmony_ci .apple-table-examples * { font-family: "Times", serif; } 26893fb6ee3Sopenharmony_ci .apple-table-examples td, .apple-table-examples th { border: none; white-space: nowrap; padding-top: 0; padding-bottom: 0; } 26993fb6ee3Sopenharmony_ci .apple-table-examples tbody th:first-child { border-left: none; width: 100%; } 27093fb6ee3Sopenharmony_ci .apple-table-examples thead th:first-child ~ th { font-size: smaller; font-weight: bolder; border-bottom: solid 2px; text-align: center; } 27193fb6ee3Sopenharmony_ci .apple-table-examples tbody th::after, .apple-table-examples tfoot th::after { content: leader(". ") } 27293fb6ee3Sopenharmony_ci .apple-table-examples tbody th, .apple-table-examples tfoot th { font: inherit; text-align: left; } 27393fb6ee3Sopenharmony_ci .apple-table-examples td { text-align: right; vertical-align: top; } 27493fb6ee3Sopenharmony_ci .apple-table-examples.e1 tbody tr:last-child td { border-bottom: solid 1px; } 27593fb6ee3Sopenharmony_ci .apple-table-examples.e1 tbody + tbody tr:last-child td { border-bottom: double 3px; } 27693fb6ee3Sopenharmony_ci .apple-table-examples.e2 th[scope=row] { padding-left: 1em; } 27793fb6ee3Sopenharmony_ci .apple-table-examples sup { line-height: 0; } 27893fb6ee3Sopenharmony_ci 27993fb6ee3Sopenharmony_ci .three-column-nowrap tr > td:first-child, 28093fb6ee3Sopenharmony_ci .three-column-nowrap tr > td:first-child + td, 28193fb6ee3Sopenharmony_ci .three-column-nowrap tr > td:first-child + td + td { white-space: nowrap; } 28293fb6ee3Sopenharmony_ci 28393fb6ee3Sopenharmony_ci .details-example img { vertical-align: top; } 28493fb6ee3Sopenharmony_ci 28593fb6ee3Sopenharmony_ci #base64-table { 28693fb6ee3Sopenharmony_ci white-space: nowrap; 28793fb6ee3Sopenharmony_ci font-size: 0.6em; 28893fb6ee3Sopenharmony_ci column-width: 6em; 28993fb6ee3Sopenharmony_ci column-count: 5; 29093fb6ee3Sopenharmony_ci column-gap: 1em; 29193fb6ee3Sopenharmony_ci -moz-column-width: 6em; 29293fb6ee3Sopenharmony_ci -moz-column-count: 5; 29393fb6ee3Sopenharmony_ci -moz-column-gap: 1em; 29493fb6ee3Sopenharmony_ci -webkit-column-width: 6em; 29593fb6ee3Sopenharmony_ci -webkit-column-count: 5; 29693fb6ee3Sopenharmony_ci -webkit-column-gap: 1em; 29793fb6ee3Sopenharmony_ci } 29893fb6ee3Sopenharmony_ci #base64-table thead { display: none; } 29993fb6ee3Sopenharmony_ci #base64-table * { border: none; } 30093fb6ee3Sopenharmony_ci #base64-table tbody td:first-child:after { content: ':'; } 30193fb6ee3Sopenharmony_ci #base64-table tbody td:last-child { text-align: right; } 30293fb6ee3Sopenharmony_ci 30393fb6ee3Sopenharmony_ci #named-character-references-table { 30493fb6ee3Sopenharmony_ci white-space: nowrap; 30593fb6ee3Sopenharmony_ci font-size: 0.6em; 30693fb6ee3Sopenharmony_ci column-width: 30em; 30793fb6ee3Sopenharmony_ci column-gap: 1em; 30893fb6ee3Sopenharmony_ci -moz-column-width: 30em; 30993fb6ee3Sopenharmony_ci -moz-column-gap: 1em; 31093fb6ee3Sopenharmony_ci -webkit-column-width: 30em; 31193fb6ee3Sopenharmony_ci -webkit-column-gap: 1em; 31293fb6ee3Sopenharmony_ci } 31393fb6ee3Sopenharmony_ci #named-character-references-table > table > tbody > tr > td:first-child + td, 31493fb6ee3Sopenharmony_ci #named-character-references-table > table > tbody > tr > td:last-child { text-align: center; } 31593fb6ee3Sopenharmony_ci #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; } 31693fb6ee3Sopenharmony_ci #named-character-references-table > table > tbody > tr#entity-CounterClockwiseContourIntegral > td:first-child { font-size: 0.5em; } 31793fb6ee3Sopenharmony_ci 31893fb6ee3Sopenharmony_ci .glyph.control { color: red; } 31993fb6ee3Sopenharmony_ci </style><style> 32093fb6ee3Sopenharmony_ci #table-example-1 * { font-family: "Essays1743", serif; line-height: 1.01em; } 32193fb6ee3Sopenharmony_ci @font-face { 32293fb6ee3Sopenharmony_ci font-family: 'Essays1743'; 32393fb6ee3Sopenharmony_ci src: url('/fonts/Essays1743.ttf'); 32493fb6ee3Sopenharmony_ci } 32593fb6ee3Sopenharmony_ci @font-face { 32693fb6ee3Sopenharmony_ci font-family: 'Essays1743'; 32793fb6ee3Sopenharmony_ci font-weight: bold; 32893fb6ee3Sopenharmony_ci src: url('/fonts/Essays1743-Bold.ttf'); 32993fb6ee3Sopenharmony_ci } 33093fb6ee3Sopenharmony_ci @font-face { 33193fb6ee3Sopenharmony_ci font-family: 'Essays1743'; 33293fb6ee3Sopenharmony_ci font-style: italic; 33393fb6ee3Sopenharmony_ci src: url('/fonts/Essays1743-Italic.ttf'); 33493fb6ee3Sopenharmony_ci } 33593fb6ee3Sopenharmony_ci @font-face { 33693fb6ee3Sopenharmony_ci font-family: 'Essays1743'; 33793fb6ee3Sopenharmony_ci font-style: italic; 33893fb6ee3Sopenharmony_ci font-weight: bold; 33993fb6ee3Sopenharmony_ci src: url('/fonts/Essays1743-BoldItalic.ttf'); 34093fb6ee3Sopenharmony_ci } 34193fb6ee3Sopenharmony_ci </style><script src=link-fixup.js></script><body onload=init()> 34293fb6ee3Sopenharmony_ci <header id=head class="head with-buttons"> 34393fb6ee3Sopenharmony_ci <p><a href=https://whatwg.org/ class=logo><img alt=WHATWG src=//whatwg.org/images/logo width=101 height=101></a></p> 34493fb6ee3Sopenharmony_ci <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> 34593fb6ee3Sopenharmony_ci 34693fb6ee3Sopenharmony_ci 34793fb6ee3Sopenharmony_ci </header> 34893fb6ee3Sopenharmony_ci 34993fb6ee3Sopenharmony_ci 35093fb6ee3Sopenharmony_ci 35193fb6ee3Sopenharmony_ci 35293fb6ee3Sopenharmony_ci 35393fb6ee3Sopenharmony_ci 35493fb6ee3Sopenharmony_ci 35593fb6ee3Sopenharmony_ci 35693fb6ee3Sopenharmony_ci 35793fb6ee3Sopenharmony_ci 35893fb6ee3Sopenharmony_ci 35993fb6ee3Sopenharmony_ci 36093fb6ee3Sopenharmony_ci 36193fb6ee3Sopenharmony_ci <nav><a href=webstorage.html>← 11 Web storage</a> — <a href=index.html>Table of Contents</a> — <a href=xhtml.html>13 The XHTML syntax →</a></nav><ol class=toc><li id=toc-syntax><a href=syntax.html#syntax>12 The HTML syntax</a><ol><li><a href=syntax.html#writing>12.1 Writing HTML documents</a><ol><li><a href=syntax.html#the-doctype>12.1.1 The DOCTYPE</a><li><a href=syntax.html#elements-2>12.1.2 Elements</a><ol><li><a href=syntax.html#start-tags>12.1.2.1 Start tags</a><li><a href=syntax.html#end-tags>12.1.2.2 End tags</a><li><a href=syntax.html#attributes-2>12.1.2.3 Attributes</a><li><a href=syntax.html#optional-tags>12.1.2.4 Optional tags</a><li><a href=syntax.html#element-restrictions>12.1.2.5 Restrictions on content models</a><li><a href=syntax.html#cdata-rcdata-restrictions>12.1.2.6 Restrictions on the contents of raw text and escapable raw text elements</a></ol><li><a href=syntax.html#text-2>12.1.3 Text</a><ol><li><a href=syntax.html#newlines>12.1.3.1 Newlines</a></ol><li><a href=syntax.html#character-references>12.1.4 Character references</a><li><a href=syntax.html#cdata-sections>12.1.5 CDATA sections</a><li><a href=syntax.html#comments>12.1.6 Comments</a></ol><li><a href=syntax.html#parsing>12.2 Parsing HTML documents</a><ol><li><a href=syntax.html#overview-of-the-parsing-model>12.2.1 Overview of the parsing model</a><li><a href=syntax.html#the-input-byte-stream>12.2.2 The input byte stream</a><ol><li><a href=syntax.html#parsing-with-a-known-character-encoding>12.2.2.1 Parsing with a known character encoding</a><li><a href=syntax.html#determining-the-character-encoding>12.2.2.2 Determining the character encoding</a><li><a href=syntax.html#character-encodings>12.2.2.3 Character encodings</a><li><a href=syntax.html#changing-the-encoding-while-parsing>12.2.2.4 Changing the encoding while parsing</a><li><a href=syntax.html#preprocessing-the-input-stream>12.2.2.5 Preprocessing the input stream</a></ol><li><a href=syntax.html#parse-state>12.2.3 Parse state</a><ol><li><a href=syntax.html#the-insertion-mode>12.2.3.1 The insertion mode</a><li><a href=syntax.html#the-stack-of-open-elements>12.2.3.2 The stack of open elements</a><li><a href=syntax.html#the-list-of-active-formatting-elements>12.2.3.3 The list of active formatting elements</a><li><a href=syntax.html#the-element-pointers>12.2.3.4 The element pointers</a><li><a href=syntax.html#other-parsing-state-flags>12.2.3.5 Other parsing state flags</a></ol><li><a href=syntax.html#tokenization>12.2.4 Tokenization</a><ol><li><a href=syntax.html#data-state>12.2.4.1 Data state</a><li><a href=syntax.html#character-reference-in-data-state>12.2.4.2 Character reference in data state</a><li><a href=syntax.html#rcdata-state>12.2.4.3 RCDATA state</a><li><a href=syntax.html#character-reference-in-rcdata-state>12.2.4.4 Character reference in RCDATA state</a><li><a href=syntax.html#rawtext-state>12.2.4.5 RAWTEXT state</a><li><a href=syntax.html#script-data-state>12.2.4.6 Script data state</a><li><a href=syntax.html#plaintext-state>12.2.4.7 PLAINTEXT state</a><li><a href=syntax.html#tag-open-state>12.2.4.8 Tag open state</a><li><a href=syntax.html#end-tag-open-state>12.2.4.9 End tag open state</a><li><a href=syntax.html#tag-name-state>12.2.4.10 Tag name state</a><li><a href=syntax.html#rcdata-less-than-sign-state>12.2.4.11 RCDATA less-than sign state</a><li><a href=syntax.html#rcdata-end-tag-open-state>12.2.4.12 RCDATA end tag open state</a><li><a href=syntax.html#rcdata-end-tag-name-state>12.2.4.13 RCDATA end tag name state</a><li><a href=syntax.html#rawtext-less-than-sign-state>12.2.4.14 RAWTEXT less-than sign state</a><li><a href=syntax.html#rawtext-end-tag-open-state>12.2.4.15 RAWTEXT end tag open state</a><li><a href=syntax.html#rawtext-end-tag-name-state>12.2.4.16 RAWTEXT end tag name state</a><li><a href=syntax.html#script-data-less-than-sign-state>12.2.4.17 Script data less-than sign state</a><li><a href=syntax.html#script-data-end-tag-open-state>12.2.4.18 Script data end tag open state</a><li><a href=syntax.html#script-data-end-tag-name-state>12.2.4.19 Script data end tag name state</a><li><a href=syntax.html#script-data-escape-start-state>12.2.4.20 Script data escape start state</a><li><a href=syntax.html#script-data-escape-start-dash-state>12.2.4.21 Script data escape start dash state</a><li><a href=syntax.html#script-data-escaped-state>12.2.4.22 Script data escaped state</a><li><a href=syntax.html#script-data-escaped-dash-state>12.2.4.23 Script data escaped dash state</a><li><a href=syntax.html#script-data-escaped-dash-dash-state>12.2.4.24 Script data escaped dash dash state</a><li><a href=syntax.html#script-data-escaped-less-than-sign-state>12.2.4.25 Script data escaped less-than sign state</a><li><a href=syntax.html#script-data-escaped-end-tag-open-state>12.2.4.26 Script data escaped end tag open state</a><li><a href=syntax.html#script-data-escaped-end-tag-name-state>12.2.4.27 Script data escaped end tag name state</a><li><a href=syntax.html#script-data-double-escape-start-state>12.2.4.28 Script data double escape start state</a><li><a href=syntax.html#script-data-double-escaped-state>12.2.4.29 Script data double escaped state</a><li><a href=syntax.html#script-data-double-escaped-dash-state>12.2.4.30 Script data double escaped dash state</a><li><a href=syntax.html#script-data-double-escaped-dash-dash-state>12.2.4.31 Script data double escaped dash dash state</a><li><a href=syntax.html#script-data-double-escaped-less-than-sign-state>12.2.4.32 Script data double escaped less-than sign state</a><li><a href=syntax.html#script-data-double-escape-end-state>12.2.4.33 Script data double escape end state</a><li><a href=syntax.html#before-attribute-name-state>12.2.4.34 Before attribute name state</a><li><a href=syntax.html#attribute-name-state>12.2.4.35 Attribute name state</a><li><a href=syntax.html#after-attribute-name-state>12.2.4.36 After attribute name state</a><li><a href=syntax.html#before-attribute-value-state>12.2.4.37 Before attribute value state</a><li><a href=syntax.html#attribute-value-(double-quoted)-state>12.2.4.38 Attribute value (double-quoted) state</a><li><a href=syntax.html#attribute-value-(single-quoted)-state>12.2.4.39 Attribute value (single-quoted) state</a><li><a href=syntax.html#attribute-value-(unquoted)-state>12.2.4.40 Attribute value (unquoted) state</a><li><a href=syntax.html#character-reference-in-attribute-value-state>12.2.4.41 Character reference in attribute value state</a><li><a href=syntax.html#after-attribute-value-(quoted)-state>12.2.4.42 After attribute value (quoted) state</a><li><a href=syntax.html#self-closing-start-tag-state>12.2.4.43 Self-closing start tag state</a><li><a href=syntax.html#bogus-comment-state>12.2.4.44 Bogus comment state</a><li><a href=syntax.html#markup-declaration-open-state>12.2.4.45 Markup declaration open state</a><li><a href=syntax.html#comment-start-state>12.2.4.46 Comment start state</a><li><a href=syntax.html#comment-start-dash-state>12.2.4.47 Comment start dash state</a><li><a href=syntax.html#comment-state>12.2.4.48 Comment state</a><li><a href=syntax.html#comment-end-dash-state>12.2.4.49 Comment end dash state</a><li><a href=syntax.html#comment-end-state>12.2.4.50 Comment end state</a><li><a href=syntax.html#comment-end-bang-state>12.2.4.51 Comment end bang state</a><li><a href=syntax.html#doctype-state>12.2.4.52 DOCTYPE state</a><li><a href=syntax.html#before-doctype-name-state>12.2.4.53 Before DOCTYPE name state</a><li><a href=syntax.html#doctype-name-state>12.2.4.54 DOCTYPE name state</a><li><a href=syntax.html#after-doctype-name-state>12.2.4.55 After DOCTYPE name state</a><li><a href=syntax.html#after-doctype-public-keyword-state>12.2.4.56 After DOCTYPE public keyword state</a><li><a href=syntax.html#before-doctype-public-identifier-state>12.2.4.57 Before DOCTYPE public identifier state</a><li><a href=syntax.html#doctype-public-identifier-(double-quoted)-state>12.2.4.58 DOCTYPE public identifier (double-quoted) state</a><li><a href=syntax.html#doctype-public-identifier-(single-quoted)-state>12.2.4.59 DOCTYPE public identifier (single-quoted) state</a><li><a href=syntax.html#after-doctype-public-identifier-state>12.2.4.60 After DOCTYPE public identifier state</a><li><a href=syntax.html#between-doctype-public-and-system-identifiers-state>12.2.4.61 Between DOCTYPE public and system identifiers state</a><li><a href=syntax.html#after-doctype-system-keyword-state>12.2.4.62 After DOCTYPE system keyword state</a><li><a href=syntax.html#before-doctype-system-identifier-state>12.2.4.63 Before DOCTYPE system identifier state</a><li><a href=syntax.html#doctype-system-identifier-(double-quoted)-state>12.2.4.64 DOCTYPE system identifier (double-quoted) state</a><li><a href=syntax.html#doctype-system-identifier-(single-quoted)-state>12.2.4.65 DOCTYPE system identifier (single-quoted) state</a><li><a href=syntax.html#after-doctype-system-identifier-state>12.2.4.66 After DOCTYPE system identifier state</a><li><a href=syntax.html#bogus-doctype-state>12.2.4.67 Bogus DOCTYPE state</a><li><a href=syntax.html#cdata-section-state>12.2.4.68 CDATA section state</a><li><a href=syntax.html#tokenizing-character-references>12.2.4.69 Tokenizing character references</a></ol><li><a href=syntax.html#tree-construction>12.2.5 Tree construction</a><ol><li><a href=syntax.html#creating-and-inserting-nodes>12.2.5.1 Creating and inserting nodes</a><li><a href=syntax.html#parsing-elements-that-contain-only-text>12.2.5.2 Parsing elements that contain only text</a><li><a href=syntax.html#closing-elements-that-have-implied-end-tags>12.2.5.3 Closing elements that have implied end tags</a><li><a href=syntax.html#parsing-main-inhtml>12.2.5.4 The rules for parsing tokens in HTML content</a><ol><li><a href=syntax.html#the-initial-insertion-mode>12.2.5.4.1 The "initial" insertion mode</a><li><a href=syntax.html#the-before-html-insertion-mode>12.2.5.4.2 The "before html" insertion mode</a><li><a href=syntax.html#the-before-head-insertion-mode>12.2.5.4.3 The "before head" insertion mode</a><li><a href=syntax.html#parsing-main-inhead>12.2.5.4.4 The "in head" insertion mode</a><li><a href=syntax.html#parsing-main-inheadnoscript>12.2.5.4.5 The "in head noscript" insertion mode</a><li><a href=syntax.html#the-after-head-insertion-mode>12.2.5.4.6 The "after head" insertion mode</a><li><a href=syntax.html#parsing-main-inbody>12.2.5.4.7 The "in body" insertion mode</a><li><a href=syntax.html#parsing-main-incdata>12.2.5.4.8 The "text" insertion mode</a><li><a href=syntax.html#parsing-main-intable>12.2.5.4.9 The "in table" insertion mode</a><li><a href=syntax.html#parsing-main-intabletext>12.2.5.4.10 The "in table text" insertion mode</a><li><a href=syntax.html#parsing-main-incaption>12.2.5.4.11 The "in caption" insertion mode</a><li><a href=syntax.html#parsing-main-incolgroup>12.2.5.4.12 The "in column group" insertion mode</a><li><a href=syntax.html#parsing-main-intbody>12.2.5.4.13 The "in table body" insertion mode</a><li><a href=syntax.html#parsing-main-intr>12.2.5.4.14 The "in row" insertion mode</a><li><a href=syntax.html#parsing-main-intd>12.2.5.4.15 The "in cell" insertion mode</a><li><a href=syntax.html#parsing-main-inselect>12.2.5.4.16 The "in select" insertion mode</a><li><a href=syntax.html#parsing-main-inselectintable>12.2.5.4.17 The "in select in table" insertion mode</a><li><a href=syntax.html#parsing-main-intemplate>12.2.5.4.18 The "in template" insertion mode</a><li><a href=syntax.html#parsing-main-afterbody>12.2.5.4.19 The "after body" insertion mode</a><li><a href=syntax.html#parsing-main-inframeset>12.2.5.4.20 The "in frameset" insertion mode</a><li><a href=syntax.html#parsing-main-afterframeset>12.2.5.4.21 The "after frameset" insertion mode</a><li><a href=syntax.html#the-after-after-body-insertion-mode>12.2.5.4.22 The "after after body" insertion mode</a><li><a href=syntax.html#the-after-after-frameset-insertion-mode>12.2.5.4.23 The "after after frameset" insertion mode</a></ol><li><a href=syntax.html#parsing-main-inforeign>12.2.5.5 The rules for parsing tokens in foreign content</a></ol><li><a href=syntax.html#the-end>12.2.6 The end</a><li><a href=syntax.html#coercing-an-html-dom-into-an-infoset>12.2.7 Coercing an HTML DOM into an infoset</a><li><a href=syntax.html#an-introduction-to-error-handling-and-strange-cases-in-the-parser>12.2.8 An introduction to error handling and strange cases in the parser</a><ol><li><a href=syntax.html#misnested-tags:-b-i-/b-/i>12.2.8.1 Misnested tags: <b><i></b></i></a><li><a href=syntax.html#misnested-tags:-b-p-/b-/p>12.2.8.2 Misnested tags: <b><p></b></p></a><li><a href=syntax.html#unexpected-markup-in-tables>12.2.8.3 Unexpected markup in tables</a><li><a href=syntax.html#scripts-that-modify-the-page-as-it-is-being-parsed>12.2.8.4 Scripts that modify the page as it is being parsed</a><li><a href=syntax.html#the-execution-of-scripts-that-are-moving-across-multiple-documents>12.2.8.5 The execution of scripts that are moving across multiple documents</a><li><a href=syntax.html#unclosed-formatting-elements>12.2.8.6 Unclosed formatting elements</a></ol></ol><li><a href=syntax.html#serialising-html-fragments>12.3 Serialising HTML fragments</a><li><a href=syntax.html#parsing-html-fragments>12.4 Parsing HTML fragments</a><li><a href=syntax.html#named-character-references>12.5 Named character references</a></ol></ol><h2 id=syntax>12 <dfn>The HTML syntax</dfn></h2> 36293fb6ee3Sopenharmony_ci 36393fb6ee3Sopenharmony_ci <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 36493fb6ee3Sopenharmony_ci 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 36593fb6ee3Sopenharmony_ci XHTML syntax</a>".</p> 36693fb6ee3Sopenharmony_ci 36793fb6ee3Sopenharmony_ci 36893fb6ee3Sopenharmony_ci <h3 id=writing>12.1 Writing HTML documents</h3> 36993fb6ee3Sopenharmony_ci 37093fb6ee3Sopenharmony_ci 37193fb6ee3Sopenharmony_ci 37293fb6ee3Sopenharmony_ci <p><i>This section only applies to documents, authoring tools, and markup generators. In 37393fb6ee3Sopenharmony_ci particular, it does not apply to conformance checkers; conformance checkers must use the 37493fb6ee3Sopenharmony_ci requirements given in the next section ("parsing HTML documents").</i></p> 37593fb6ee3Sopenharmony_ci 37693fb6ee3Sopenharmony_ci 37793fb6ee3Sopenharmony_ci 37893fb6ee3Sopenharmony_ci <p>Documents must consist of the following parts, in the given 37993fb6ee3Sopenharmony_ci order:</p> 38093fb6ee3Sopenharmony_ci 38193fb6ee3Sopenharmony_ci <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>. 38293fb6ee3Sopenharmony_ci 38393fb6ee3Sopenharmony_ci <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> 38493fb6ee3Sopenharmony_ci 38593fb6ee3Sopenharmony_ci <p>The various types of content mentioned above are described in the next few sections.</p> 38693fb6ee3Sopenharmony_ci 38793fb6ee3Sopenharmony_ci <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 38893fb6ee3Sopenharmony_ci section on that topic.</p> 38993fb6ee3Sopenharmony_ci 39093fb6ee3Sopenharmony_ci <div class=note> 39193fb6ee3Sopenharmony_ci 39293fb6ee3Sopenharmony_ci <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 39393fb6ee3Sopenharmony_ci 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 39493fb6ee3Sopenharmony_ci 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 39593fb6ee3Sopenharmony_ci 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 39693fb6ee3Sopenharmony_ci around the root element do not round-trip.</p> 39793fb6ee3Sopenharmony_ci 39893fb6ee3Sopenharmony_ci <p>It is suggested that newlines be inserted after the DOCTYPE, after any comments that are 39993fb6ee3Sopenharmony_ci 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 40093fb6ee3Sopenharmony_ci <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> 40193fb6ee3Sopenharmony_ci 40293fb6ee3Sopenharmony_ci </div> 40393fb6ee3Sopenharmony_ci 40493fb6ee3Sopenharmony_ci <p>Many strings in the HTML syntax (e.g. the names of elements and their attributes) are 40593fb6ee3Sopenharmony_ci 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 40693fb6ee3Sopenharmony_ci letters</a>. For convenience, in this section this is just referred to as 40793fb6ee3Sopenharmony_ci "case-insensitive".</p> 40893fb6ee3Sopenharmony_ci 40993fb6ee3Sopenharmony_ci 41093fb6ee3Sopenharmony_ci <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> 41193fb6ee3Sopenharmony_ci 41293fb6ee3Sopenharmony_ci <p>A <dfn id=syntax-doctype>DOCTYPE</dfn> is a 41393fb6ee3Sopenharmony_ci required preamble.</p> 41493fb6ee3Sopenharmony_ci 41593fb6ee3Sopenharmony_ci <p class=note>DOCTYPEs are required for legacy reasons. When omitted, browsers tend to use a 41693fb6ee3Sopenharmony_ci different rendering mode that is incompatible with some specifications. Including the DOCTYPE in a 41793fb6ee3Sopenharmony_ci document ensures that the browser makes a best-effort attempt at following the relevant 41893fb6ee3Sopenharmony_ci specifications.</p> 41993fb6ee3Sopenharmony_ci 42093fb6ee3Sopenharmony_ci <p>A DOCTYPE must consist of the following components, in this order:</p> 42193fb6ee3Sopenharmony_ci 42293fb6ee3Sopenharmony_ci <ol class=brief><li>A string that is an <a id=the-doctype:ascii-case-insensitive href=infrastructure.html#ascii-case-insensitive>ASCII case-insensitive</a> match for the string "<code><!DOCTYPE</code>".<li>One or more <a href=infrastructure.html#space-character id=the-doctype:space-character>space characters</a>.<li>A string that is an <a id=the-doctype:ascii-case-insensitive-2 href=infrastructure.html#ascii-case-insensitive>ASCII case-insensitive</a> match for the string "<code>html</code>".<li>Optionally, a <a href=#doctype-legacy-string id=the-doctype:doctype-legacy-string>DOCTYPE legacy string</a> or an <a href=#obsolete-permitted-doctype-string id=the-doctype:obsolete-permitted-doctype-string>obsolete permitted DOCTYPE string</a> (defined below).<li>Zero or more <a href=infrastructure.html#space-character id=the-doctype:space-character-2>space characters</a>.<li>A U+003E GREATER-THAN SIGN character (>).</ol> 42393fb6ee3Sopenharmony_ci 42493fb6ee3Sopenharmony_ci <p class=note>In other words, <code><!DOCTYPE html></code>, case-insensitively.</p> 42593fb6ee3Sopenharmony_ci 42693fb6ee3Sopenharmony_ci <hr> 42793fb6ee3Sopenharmony_ci 42893fb6ee3Sopenharmony_ci <p>For the purposes of HTML generators that cannot output HTML markup with the short DOCTYPE 42993fb6ee3Sopenharmony_ci "<code><!DOCTYPE html></code>", a <dfn id=doctype-legacy-string>DOCTYPE legacy string</dfn> may be inserted 43093fb6ee3Sopenharmony_ci into the DOCTYPE (in the position defined above). This string must consist of:</p> 43193fb6ee3Sopenharmony_ci 43293fb6ee3Sopenharmony_ci <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> 43393fb6ee3Sopenharmony_ci 43493fb6ee3Sopenharmony_ci <p class=note>In other words, <code><!DOCTYPE html SYSTEM "about:legacy-compat"></code> or 43593fb6ee3Sopenharmony_ci <code><!DOCTYPE html SYSTEM 'about:legacy-compat'></code>, case-insensitively except for the 43693fb6ee3Sopenharmony_ci part in single or double quotes.</p> 43793fb6ee3Sopenharmony_ci 43893fb6ee3Sopenharmony_ci <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 43993fb6ee3Sopenharmony_ci a system that cannot output the shorter string.</p> 44093fb6ee3Sopenharmony_ci 44193fb6ee3Sopenharmony_ci <hr> 44293fb6ee3Sopenharmony_ci 44393fb6ee3Sopenharmony_ci 44493fb6ee3Sopenharmony_ci 44593fb6ee3Sopenharmony_ci <p>To help authors transition from HTML4 and XHTML1, an <dfn id=obsolete-permitted-doctype-string>obsolete permitted DOCTYPE 44693fb6ee3Sopenharmony_ci string</dfn> can be inserted into the DOCTYPE (in the position defined above). This string must 44793fb6ee3Sopenharmony_ci 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> 44893fb6ee3Sopenharmony_ci 44993fb6ee3Sopenharmony_ci <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> 45093fb6ee3Sopenharmony_ci 45193fb6ee3Sopenharmony_ci <table><caption> 45293fb6ee3Sopenharmony_ci 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>. 45393fb6ee3Sopenharmony_ci </caption><thead><tr><th> Public identifier 45493fb6ee3Sopenharmony_ci <th> System identifier 45593fb6ee3Sopenharmony_ci <tbody><tr><td> <code>-//W3C//DTD HTML 4.0//EN</code> 45693fb6ee3Sopenharmony_ci <td> 45793fb6ee3Sopenharmony_ci <tr><td> <code>-//W3C//DTD HTML 4.0//EN</code> 45893fb6ee3Sopenharmony_ci <td> <code>http://www.w3.org/TR/REC-html40/strict.dtd</code> 45993fb6ee3Sopenharmony_ci <tr><td> <code>-//W3C//DTD HTML 4.01//EN</code> 46093fb6ee3Sopenharmony_ci <td> 46193fb6ee3Sopenharmony_ci <tr><td> <code>-//W3C//DTD HTML 4.01//EN</code> 46293fb6ee3Sopenharmony_ci <td> <code>http://www.w3.org/TR/html4/strict.dtd</code> 46393fb6ee3Sopenharmony_ci <tr><td> <code>-//W3C//DTD XHTML 1.0 Strict//EN</code> 46493fb6ee3Sopenharmony_ci <td> <code>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</code> 46593fb6ee3Sopenharmony_ci <tr><td> <code>-//W3C//DTD XHTML 1.1//EN</code> 46693fb6ee3Sopenharmony_ci <td> <code>http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd</code> 46793fb6ee3Sopenharmony_ci </table> 46893fb6ee3Sopenharmony_ci 46993fb6ee3Sopenharmony_ci <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 47093fb6ee3Sopenharmony_ci 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 47193fb6ee3Sopenharmony_ci long.</p> 47293fb6ee3Sopenharmony_ci 47393fb6ee3Sopenharmony_ci 47493fb6ee3Sopenharmony_ci 47593fb6ee3Sopenharmony_ci 47693fb6ee3Sopenharmony_ci <h4 id=elements-2>12.1.2 Elements</h4> 47793fb6ee3Sopenharmony_ci 47893fb6ee3Sopenharmony_ci <p>There are five different kinds of <dfn id=syntax-elements>elements</dfn>: <a href=#void-elements id=elements-2:void-elements>void 47993fb6ee3Sopenharmony_ci 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>, 48093fb6ee3Sopenharmony_ci <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> 48193fb6ee3Sopenharmony_ci 48293fb6ee3Sopenharmony_ci <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>, 48393fb6ee3Sopenharmony_ci <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>, 48493fb6ee3Sopenharmony_ci <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>, 48593fb6ee3Sopenharmony_ci <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> 48693fb6ee3Sopenharmony_ci 48793fb6ee3Sopenharmony_ci <p><dfn id=syntax-tags>Tags</dfn> are used to delimit the start and end of elements in the 48893fb6ee3Sopenharmony_ci 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 48993fb6ee3Sopenharmony_ci 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 49093fb6ee3Sopenharmony_ci 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 49193fb6ee3Sopenharmony_ci described below in the section on <a href=#syntax-tag-omission id=elements-2:syntax-tag-omission-2>optional tags</a>. Those 49293fb6ee3Sopenharmony_ci 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 49393fb6ee3Sopenharmony_ci 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 49493fb6ee3Sopenharmony_ci either have a start tag and an end tag, or a start tag that is marked as self-closing, in which 49593fb6ee3Sopenharmony_ci case they must not have an end tag.</p> 49693fb6ee3Sopenharmony_ci 49793fb6ee3Sopenharmony_ci <p>The <a href=dom.html#concept-html-contents id=elements-2:concept-html-contents>contents</a> of the element must be placed between 49893fb6ee3Sopenharmony_ci just after the start tag (which <a href=#syntax-tag-omission id=elements-2:syntax-tag-omission-3>might be implied, in certain 49993fb6ee3Sopenharmony_ci cases</a>) and just before the end tag (which again, <a href=#syntax-tag-omission id=elements-2:syntax-tag-omission-4>might be 50093fb6ee3Sopenharmony_ci implied in certain cases</a>). The exact allowed contents of each individual element depend on 50193fb6ee3Sopenharmony_ci the <a href=dom.html#content-models id=elements-2:content-models>content model</a> of that element, as described earlier in 50293fb6ee3Sopenharmony_ci this specification. Elements must not contain content that their content model disallows. In 50393fb6ee3Sopenharmony_ci addition to the restrictions placed on the contents by those content models, however, the five 50493fb6ee3Sopenharmony_ci types of elements have additional <em>syntactic</em> requirements.</p> 50593fb6ee3Sopenharmony_ci 50693fb6ee3Sopenharmony_ci <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 50793fb6ee3Sopenharmony_ci put between the start tag and the end tag).</p> 50893fb6ee3Sopenharmony_ci 50993fb6ee3Sopenharmony_ci <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> 51093fb6ee3Sopenharmony_ci 51193fb6ee3Sopenharmony_ci <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 51293fb6ee3Sopenharmony_ci <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> 51393fb6ee3Sopenharmony_ci 51493fb6ee3Sopenharmony_ci <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 51593fb6ee3Sopenharmony_ci (since, again, as there's no end tag, no content can be put between the start tag and the end 51693fb6ee3Sopenharmony_ci 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 51793fb6ee3Sopenharmony_ci have <a href=#syntax-text id=elements-2:syntax-text-3>text</a>, <a href=#syntax-charref id=elements-2:syntax-charref-2>character 51893fb6ee3Sopenharmony_ci 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 51993fb6ee3Sopenharmony_ci the text must not contain the character U+003C LESS-THAN SIGN (<) or an <a href=#syntax-ambiguous-ampersand id=elements-2:syntax-ambiguous-ampersand-2>ambiguous ampersand</a>.</p> 52093fb6ee3Sopenharmony_ci 52193fb6ee3Sopenharmony_ci <div class=note> 52293fb6ee3Sopenharmony_ci 52393fb6ee3Sopenharmony_ci <p>The HTML syntax does not support namespace declarations, even in <a href=#foreign-elements id=elements-2:foreign-elements-5>foreign 52493fb6ee3Sopenharmony_ci elements</a>.</p> 52593fb6ee3Sopenharmony_ci 52693fb6ee3Sopenharmony_ci <p>For instance, consider the following HTML fragment:</p> 52793fb6ee3Sopenharmony_ci 52893fb6ee3Sopenharmony_ci <pre><p> 52993fb6ee3Sopenharmony_ci <svg> 53093fb6ee3Sopenharmony_ci <metadata> 53193fb6ee3Sopenharmony_ci <!-- this is invalid --> 53293fb6ee3Sopenharmony_ci <cdr:license xmlns:cdr="http://www.example.com/cdr/metadata" name="MIT"/> 53393fb6ee3Sopenharmony_ci </metadata> 53493fb6ee3Sopenharmony_ci </svg> 53593fb6ee3Sopenharmony_ci</p></pre> 53693fb6ee3Sopenharmony_ci 53793fb6ee3Sopenharmony_ci <p>The innermost element, <code>cdr:license</code>, is actually in the SVG namespace, as 53893fb6ee3Sopenharmony_ci the "<code>xmlns:cdr</code>" attribute has no effect (unlike in XML). In fact, as the 53993fb6ee3Sopenharmony_ci comment in the fragment above says, the fragment is actually non-conforming. This is because the 54093fb6ee3Sopenharmony_ci SVG specification does not define any elements called "<code>cdr:license</code>" in the 54193fb6ee3Sopenharmony_ci SVG namespace.</p> 54293fb6ee3Sopenharmony_ci 54393fb6ee3Sopenharmony_ci </div> 54493fb6ee3Sopenharmony_ci 54593fb6ee3Sopenharmony_ci <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 54693fb6ee3Sopenharmony_ci the text must not contain the character U+003C LESS-THAN SIGN (<) or an <a href=#syntax-ambiguous-ampersand id=elements-2:syntax-ambiguous-ampersand-3>ambiguous ampersand</a>. Some <a href=#normal-elements id=elements-2:normal-elements-5>normal elements</a> 54793fb6ee3Sopenharmony_ci also have <a href=#element-restrictions>yet more restrictions</a> on what content they are 54893fb6ee3Sopenharmony_ci allowed to hold, beyond the restrictions imposed by the content model and those described in this 54993fb6ee3Sopenharmony_ci paragraph. Those restrictions are described below.</p> 55093fb6ee3Sopenharmony_ci 55193fb6ee3Sopenharmony_ci <p>Tags contain a <dfn id=syntax-tag-name>tag name</dfn>, giving the element's name. HTML 55293fb6ee3Sopenharmony_ci 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 55393fb6ee3Sopenharmony_ci 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 55493fb6ee3Sopenharmony_ci lower- and uppercase letters that, when converted to all-lowercase, matches the element's tag 55593fb6ee3Sopenharmony_ci name; tag names are case-insensitive.</p> 55693fb6ee3Sopenharmony_ci 55793fb6ee3Sopenharmony_ci 55893fb6ee3Sopenharmony_ci <h5 id=start-tags>12.1.2.1 Start tags</h5> 55993fb6ee3Sopenharmony_ci 56093fb6ee3Sopenharmony_ci <p><dfn id=syntax-start-tag>Start tags</dfn> must have the following format:</p> 56193fb6ee3Sopenharmony_ci 56293fb6ee3Sopenharmony_ci <ol><li>The first character of a start tag must be a U+003C LESS-THAN SIGN character (<).<li>The next few characters of a start tag must be the element's <a href=#syntax-tag-name id=start-tags:syntax-tag-name>tag name</a>.<li>If there are to be any attributes in the next step, there must first be one or more <a href=infrastructure.html#space-character id=start-tags:space-character>space characters</a>.<li>Then, the start tag may have a number of attributes, the <a href=#syntax-attributes id=start-tags:syntax-attributes>syntax for which</a> is described below. Attributes must be 56393fb6ee3Sopenharmony_ci separated from each other by one or more <a href=infrastructure.html#space-character id=start-tags:space-character-2>space 56493fb6ee3Sopenharmony_ci 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 56593fb6ee3Sopenharmony_ci no attributes, there may be one or more <a href=infrastructure.html#space-character id=start-tags:space-character-3>space characters</a>. 56693fb6ee3Sopenharmony_ci (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 56793fb6ee3Sopenharmony_ci 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 56893fb6ee3Sopenharmony_ci 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> 56993fb6ee3Sopenharmony_ci 57093fb6ee3Sopenharmony_ci 57193fb6ee3Sopenharmony_ci <h5 id=end-tags>12.1.2.2 End tags</h5> 57293fb6ee3Sopenharmony_ci 57393fb6ee3Sopenharmony_ci <p><dfn id=syntax-end-tag>End tags</dfn> must have the following format:</p> 57493fb6ee3Sopenharmony_ci 57593fb6ee3Sopenharmony_ci <ol><li>The first character of an end tag must be a U+003C LESS-THAN SIGN character (<).<li>The second character of an end tag must be a U+002F SOLIDUS character (/).<li>The next few characters of an end tag must be the element's <a href=#syntax-tag-name id=end-tags:syntax-tag-name>tag 57693fb6ee3Sopenharmony_ci 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 57793fb6ee3Sopenharmony_ci characters</a>.<li>Finally, end tags must be closed by a U+003E GREATER-THAN SIGN character (>).</ol> 57893fb6ee3Sopenharmony_ci 57993fb6ee3Sopenharmony_ci 58093fb6ee3Sopenharmony_ci <h5 id=attributes-2>12.1.2.3 Attributes</h5> 58193fb6ee3Sopenharmony_ci 58293fb6ee3Sopenharmony_ci <p><dfn id=syntax-attributes>Attributes</dfn> for an element are expressed inside the 58393fb6ee3Sopenharmony_ci element's start tag.</p> 58493fb6ee3Sopenharmony_ci 58593fb6ee3Sopenharmony_ci <p>Attributes have a name and a value. <dfn id=syntax-attribute-name>Attribute names</dfn> 58693fb6ee3Sopenharmony_ci must consist of one or more characters other than the <a href=infrastructure.html#space-character id=attributes-2:space-character>space 58793fb6ee3Sopenharmony_ci characters</a>, U+0000 NULL, U+0022 QUOTATION MARK ("), U+0027 APOSTROPHE ('), U+003E 58893fb6ee3Sopenharmony_ci 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 58993fb6ee3Sopenharmony_ci characters</a>, and any characters that are not defined by Unicode. In the HTML syntax, attribute 59093fb6ee3Sopenharmony_ci 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 59193fb6ee3Sopenharmony_ci 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 59293fb6ee3Sopenharmony_ci name.</p> 59393fb6ee3Sopenharmony_ci 59493fb6ee3Sopenharmony_ci <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>, 59593fb6ee3Sopenharmony_ci 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> 59693fb6ee3Sopenharmony_ci 59793fb6ee3Sopenharmony_ci <p>Attributes can be specified in four different ways:</p> 59893fb6ee3Sopenharmony_ci 59993fb6ee3Sopenharmony_ci <dl><dt>Empty attribute syntax<dd> 60093fb6ee3Sopenharmony_ci 60193fb6ee3Sopenharmony_ci <p>Just the <a href=#syntax-attribute-name id=attributes-2:syntax-attribute-name>attribute name</a>. The value is implicitly 60293fb6ee3Sopenharmony_ci the empty string.</p> 60393fb6ee3Sopenharmony_ci 60493fb6ee3Sopenharmony_ci <div class=example> 60593fb6ee3Sopenharmony_ci 60693fb6ee3Sopenharmony_ci <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 60793fb6ee3Sopenharmony_ci given with the empty attribute syntax:</p> 60893fb6ee3Sopenharmony_ci 60993fb6ee3Sopenharmony_ci <pre><input <em>disabled</em>></pre> 61093fb6ee3Sopenharmony_ci 61193fb6ee3Sopenharmony_ci </div> 61293fb6ee3Sopenharmony_ci 61393fb6ee3Sopenharmony_ci <p>If an attribute using the empty attribute syntax is to be followed by another attribute, then 61493fb6ee3Sopenharmony_ci there must be a <a id=attributes-2:space-character-2 href=infrastructure.html#space-character>space character</a> separating the two.</p> 61593fb6ee3Sopenharmony_ci 61693fb6ee3Sopenharmony_ci <dt id=unquoted>Unquoted attribute value syntax<dd> 61793fb6ee3Sopenharmony_ci 61893fb6ee3Sopenharmony_ci <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 61993fb6ee3Sopenharmony_ci character, followed by zero or more <a href=infrastructure.html#space-character id=attributes-2:space-character-4>space characters</a>, 62093fb6ee3Sopenharmony_ci followed by the <a href=#syntax-attribute-value id=attributes-2:syntax-attribute-value>attribute value</a>, which, in addition 62193fb6ee3Sopenharmony_ci 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 ("), 62293fb6ee3Sopenharmony_ci U+0027 APOSTROPHE characters ('), U+003D EQUALS SIGN characters (=), U+003C LESS-THAN SIGN 62393fb6ee3Sopenharmony_ci characters (<), U+003E GREATER-THAN SIGN characters (>), or U+0060 GRAVE ACCENT characters 62493fb6ee3Sopenharmony_ci (`), and must not be the empty string.</p> 62593fb6ee3Sopenharmony_ci 62693fb6ee3Sopenharmony_ci 62793fb6ee3Sopenharmony_ci 62893fb6ee3Sopenharmony_ci 62993fb6ee3Sopenharmony_ci <div class=example> 63093fb6ee3Sopenharmony_ci 63193fb6ee3Sopenharmony_ci <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 63293fb6ee3Sopenharmony_ci with the unquoted attribute value syntax:</p> 63393fb6ee3Sopenharmony_ci 63493fb6ee3Sopenharmony_ci <pre><input <em>value=yes</em>></pre> 63593fb6ee3Sopenharmony_ci 63693fb6ee3Sopenharmony_ci </div> 63793fb6ee3Sopenharmony_ci 63893fb6ee3Sopenharmony_ci <p>If an attribute using the unquoted attribute syntax is to be followed by another attribute or 63993fb6ee3Sopenharmony_ci 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 64093fb6ee3Sopenharmony_ci character</a> separating the two.</p> 64193fb6ee3Sopenharmony_ci 64293fb6ee3Sopenharmony_ci <dt>Single-quoted attribute value syntax<dd> 64393fb6ee3Sopenharmony_ci 64493fb6ee3Sopenharmony_ci <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 64593fb6ee3Sopenharmony_ci character, followed by zero or more <a href=infrastructure.html#space-character id=attributes-2:space-character-8>space characters</a>, 64693fb6ee3Sopenharmony_ci 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 64793fb6ee3Sopenharmony_ci given above for attribute values, must not contain any literal U+0027 APOSTROPHE characters ('), 64893fb6ee3Sopenharmony_ci and finally followed by a second single U+0027 APOSTROPHE character (').</p> 64993fb6ee3Sopenharmony_ci 65093fb6ee3Sopenharmony_ci <div class=example> 65193fb6ee3Sopenharmony_ci 65293fb6ee3Sopenharmony_ci <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 65393fb6ee3Sopenharmony_ci with the single-quoted attribute value syntax:</p> 65493fb6ee3Sopenharmony_ci 65593fb6ee3Sopenharmony_ci <pre><input <em>type='checkbox'</em>></pre> 65693fb6ee3Sopenharmony_ci 65793fb6ee3Sopenharmony_ci </div> 65893fb6ee3Sopenharmony_ci 65993fb6ee3Sopenharmony_ci <p>If an attribute using the single-quoted attribute syntax is to be followed by another 66093fb6ee3Sopenharmony_ci 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> 66193fb6ee3Sopenharmony_ci 66293fb6ee3Sopenharmony_ci <dt>Double-quoted attribute value syntax<dd> 66393fb6ee3Sopenharmony_ci 66493fb6ee3Sopenharmony_ci <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 66593fb6ee3Sopenharmony_ci character, followed by zero or more <a href=infrastructure.html#space-character id=attributes-2:space-character-11>space characters</a>, 66693fb6ee3Sopenharmony_ci 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 66793fb6ee3Sopenharmony_ci given above for attribute values, must not contain any literal U+0022 QUOTATION MARK characters 66893fb6ee3Sopenharmony_ci ("), and finally followed by a second single U+0022 QUOTATION MARK character (").</p> 66993fb6ee3Sopenharmony_ci 67093fb6ee3Sopenharmony_ci <div class=example> 67193fb6ee3Sopenharmony_ci 67293fb6ee3Sopenharmony_ci <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 67393fb6ee3Sopenharmony_ci the double-quoted attribute value syntax:</p> 67493fb6ee3Sopenharmony_ci 67593fb6ee3Sopenharmony_ci <pre><input <em>name="be evil"</em>></pre> 67693fb6ee3Sopenharmony_ci 67793fb6ee3Sopenharmony_ci </div> 67893fb6ee3Sopenharmony_ci 67993fb6ee3Sopenharmony_ci <p>If an attribute using the double-quoted attribute syntax is to be followed by another 68093fb6ee3Sopenharmony_ci 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> 68193fb6ee3Sopenharmony_ci 68293fb6ee3Sopenharmony_ci </dl> 68393fb6ee3Sopenharmony_ci 68493fb6ee3Sopenharmony_ci <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 68593fb6ee3Sopenharmony_ci case-insensitive</a> match for each other.</p> 68693fb6ee3Sopenharmony_ci 68793fb6ee3Sopenharmony_ci <hr> 68893fb6ee3Sopenharmony_ci 68993fb6ee3Sopenharmony_ci <p>When a <a href=#foreign-elements id=attributes-2:foreign-elements-2>foreign element</a> has one of the namespaced 69093fb6ee3Sopenharmony_ci attributes given by the local name and namespace of the first and second cells of a row from the 69193fb6ee3Sopenharmony_ci following table, it must be written using the name given by the third cell from the same row.</p> 69293fb6ee3Sopenharmony_ci 69393fb6ee3Sopenharmony_ci <table><thead><tr><th> Local name <th> Namespace <th> Attribute name 69493fb6ee3Sopenharmony_ci <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> 69593fb6ee3Sopenharmony_ci <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> 69693fb6ee3Sopenharmony_ci <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> 69793fb6ee3Sopenharmony_ci <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> 69893fb6ee3Sopenharmony_ci <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> 69993fb6ee3Sopenharmony_ci <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> 70093fb6ee3Sopenharmony_ci <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> 70193fb6ee3Sopenharmony_ci <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> 70293fb6ee3Sopenharmony_ci <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> 70393fb6ee3Sopenharmony_ci <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> 70493fb6ee3Sopenharmony_ci <tr><td> <code>xmlns</code> <td> <a id=attributes-2:xmlns-namespace href=infrastructure.html#xmlns-namespace>XMLNS namespace</a> <td> <code>xmlns</code> 70593fb6ee3Sopenharmony_ci <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> 70693fb6ee3Sopenharmony_ci </table> 70793fb6ee3Sopenharmony_ci 70893fb6ee3Sopenharmony_ci <p>No other namespaced attribute can be expressed in <a href=#syntax id=attributes-2:syntax>the HTML syntax</a>.</p> 70993fb6ee3Sopenharmony_ci 71093fb6ee3Sopenharmony_ci <p class=note>Whether the attributes in the table above are conforming or not is defined by 71193fb6ee3Sopenharmony_ci other specifications (e.g. the SVG and MathML specifications); this section only describes the 71293fb6ee3Sopenharmony_ci syntax rules if the attributes are serialised using the HTML syntax.</p> 71393fb6ee3Sopenharmony_ci 71493fb6ee3Sopenharmony_ci 71593fb6ee3Sopenharmony_ci <h5 id=optional-tags>12.1.2.4 Optional tags</h5> 71693fb6ee3Sopenharmony_ci 71793fb6ee3Sopenharmony_ci <p>Certain tags can be <dfn id=syntax-tag-omission>omitted</dfn>.</p> 71893fb6ee3Sopenharmony_ci 71993fb6ee3Sopenharmony_ci <p class=note>Omitting an element's <a href=#syntax-start-tag id=optional-tags:syntax-start-tag>start tag</a> in the 72093fb6ee3Sopenharmony_ci situations described below does not mean the element is not present; it is implied, but it is 72193fb6ee3Sopenharmony_ci 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 72293fb6ee3Sopenharmony_ci the string <code><html></code> doesn't appear anywhere in the markup.</p> 72393fb6ee3Sopenharmony_ci 72493fb6ee3Sopenharmony_ci 72593fb6ee3Sopenharmony_ci <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 72693fb6ee3Sopenharmony_ci 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> 72793fb6ee3Sopenharmony_ci 72893fb6ee3Sopenharmony_ci <div class=example> 72993fb6ee3Sopenharmony_ci 73093fb6ee3Sopenharmony_ci <p>For example, in the following case it's ok to remove the "<code><html></code>" 73193fb6ee3Sopenharmony_ci tag:</p> 73293fb6ee3Sopenharmony_ci 73393fb6ee3Sopenharmony_ci <pre><!DOCTYPE HTML> 73493fb6ee3Sopenharmony_ci<strong><html></strong> 73593fb6ee3Sopenharmony_ci <head> 73693fb6ee3Sopenharmony_ci <title>Hello</title> 73793fb6ee3Sopenharmony_ci </head> 73893fb6ee3Sopenharmony_ci <body> 73993fb6ee3Sopenharmony_ci <p>Welcome to this example.</p> 74093fb6ee3Sopenharmony_ci </body> 74193fb6ee3Sopenharmony_ci</html></pre> 74293fb6ee3Sopenharmony_ci 74393fb6ee3Sopenharmony_ci <p>Doing so would make the document look like this:</p> 74493fb6ee3Sopenharmony_ci 74593fb6ee3Sopenharmony_ci <pre><!DOCTYPE HTML> 74693fb6ee3Sopenharmony_ci 74793fb6ee3Sopenharmony_ci <head> 74893fb6ee3Sopenharmony_ci <title>Hello</title> 74993fb6ee3Sopenharmony_ci </head> 75093fb6ee3Sopenharmony_ci <body> 75193fb6ee3Sopenharmony_ci <p>Welcome to this example.</p> 75293fb6ee3Sopenharmony_ci </body> 75393fb6ee3Sopenharmony_ci</html></pre> 75493fb6ee3Sopenharmony_ci 75593fb6ee3Sopenharmony_ci <p>This has the exact same DOM. In particular, note that white space around the root element is 75693fb6ee3Sopenharmony_ci ignored by the parser. The following example would also have the exact same DOM:</p> 75793fb6ee3Sopenharmony_ci 75893fb6ee3Sopenharmony_ci <pre><!DOCTYPE HTML><head> 75993fb6ee3Sopenharmony_ci <title>Hello</title> 76093fb6ee3Sopenharmony_ci </head> 76193fb6ee3Sopenharmony_ci <body> 76293fb6ee3Sopenharmony_ci <p>Welcome to this example.</p> 76393fb6ee3Sopenharmony_ci </body> 76493fb6ee3Sopenharmony_ci</html></pre> 76593fb6ee3Sopenharmony_ci 76693fb6ee3Sopenharmony_ci <p>However, in the following example, removing the start tag moves the comment to before the 76793fb6ee3Sopenharmony_ci <code id=optional-tags:the-html-element-4><a href=semantics.html#the-html-element>html</a></code> element:</p> 76893fb6ee3Sopenharmony_ci 76993fb6ee3Sopenharmony_ci <pre><!DOCTYPE HTML> 77093fb6ee3Sopenharmony_ci<html> 77193fb6ee3Sopenharmony_ci <strong><!-- where is this comment in the DOM? --></strong> 77293fb6ee3Sopenharmony_ci <head> 77393fb6ee3Sopenharmony_ci <title>Hello</title> 77493fb6ee3Sopenharmony_ci </head> 77593fb6ee3Sopenharmony_ci <body> 77693fb6ee3Sopenharmony_ci <p>Welcome to this example.</p> 77793fb6ee3Sopenharmony_ci </body> 77893fb6ee3Sopenharmony_ci</html></pre> 77993fb6ee3Sopenharmony_ci 78093fb6ee3Sopenharmony_ci <p>With the tag removed, the document actually turns into the same as this:</p> 78193fb6ee3Sopenharmony_ci 78293fb6ee3Sopenharmony_ci <pre><!DOCTYPE HTML> 78393fb6ee3Sopenharmony_ci<!-- where is this comment in the DOM? --> 78493fb6ee3Sopenharmony_ci<small><html></small> 78593fb6ee3Sopenharmony_ci <head> 78693fb6ee3Sopenharmony_ci <title>Hello</title> 78793fb6ee3Sopenharmony_ci </head> 78893fb6ee3Sopenharmony_ci <body> 78993fb6ee3Sopenharmony_ci <p>Welcome to this example.</p> 79093fb6ee3Sopenharmony_ci </body> 79193fb6ee3Sopenharmony_ci</html></pre> 79293fb6ee3Sopenharmony_ci 79393fb6ee3Sopenharmony_ci <p>This is why the tag can only be removed if it is not followed by a comment: removing the tag 79493fb6ee3Sopenharmony_ci when there is a comment there changes the document's resulting parse tree. Of course, if the 79593fb6ee3Sopenharmony_ci position of the comment does not matter, then the tag can be omitted, as if the comment had been 79693fb6ee3Sopenharmony_ci moved to before the start tag in the first place.</p> 79793fb6ee3Sopenharmony_ci 79893fb6ee3Sopenharmony_ci </div> 79993fb6ee3Sopenharmony_ci 80093fb6ee3Sopenharmony_ci 80193fb6ee3Sopenharmony_ci <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 80293fb6ee3Sopenharmony_ci 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> 80393fb6ee3Sopenharmony_ci 80493fb6ee3Sopenharmony_ci 80593fb6ee3Sopenharmony_ci <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 80693fb6ee3Sopenharmony_ci 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 80793fb6ee3Sopenharmony_ci element.</p> 80893fb6ee3Sopenharmony_ci 80993fb6ee3Sopenharmony_ci 81093fb6ee3Sopenharmony_ci <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 81193fb6ee3Sopenharmony_ci <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> 81293fb6ee3Sopenharmony_ci 81393fb6ee3Sopenharmony_ci 81493fb6ee3Sopenharmony_ci <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 81593fb6ee3Sopenharmony_ci 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 81693fb6ee3Sopenharmony_ci <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 81793fb6ee3Sopenharmony_ci 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>, 81893fb6ee3Sopenharmony_ci <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> 81993fb6ee3Sopenharmony_ci 82093fb6ee3Sopenharmony_ci 82193fb6ee3Sopenharmony_ci <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 82293fb6ee3Sopenharmony_ci <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> 82393fb6ee3Sopenharmony_ci 82493fb6ee3Sopenharmony_ci <div class=example> 82593fb6ee3Sopenharmony_ci 82693fb6ee3Sopenharmony_ci <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 82793fb6ee3Sopenharmony_ci <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 82893fb6ee3Sopenharmony_ci space:</p> 82993fb6ee3Sopenharmony_ci 83093fb6ee3Sopenharmony_ci <pre><!DOCTYPE HTML> 83193fb6ee3Sopenharmony_ci<html><strong> 83293fb6ee3Sopenharmony_ci </strong><head><strong> 83393fb6ee3Sopenharmony_ci </strong><title>Hello</title><strong> 83493fb6ee3Sopenharmony_ci </strong></head><strong> 83593fb6ee3Sopenharmony_ci </strong><body><strong> 83693fb6ee3Sopenharmony_ci </strong><p>Welcome to this example.</p> 83793fb6ee3Sopenharmony_ci </body> 83893fb6ee3Sopenharmony_ci</html></pre> 83993fb6ee3Sopenharmony_ci 84093fb6ee3Sopenharmony_ci <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 84193fb6ee3Sopenharmony_ci 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> 84293fb6ee3Sopenharmony_ci 84393fb6ee3Sopenharmony_ci <p>Usually, however, white space isn't an issue. If we first remove the white space we don't care 84493fb6ee3Sopenharmony_ci about:</p> 84593fb6ee3Sopenharmony_ci 84693fb6ee3Sopenharmony_ci <pre><!DOCTYPE HTML><html><head><title>Hello</title></head><body><p>Welcome to this example.</p></body></html></pre> 84793fb6ee3Sopenharmony_ci 84893fb6ee3Sopenharmony_ci <p>Then we can omit a number of tags without affecting the DOM:</p> 84993fb6ee3Sopenharmony_ci 85093fb6ee3Sopenharmony_ci <pre><!DOCTYPE HTML><title>Hello</title><p>Welcome to this example.</p></pre> 85193fb6ee3Sopenharmony_ci 85293fb6ee3Sopenharmony_ci <p>At that point, we can also add some white space back:</p> 85393fb6ee3Sopenharmony_ci 85493fb6ee3Sopenharmony_ci <pre><!DOCTYPE HTML> 85593fb6ee3Sopenharmony_ci<title>Hello</title> 85693fb6ee3Sopenharmony_ci<p>Welcome to this example.</p></pre> 85793fb6ee3Sopenharmony_ci 85893fb6ee3Sopenharmony_ci <p>This would be equivalent to this document, with the omitted tags shown in their 85993fb6ee3Sopenharmony_ci parser-implied positions; the only white space text node that results from this is the newline at 86093fb6ee3Sopenharmony_ci the end of the <code id=optional-tags:the-head-element-6><a href=semantics.html#the-head-element>head</a></code> element:</p> 86193fb6ee3Sopenharmony_ci 86293fb6ee3Sopenharmony_ci <pre><!DOCTYPE HTML> 86393fb6ee3Sopenharmony_ci<small><html><head></small><title>Hello</title> 86493fb6ee3Sopenharmony_ci<small></head><body></small><p>Welcome to this example.</p><small></body></html></small></pre> 86593fb6ee3Sopenharmony_ci 86693fb6ee3Sopenharmony_ci </div> 86793fb6ee3Sopenharmony_ci 86893fb6ee3Sopenharmony_ci 86993fb6ee3Sopenharmony_ci <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 87093fb6ee3Sopenharmony_ci <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 87193fb6ee3Sopenharmony_ci no more content in the parent element.</p> 87293fb6ee3Sopenharmony_ci 87393fb6ee3Sopenharmony_ci 87493fb6ee3Sopenharmony_ci <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 87593fb6ee3Sopenharmony_ci <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 87693fb6ee3Sopenharmony_ci <code id=optional-tags:the-dd-element><a href=semantics.html#the-dd-element>dd</a></code> element.</p> 87793fb6ee3Sopenharmony_ci 87893fb6ee3Sopenharmony_ci 87993fb6ee3Sopenharmony_ci <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 88093fb6ee3Sopenharmony_ci <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 88193fb6ee3Sopenharmony_ci <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> 88293fb6ee3Sopenharmony_ci 88393fb6ee3Sopenharmony_ci 88493fb6ee3Sopenharmony_ci <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 88593fb6ee3Sopenharmony_ci <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>, 88693fb6ee3Sopenharmony_ci <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>, 88793fb6ee3Sopenharmony_ci <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>, 88893fb6ee3Sopenharmony_ci <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>, 88993fb6ee3Sopenharmony_ci <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>, 89093fb6ee3Sopenharmony_ci <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 89193fb6ee3Sopenharmony_ci <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 89293fb6ee3Sopenharmony_ci 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>, 89393fb6ee3Sopenharmony_ci <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> 89493fb6ee3Sopenharmony_ci 89593fb6ee3Sopenharmony_ci <div class=example> 89693fb6ee3Sopenharmony_ci 89793fb6ee3Sopenharmony_ci <p>We can thus simplify the earlier example further: 89893fb6ee3Sopenharmony_ci 89993fb6ee3Sopenharmony_ci <pre><!DOCTYPE HTML><title>Hello</title><p>Welcome to this example.<small></p></small></pre> 90093fb6ee3Sopenharmony_ci 90193fb6ee3Sopenharmony_ci </div> 90293fb6ee3Sopenharmony_ci 90393fb6ee3Sopenharmony_ci 90493fb6ee3Sopenharmony_ci <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 90593fb6ee3Sopenharmony_ci <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, 90693fb6ee3Sopenharmony_ci or if there is no more content in the parent element.</p> 90793fb6ee3Sopenharmony_ci 90893fb6ee3Sopenharmony_ci 90993fb6ee3Sopenharmony_ci <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 91093fb6ee3Sopenharmony_ci <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, 91193fb6ee3Sopenharmony_ci or if there is no more content in the parent element.</p> 91293fb6ee3Sopenharmony_ci 91393fb6ee3Sopenharmony_ci 91493fb6ee3Sopenharmony_ci <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 91593fb6ee3Sopenharmony_ci if the <code id=optional-tags:the-optgroup-element-2><a href=forms.html#the-optgroup-element>optgroup</a></code> element is 91693fb6ee3Sopenharmony_ci 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 91793fb6ee3Sopenharmony_ci the parent element.</p> 91893fb6ee3Sopenharmony_ci 91993fb6ee3Sopenharmony_ci 92093fb6ee3Sopenharmony_ci 92193fb6ee3Sopenharmony_ci <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 92293fb6ee3Sopenharmony_ci 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 92393fb6ee3Sopenharmony_ci 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 92493fb6ee3Sopenharmony_ci in the parent element.</p> 92593fb6ee3Sopenharmony_ci 92693fb6ee3Sopenharmony_ci 92793fb6ee3Sopenharmony_ci <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 92893fb6ee3Sopenharmony_ci 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, 92993fb6ee3Sopenharmony_ci 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 93093fb6ee3Sopenharmony_ci <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 93193fb6ee3Sopenharmony_ci is empty.)</p> 93293fb6ee3Sopenharmony_ci 93393fb6ee3Sopenharmony_ci 93493fb6ee3Sopenharmony_ci <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 93593fb6ee3Sopenharmony_ci 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 93693fb6ee3Sopenharmony_ci a <a href=#syntax-comments id=optional-tags:syntax-comments-6>comment</a>.</p> 93793fb6ee3Sopenharmony_ci 93893fb6ee3Sopenharmony_ci 93993fb6ee3Sopenharmony_ci <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 94093fb6ee3Sopenharmony_ci 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 94193fb6ee3Sopenharmony_ci a <a href=#syntax-comments id=optional-tags:syntax-comments-7>comment</a>.</p> 94293fb6ee3Sopenharmony_ci 94393fb6ee3Sopenharmony_ci 94493fb6ee3Sopenharmony_ci <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 94593fb6ee3Sopenharmony_ci 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 94693fb6ee3Sopenharmony_ci <code id=optional-tags:the-tfoot-element><a href=tables.html#the-tfoot-element>tfoot</a></code> element.</p> 94793fb6ee3Sopenharmony_ci 94893fb6ee3Sopenharmony_ci 94993fb6ee3Sopenharmony_ci <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 95093fb6ee3Sopenharmony_ci 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 95193fb6ee3Sopenharmony_ci 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 95293fb6ee3Sopenharmony_ci <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 95393fb6ee3Sopenharmony_ci can't be omitted if the element is empty.)</p> 95493fb6ee3Sopenharmony_ci 95593fb6ee3Sopenharmony_ci 95693fb6ee3Sopenharmony_ci <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 95793fb6ee3Sopenharmony_ci 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 95893fb6ee3Sopenharmony_ci <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> 95993fb6ee3Sopenharmony_ci 96093fb6ee3Sopenharmony_ci 96193fb6ee3Sopenharmony_ci <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 96293fb6ee3Sopenharmony_ci 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 96393fb6ee3Sopenharmony_ci there is no more content in the parent element.</p> 96493fb6ee3Sopenharmony_ci 96593fb6ee3Sopenharmony_ci 96693fb6ee3Sopenharmony_ci <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 96793fb6ee3Sopenharmony_ci <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 96893fb6ee3Sopenharmony_ci no more content in the parent element.</p> 96993fb6ee3Sopenharmony_ci 97093fb6ee3Sopenharmony_ci 97193fb6ee3Sopenharmony_ci <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 97293fb6ee3Sopenharmony_ci <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, 97393fb6ee3Sopenharmony_ci or if there is no more content in the parent element.</p> 97493fb6ee3Sopenharmony_ci 97593fb6ee3Sopenharmony_ci 97693fb6ee3Sopenharmony_ci <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 97793fb6ee3Sopenharmony_ci <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, 97893fb6ee3Sopenharmony_ci or if there is no more content in the parent element.</p> 97993fb6ee3Sopenharmony_ci 98093fb6ee3Sopenharmony_ci <div class=example> 98193fb6ee3Sopenharmony_ci 98293fb6ee3Sopenharmony_ci <p>The ability to omit all these table-related tags makes table markup much terser.</p> 98393fb6ee3Sopenharmony_ci 98493fb6ee3Sopenharmony_ci <p>Take this example:</p> 98593fb6ee3Sopenharmony_ci 98693fb6ee3Sopenharmony_ci <pre><table> 98793fb6ee3Sopenharmony_ci <caption>37547 TEE Electric Powered Rail Car Train Functions (Abbreviated)</caption> 98893fb6ee3Sopenharmony_ci <colgroup><col><col><col></colgroup> 98993fb6ee3Sopenharmony_ci <thead> 99093fb6ee3Sopenharmony_ci <tr> 99193fb6ee3Sopenharmony_ci <th>Function</th> 99293fb6ee3Sopenharmony_ci <th>Control Unit</th> 99393fb6ee3Sopenharmony_ci <th>Central Station</th> 99493fb6ee3Sopenharmony_ci </tr> 99593fb6ee3Sopenharmony_ci </thead> 99693fb6ee3Sopenharmony_ci <tbody> 99793fb6ee3Sopenharmony_ci <tr> 99893fb6ee3Sopenharmony_ci <td>Headlights</td> 99993fb6ee3Sopenharmony_ci <td>✔</td> 100093fb6ee3Sopenharmony_ci <td>✔</td> 100193fb6ee3Sopenharmony_ci </tr> 100293fb6ee3Sopenharmony_ci <tr> 100393fb6ee3Sopenharmony_ci <td>Interior Lights</td> 100493fb6ee3Sopenharmony_ci <td>✔</td> 100593fb6ee3Sopenharmony_ci <td>✔</td> 100693fb6ee3Sopenharmony_ci </tr> 100793fb6ee3Sopenharmony_ci <tr> 100893fb6ee3Sopenharmony_ci <td>Electric locomotive operating sounds</td> 100993fb6ee3Sopenharmony_ci <td>✔</td> 101093fb6ee3Sopenharmony_ci <td>✔</td> 101193fb6ee3Sopenharmony_ci </tr> 101293fb6ee3Sopenharmony_ci <tr> 101393fb6ee3Sopenharmony_ci <td>Engineer's cab lighting</td> 101493fb6ee3Sopenharmony_ci <td></td> 101593fb6ee3Sopenharmony_ci <td>✔</td> 101693fb6ee3Sopenharmony_ci </tr> 101793fb6ee3Sopenharmony_ci <tr> 101893fb6ee3Sopenharmony_ci <td>Station Announcements - Swiss</td> 101993fb6ee3Sopenharmony_ci <td></td> 102093fb6ee3Sopenharmony_ci <td>✔</td> 102193fb6ee3Sopenharmony_ci </tr> 102293fb6ee3Sopenharmony_ci </tbody> 102393fb6ee3Sopenharmony_ci</table></pre> 102493fb6ee3Sopenharmony_ci 102593fb6ee3Sopenharmony_ci <p>The exact same table, modulo some white space differences, could be marked up as follows:</p> 102693fb6ee3Sopenharmony_ci 102793fb6ee3Sopenharmony_ci <pre><table> 102893fb6ee3Sopenharmony_ci <caption>37547 TEE Electric Powered Rail Car Train Functions (Abbreviated) 102993fb6ee3Sopenharmony_ci <colgroup><col><col><col> 103093fb6ee3Sopenharmony_ci <thead> 103193fb6ee3Sopenharmony_ci <tr> 103293fb6ee3Sopenharmony_ci <th>Function 103393fb6ee3Sopenharmony_ci <th>Control Unit 103493fb6ee3Sopenharmony_ci <th>Central Station 103593fb6ee3Sopenharmony_ci <tbody> 103693fb6ee3Sopenharmony_ci <tr> 103793fb6ee3Sopenharmony_ci <td>Headlights 103893fb6ee3Sopenharmony_ci <td>✔ 103993fb6ee3Sopenharmony_ci <td>✔ 104093fb6ee3Sopenharmony_ci <tr> 104193fb6ee3Sopenharmony_ci <td>Interior Lights 104293fb6ee3Sopenharmony_ci <td>✔ 104393fb6ee3Sopenharmony_ci <td>✔ 104493fb6ee3Sopenharmony_ci <tr> 104593fb6ee3Sopenharmony_ci <td>Electric locomotive operating sounds 104693fb6ee3Sopenharmony_ci <td>✔ 104793fb6ee3Sopenharmony_ci <td>✔ 104893fb6ee3Sopenharmony_ci <tr> 104993fb6ee3Sopenharmony_ci <td>Engineer's cab lighting 105093fb6ee3Sopenharmony_ci <td> 105193fb6ee3Sopenharmony_ci <td>✔ 105293fb6ee3Sopenharmony_ci <tr> 105393fb6ee3Sopenharmony_ci <td>Station Announcements - Swiss 105493fb6ee3Sopenharmony_ci <td> 105593fb6ee3Sopenharmony_ci <td>✔ 105693fb6ee3Sopenharmony_ci</table></pre> 105793fb6ee3Sopenharmony_ci 105893fb6ee3Sopenharmony_ci <p>Since the cells take up much less room this way, this can be made even terser by having each 105993fb6ee3Sopenharmony_ci row on one line:</p> 106093fb6ee3Sopenharmony_ci 106193fb6ee3Sopenharmony_ci <pre><table> 106293fb6ee3Sopenharmony_ci <caption>37547 TEE Electric Powered Rail Car Train Functions (Abbreviated) 106393fb6ee3Sopenharmony_ci <colgroup><col><col><col> 106493fb6ee3Sopenharmony_ci <thead> 106593fb6ee3Sopenharmony_ci <tr> <th>Function <th>Control Unit <th>Central Station 106693fb6ee3Sopenharmony_ci <tbody> 106793fb6ee3Sopenharmony_ci <tr> <td>Headlights <td>✔ <td>✔ 106893fb6ee3Sopenharmony_ci <tr> <td>Interior Lights <td>✔ <td>✔ 106993fb6ee3Sopenharmony_ci <tr> <td>Electric locomotive operating sounds <td>✔ <td>✔ 107093fb6ee3Sopenharmony_ci <tr> <td>Engineer's cab lighting <td> <td>✔ 107193fb6ee3Sopenharmony_ci <tr> <td>Station Announcements - Swiss <td> <td>✔ 107293fb6ee3Sopenharmony_ci</table></pre> 107393fb6ee3Sopenharmony_ci 107493fb6ee3Sopenharmony_ci <p>The only differences between these tables, at the DOM level, is with the precise position of 107593fb6ee3Sopenharmony_ci the (in any case semantically-neutral) white space.</p> 107693fb6ee3Sopenharmony_ci 107793fb6ee3Sopenharmony_ci </div> 107893fb6ee3Sopenharmony_ci 107993fb6ee3Sopenharmony_ci <p><strong>However</strong>, a <a href=#syntax-start-tag id=optional-tags:syntax-start-tag-7>start tag</a> must never be 108093fb6ee3Sopenharmony_ci omitted if it has any attributes.</p> 108193fb6ee3Sopenharmony_ci 108293fb6ee3Sopenharmony_ci <div class=example> 108393fb6ee3Sopenharmony_ci 108493fb6ee3Sopenharmony_ci <p>Returning to the earlier example with all the white space removed and then all the optional 108593fb6ee3Sopenharmony_ci tags removed:</p> 108693fb6ee3Sopenharmony_ci 108793fb6ee3Sopenharmony_ci <pre><!DOCTYPE HTML><title>Hello</title><p>Welcome to this example.</pre> 108893fb6ee3Sopenharmony_ci 108993fb6ee3Sopenharmony_ci <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> 109093fb6ee3Sopenharmony_ci 109193fb6ee3Sopenharmony_ci <pre><!DOCTYPE HTML><html lang="en"><title>Hello</title><body class="demo"><p>Welcome to this example.</pre> 109293fb6ee3Sopenharmony_ci 109393fb6ee3Sopenharmony_ci </div> 109493fb6ee3Sopenharmony_ci 109593fb6ee3Sopenharmony_ci <p class=note>This section assumes that the document is conforming, in particular, that there 109693fb6ee3Sopenharmony_ci are no <a href=dom.html#content-models id=optional-tags:content-models>content model</a> violations. Omitting tags in the fashion 109793fb6ee3Sopenharmony_ci 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> 109893fb6ee3Sopenharmony_ci described in this specification is likely to result in unexpected DOM differences (this is, in 109993fb6ee3Sopenharmony_ci part, what the content models are designed to avoid).</p> 110093fb6ee3Sopenharmony_ci 110193fb6ee3Sopenharmony_ci 110293fb6ee3Sopenharmony_ci <h5 id=element-restrictions>12.1.2.5 Restrictions on content models</h5> 110393fb6ee3Sopenharmony_ci 110493fb6ee3Sopenharmony_ci <p>For historical reasons, certain elements have extra restrictions beyond even the restrictions 110593fb6ee3Sopenharmony_ci given by their content model.</p> 110693fb6ee3Sopenharmony_ci 110793fb6ee3Sopenharmony_ci <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 110893fb6ee3Sopenharmony_ci 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 110993fb6ee3Sopenharmony_ci 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 111093fb6ee3Sopenharmony_ci <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 111193fb6ee3Sopenharmony_ci it.)</p> 111293fb6ee3Sopenharmony_ci 111393fb6ee3Sopenharmony_ci <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. 111493fb6ee3Sopenharmony_ci 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 111593fb6ee3Sopenharmony_ci themselves start with a <a href=#syntax-newlines id=element-restrictions:syntax-newlines-3>newline</a> (because otherwise the 111693fb6ee3Sopenharmony_ci leading newline in the contents would be treated like the optional newline, and ignored).</p> 111793fb6ee3Sopenharmony_ci 111893fb6ee3Sopenharmony_ci <div class=example> 111993fb6ee3Sopenharmony_ci <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> 112093fb6ee3Sopenharmony_ci <pre><pre>Hello</pre></pre> 112193fb6ee3Sopenharmony_ci <pre><pre><br>Hello</pre></pre> 112293fb6ee3Sopenharmony_ci </div> 112393fb6ee3Sopenharmony_ci 112493fb6ee3Sopenharmony_ci 112593fb6ee3Sopenharmony_ci <h5 id=cdata-rcdata-restrictions>12.1.2.6 Restrictions on the contents of raw text and escapable raw text elements</h5> 112693fb6ee3Sopenharmony_ci 112793fb6ee3Sopenharmony_ci <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 112893fb6ee3Sopenharmony_ci elements</a> must not contain any occurrences of the string "<code></</code>" 112993fb6ee3Sopenharmony_ci (U+003C LESS-THAN SIGN, U+002F SOLIDUS) followed by characters that case-insensitively match the 113093fb6ee3Sopenharmony_ci tag name of the element followed by one of U+0009 CHARACTER TABULATION (tab), U+000A LINE FEED 113193fb6ee3Sopenharmony_ci (LF), U+000C FORM FEED (FF), U+000D CARRIAGE RETURN (CR), U+0020 SPACE, U+003E GREATER-THAN SIGN 113293fb6ee3Sopenharmony_ci (>), or U+002F SOLIDUS (/).</p> 113393fb6ee3Sopenharmony_ci 113493fb6ee3Sopenharmony_ci 113593fb6ee3Sopenharmony_ci <h4 id=text-2>12.1.3 Text</h4> 113693fb6ee3Sopenharmony_ci 113793fb6ee3Sopenharmony_ci <p><dfn id=syntax-text>Text</dfn> is allowed inside elements, attribute values, and comments. 113893fb6ee3Sopenharmony_ci Extra constraints are placed on what is and what is not allowed in text based on where the text is 113993fb6ee3Sopenharmony_ci to be put, as described in the other sections.</p> 114093fb6ee3Sopenharmony_ci 114193fb6ee3Sopenharmony_ci 114293fb6ee3Sopenharmony_ci <h5 id=newlines>12.1.3.1 Newlines</h5> 114393fb6ee3Sopenharmony_ci 114493fb6ee3Sopenharmony_ci <p><dfn id=syntax-newlines>Newlines</dfn> in HTML may be represented either as U+000D 114593fb6ee3Sopenharmony_ci CARRIAGE RETURN (CR) characters, U+000A LINE FEED (LF) characters, or pairs of U+000D CARRIAGE 114693fb6ee3Sopenharmony_ci RETURN (CR), U+000A LINE FEED (LF) characters in that order.</p> 114793fb6ee3Sopenharmony_ci 114893fb6ee3Sopenharmony_ci <p>Where <a href=#syntax-charref id=newlines:syntax-charref>character references</a> are allowed, a character 114993fb6ee3Sopenharmony_ci reference of a U+000A LINE FEED (LF) character (but not a U+000D CARRIAGE RETURN (CR) character) 115093fb6ee3Sopenharmony_ci also represents a <a href=#syntax-newlines id=newlines:syntax-newlines>newline</a>.</p> 115193fb6ee3Sopenharmony_ci 115293fb6ee3Sopenharmony_ci 115393fb6ee3Sopenharmony_ci <h4 id=character-references>12.1.4 Character references</h4> 115493fb6ee3Sopenharmony_ci 115593fb6ee3Sopenharmony_ci <p>In certain cases described in other sections, <a href=#syntax-text id=character-references:syntax-text>text</a> may be 115693fb6ee3Sopenharmony_ci mixed with <dfn id=syntax-charref>character references</dfn>. These can be used to escape 115793fb6ee3Sopenharmony_ci characters that couldn't otherwise legally be included in <a href=#syntax-text id=character-references:syntax-text-2>text</a>.</p> 115893fb6ee3Sopenharmony_ci 115993fb6ee3Sopenharmony_ci <p>Character references must start with a U+0026 AMPERSAND character (&). Following this, 116093fb6ee3Sopenharmony_ci there are three possible kinds of character references:</p> 116193fb6ee3Sopenharmony_ci 116293fb6ee3Sopenharmony_ci <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 116393fb6ee3Sopenharmony_ci references</a> section, using the same case. The name must be one that is 116493fb6ee3Sopenharmony_ci 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 116593fb6ee3Sopenharmony_ci <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 116693fb6ee3Sopenharmony_ci point that is allowed according to the definition below. The digits must then be followed by a 116793fb6ee3Sopenharmony_ci 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 116893fb6ee3Sopenharmony_ci by either a U+0078 LATIN SMALL LETTER X character (x) or a U+0058 LATIN CAPITAL LETTER X 116993fb6ee3Sopenharmony_ci 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>, 117093fb6ee3Sopenharmony_ci representing a hexadecimal integer that corresponds to a Unicode code point that is allowed 117193fb6ee3Sopenharmony_ci according to the definition below. The digits must then be followed by a U+003B SEMICOLON 117293fb6ee3Sopenharmony_ci character (;).</dl> 117393fb6ee3Sopenharmony_ci 117493fb6ee3Sopenharmony_ci <p>The numeric character reference forms described above are allowed to reference any Unicode code 117593fb6ee3Sopenharmony_ci point other than U+0000, U+000D, permanently undefined Unicode characters (noncharacters), 117693fb6ee3Sopenharmony_ci 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> 117793fb6ee3Sopenharmony_ci 117893fb6ee3Sopenharmony_ci <p>An <dfn id=syntax-ambiguous-ampersand>ambiguous ampersand</dfn> is a U+0026 AMPERSAND 117993fb6ee3Sopenharmony_ci character (&) that is followed by one or more <a id=character-references:alphanumeric-ascii-characters href=infrastructure.html#alphanumeric-ascii-characters>alphanumeric ASCII characters</a>, 118093fb6ee3Sopenharmony_ci followed by a U+003B SEMICOLON character (;), where these characters do not match any of the names 118193fb6ee3Sopenharmony_ci given in the <a href=#named-character-references id=character-references:named-character-references-2>named character references</a> section.</p> 118293fb6ee3Sopenharmony_ci 118393fb6ee3Sopenharmony_ci 118493fb6ee3Sopenharmony_ci <h4 id=cdata-sections>12.1.5 CDATA sections</h4> 118593fb6ee3Sopenharmony_ci 118693fb6ee3Sopenharmony_ci <p><dfn id=syntax-cdata>CDATA sections</dfn> must consist of the following components, in 118793fb6ee3Sopenharmony_ci this order:</p> 118893fb6ee3Sopenharmony_ci 118993fb6ee3Sopenharmony_ci <ol><li>The string "<code><![CDATA[</code>".<li>Optionally, <a href=#syntax-text id=cdata-sections:syntax-text>text</a>, with the additional restriction that the 119093fb6ee3Sopenharmony_ci text must not contain the string "<code>]]></code>".<li>The string "<code>]]></code>".</ol> 119193fb6ee3Sopenharmony_ci 119293fb6ee3Sopenharmony_ci <div class=example> 119393fb6ee3Sopenharmony_ci 119493fb6ee3Sopenharmony_ci <p>CDATA sections can only be used in foreign content (MathML or SVG). In this example, a CDATA 119593fb6ee3Sopenharmony_ci 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> 119693fb6ee3Sopenharmony_ci 119793fb6ee3Sopenharmony_ci <pre><p>You can add a string to a number, but this stringifies the number:</p> 119893fb6ee3Sopenharmony_ci<math> 119993fb6ee3Sopenharmony_ci <ms><![CDATA[x<y]]></ms> 120093fb6ee3Sopenharmony_ci <mo>+</mo> 120193fb6ee3Sopenharmony_ci <mn>3</mn> 120293fb6ee3Sopenharmony_ci <mo>=</mo> 120393fb6ee3Sopenharmony_ci <ms><![CDATA[x<y3]]></ms> 120493fb6ee3Sopenharmony_ci</math></pre> 120593fb6ee3Sopenharmony_ci 120693fb6ee3Sopenharmony_ci </div> 120793fb6ee3Sopenharmony_ci 120893fb6ee3Sopenharmony_ci 120993fb6ee3Sopenharmony_ci <h4 id=comments>12.1.6 Comments</h4> 121093fb6ee3Sopenharmony_ci 121193fb6ee3Sopenharmony_ci <p><dfn id=syntax-comments>Comments</dfn> must start with the four character sequence U+003C 121293fb6ee3Sopenharmony_ci LESS-THAN SIGN, U+0021 EXCLAMATION MARK, U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS (<code><!--</code>). Following this sequence, the comment may have <a href=#syntax-text id=comments:syntax-text>text</a>, with the additional restriction that the text must not start with 121393fb6ee3Sopenharmony_ci a single U+003E GREATER-THAN SIGN character (>), nor start with a U+002D HYPHEN-MINUS character 121493fb6ee3Sopenharmony_ci (-) followed by a U+003E GREATER-THAN SIGN (>) character, nor contain two consecutive U+002D 121593fb6ee3Sopenharmony_ci HYPHEN-MINUS characters (<code>--</code>), nor end with a U+002D HYPHEN-MINUS character 121693fb6ee3Sopenharmony_ci (-). Finally, the comment must be ended by the three character sequence U+002D HYPHEN-MINUS, 121793fb6ee3Sopenharmony_ci U+002D HYPHEN-MINUS, U+003E GREATER-THAN SIGN (<code>--></code>).</p> 121893fb6ee3Sopenharmony_ci 121993fb6ee3Sopenharmony_ci 122093fb6ee3Sopenharmony_ci 122193fb6ee3Sopenharmony_ci 122293fb6ee3Sopenharmony_ci 122393fb6ee3Sopenharmony_ci 122493fb6ee3Sopenharmony_ci <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> 122593fb6ee3Sopenharmony_ci 122693fb6ee3Sopenharmony_ci <p><i>This section only applies to user agents, data mining tools, and conformance 122793fb6ee3Sopenharmony_ci checkers.</i></p> 122893fb6ee3Sopenharmony_ci 122993fb6ee3Sopenharmony_ci <p class=note>The rules for parsing XML documents into DOM trees are covered by the next 123093fb6ee3Sopenharmony_ci section, entitled "<a id=parsing:the-xhtml-syntax href=xhtml.html#the-xhtml-syntax>The XHTML syntax</a>".</p> 123193fb6ee3Sopenharmony_ci 123293fb6ee3Sopenharmony_ci <p>User agents must use the parsing rules described in this section to generate the DOM trees from 123393fb6ee3Sopenharmony_ci <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 123493fb6ee3Sopenharmony_ci <dfn id=html-parser>HTML parser</dfn>.</p> 123593fb6ee3Sopenharmony_ci 123693fb6ee3Sopenharmony_ci <div class=note> 123793fb6ee3Sopenharmony_ci 123893fb6ee3Sopenharmony_ci <p>While the HTML syntax described in this specification bears a close resemblance to SGML and 123993fb6ee3Sopenharmony_ci XML, it is a separate language with its own parsing rules.</p> 124093fb6ee3Sopenharmony_ci 124193fb6ee3Sopenharmony_ci <p>Some earlier versions of HTML (in particular from HTML2 to HTML4) were based on SGML and used 124293fb6ee3Sopenharmony_ci SGML parsing rules. However, few (if any) web browsers ever implemented true SGML parsing for 124393fb6ee3Sopenharmony_ci HTML documents; the only user agents to strictly handle HTML as an SGML application have 124493fb6ee3Sopenharmony_ci historically been validators. The resulting confusion — with validators claiming documents 124593fb6ee3Sopenharmony_ci to have one representation while widely deployed Web browsers interoperably implemented a 124693fb6ee3Sopenharmony_ci different representation — has wasted decades of productivity. This version of HTML thus 124793fb6ee3Sopenharmony_ci returns to a non-SGML basis.</p> 124893fb6ee3Sopenharmony_ci 124993fb6ee3Sopenharmony_ci <p>Authors interested in using SGML tools in their authoring pipeline are encouraged to use XML 125093fb6ee3Sopenharmony_ci tools and the XML serialisation of HTML.</p> 125193fb6ee3Sopenharmony_ci 125293fb6ee3Sopenharmony_ci </div> 125393fb6ee3Sopenharmony_ci 125493fb6ee3Sopenharmony_ci <p>This specification defines the parsing rules for HTML documents, whether they are syntactically 125593fb6ee3Sopenharmony_ci 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 125693fb6ee3Sopenharmony_ci processing rules described throughout this specification), but user agents, while parsing an HTML 125793fb6ee3Sopenharmony_ci 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 125893fb6ee3Sopenharmony_ci error</a> that they encounter for which they do not wish to apply the rules described in this 125993fb6ee3Sopenharmony_ci specification.</p> 126093fb6ee3Sopenharmony_ci 126193fb6ee3Sopenharmony_ci <p>Conformance checkers must report at least one parse error condition to the user if one or more 126293fb6ee3Sopenharmony_ci parse error conditions exist in the document and must not report parse error conditions if none 126393fb6ee3Sopenharmony_ci exist in the document. Conformance checkers may report more than one parse error condition if more 126493fb6ee3Sopenharmony_ci than one parse error condition exists in the document.</p> 126593fb6ee3Sopenharmony_ci 126693fb6ee3Sopenharmony_ci <p class=note>Parse errors are only errors with the <em>syntax</em> of HTML. In addition to 126793fb6ee3Sopenharmony_ci checking for parse errors, conformance checkers will also verify that the document obeys all the 126893fb6ee3Sopenharmony_ci other conformance requirements described in this specification.</p> 126993fb6ee3Sopenharmony_ci 127093fb6ee3Sopenharmony_ci <p>For the purposes of conformance checkers, if a resource is determined to be in <a href=#syntax id=parsing:syntax>the HTML 127193fb6ee3Sopenharmony_ci syntax</a>, then it is an <a href=infrastructure.html#html-documents id=parsing:html-documents>HTML document</a>.</p> 127293fb6ee3Sopenharmony_ci 127393fb6ee3Sopenharmony_ci <p class=note>As stated <a href=infrastructure.html#html-elements id=parsing:html-elements class=no-backref>in the terminology 127493fb6ee3Sopenharmony_ci section</a>, references to <a href=infrastructure.html#element-type id=parsing:element-type>element types</a> that do not 127593fb6ee3Sopenharmony_ci 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 127693fb6ee3Sopenharmony_ci 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 127793fb6ee3Sopenharmony_ci 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>. 127893fb6ee3Sopenharmony_ci Where possible, references to such elements are hyperlinked to their definition.</p> 127993fb6ee3Sopenharmony_ci 128093fb6ee3Sopenharmony_ci 128193fb6ee3Sopenharmony_ci 128293fb6ee3Sopenharmony_ci 128393fb6ee3Sopenharmony_ci 128493fb6ee3Sopenharmony_ci 128593fb6ee3Sopenharmony_ci <h4 id=overview-of-the-parsing-model>12.2.1 Overview of the parsing model</h4> 128693fb6ee3Sopenharmony_ci 128793fb6ee3Sopenharmony_ci <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> 128893fb6ee3Sopenharmony_ci 128993fb6ee3Sopenharmony_ci <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 129093fb6ee3Sopenharmony_ci 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> 129193fb6ee3Sopenharmony_ci object.</p> 129293fb6ee3Sopenharmony_ci 129393fb6ee3Sopenharmony_ci <p class=note>Implementations that <a href=infrastructure.html#non-scripted>do not support scripting</a> do not 129493fb6ee3Sopenharmony_ci 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 129593fb6ee3Sopenharmony_ci still used as the model for the rest of the specification.</p> 129693fb6ee3Sopenharmony_ci 129793fb6ee3Sopenharmony_ci <p>In the common case, the data handled by the tokenization stage comes from the network, but 129893fb6ee3Sopenharmony_ci <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 129993fb6ee3Sopenharmony_ci 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> 130093fb6ee3Sopenharmony_ci 130193fb6ee3Sopenharmony_ci <p id=nestedParsing>There is only one set of states for the tokenizer stage and the tree 130293fb6ee3Sopenharmony_ci construction stage, but the tree construction stage is reentrant, meaning that while the tree 130393fb6ee3Sopenharmony_ci construction stage is handling one token, the tokenizer might be resumed, causing further tokens 130493fb6ee3Sopenharmony_ci to be emitted and processed before the first token's processing is complete.</p> 130593fb6ee3Sopenharmony_ci 130693fb6ee3Sopenharmony_ci <div class=example> 130793fb6ee3Sopenharmony_ci 130893fb6ee3Sopenharmony_ci <p>In the following example, the tree construction stage will be called upon to handle a "p" 130993fb6ee3Sopenharmony_ci start tag token while handling the "script" end tag token:</p> 131093fb6ee3Sopenharmony_ci 131193fb6ee3Sopenharmony_ci <pre>... 131293fb6ee3Sopenharmony_ci<script> 131393fb6ee3Sopenharmony_ci document.write('<p>'); 131493fb6ee3Sopenharmony_ci</script> 131593fb6ee3Sopenharmony_ci...</pre> 131693fb6ee3Sopenharmony_ci 131793fb6ee3Sopenharmony_ci </div> 131893fb6ee3Sopenharmony_ci 131993fb6ee3Sopenharmony_ci <p>To handle these cases, parsers have a <dfn id=script-nesting-level>script nesting level</dfn>, which must be initially 132093fb6ee3Sopenharmony_ci set to zero, and a <dfn id=parser-pause-flag>parser pause flag</dfn>, which must be initially set to false.</p> 132193fb6ee3Sopenharmony_ci 132293fb6ee3Sopenharmony_ci 132393fb6ee3Sopenharmony_ci 132493fb6ee3Sopenharmony_ci 132593fb6ee3Sopenharmony_ci 132693fb6ee3Sopenharmony_ci 132793fb6ee3Sopenharmony_ci 132893fb6ee3Sopenharmony_ci <h4 id=the-input-byte-stream>12.2.2 The <dfn>input byte stream</dfn></h4> 132993fb6ee3Sopenharmony_ci 133093fb6ee3Sopenharmony_ci <p>The stream of Unicode code points that comprises the input to the tokenization stage will be 133193fb6ee3Sopenharmony_ci initially seen by the user agent as a stream of bytes (typically coming over the network or from 133293fb6ee3Sopenharmony_ci the local file system). The bytes encode the actual characters according to a particular 133393fb6ee3Sopenharmony_ci <i>character encoding</i>, which the user agent uses to decode the bytes into characters.</p> 133493fb6ee3Sopenharmony_ci 133593fb6ee3Sopenharmony_ci <p class=note>For XML documents, the algorithm user agents are required to use to determine the 133693fb6ee3Sopenharmony_ci character encoding is given by the XML specification. This section does not apply to XML 133793fb6ee3Sopenharmony_ci documents. <a href=references.html#refsXML>[XML]</a></p> 133893fb6ee3Sopenharmony_ci 133993fb6ee3Sopenharmony_ci <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 134093fb6ee3Sopenharmony_ci character encoding.</p> 134193fb6ee3Sopenharmony_ci 134293fb6ee3Sopenharmony_ci <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 134393fb6ee3Sopenharmony_ci 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 134493fb6ee3Sopenharmony_ci for that encoding's <a id=the-input-byte-stream:decoder href=infrastructure.html#decoder>decoder</a>.</p> 134593fb6ee3Sopenharmony_ci 134693fb6ee3Sopenharmony_ci <p class=note>Bytes or sequences of bytes in the original byte stream that did not conform to 134793fb6ee3Sopenharmony_ci the Encoding standard (e.g. invalid UTF-8 byte sequences in a UTF-8 input byte stream) are errors 134893fb6ee3Sopenharmony_ci that conformance checkers are expected to report. <a href=references.html#refsENCODING>[ENCODING]</a></p> 134993fb6ee3Sopenharmony_ci 135093fb6ee3Sopenharmony_ci <p class=note>Leading Byte Order Marks (BOMs) are not stripped by the decoder algorithms, they 135193fb6ee3Sopenharmony_ci are stripped by the algorithm below.</p> 135293fb6ee3Sopenharmony_ci 135393fb6ee3Sopenharmony_ci <p class=warning>The decoder algorithms describe how to handle invalid input; for security 135493fb6ee3Sopenharmony_ci reasons, it is imperative that those rules be followed precisely. Differences in how invalid byte 135593fb6ee3Sopenharmony_ci sequences are handled can result in, amongst other problems, script injection vulnerabilities 135693fb6ee3Sopenharmony_ci ("XSS").</p> 135793fb6ee3Sopenharmony_ci 135893fb6ee3Sopenharmony_ci <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>, 135993fb6ee3Sopenharmony_ci <i>certain</i>, or <i>irrelevant</i>. The encoding used, and whether the confidence in that 136093fb6ee3Sopenharmony_ci encoding is <i>tentative</i> or <i>certain</i>, is <a href=#meta-charset-during-parse>used 136193fb6ee3Sopenharmony_ci 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 136293fb6ee3Sopenharmony_ci necessary, e.g. because the parser is operating on a Unicode stream and doesn't have to use a 136393fb6ee3Sopenharmony_ci character encoding at all, then the <a href=#concept-encoding-confidence id=the-input-byte-stream:concept-encoding-confidence>confidence</a> is 136493fb6ee3Sopenharmony_ci <i>irrelevant</i>.</p> 136593fb6ee3Sopenharmony_ci 136693fb6ee3Sopenharmony_ci <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 136793fb6ee3Sopenharmony_ci 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> 136893fb6ee3Sopenharmony_ci 136993fb6ee3Sopenharmony_ci 137093fb6ee3Sopenharmony_ci 137193fb6ee3Sopenharmony_ci <h5 id=parsing-with-a-known-character-encoding>12.2.2.1 Parsing with a known character encoding</h5> 137293fb6ee3Sopenharmony_ci 137393fb6ee3Sopenharmony_ci <p>When the HTML parser is to operate on an input byte stream that has <dfn id=a-known-definite-encoding>a known definite 137493fb6ee3Sopenharmony_ci 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> 137593fb6ee3Sopenharmony_ci 137693fb6ee3Sopenharmony_ci 137793fb6ee3Sopenharmony_ci <h5 id=determining-the-character-encoding>12.2.2.2 Determining the character encoding</h5> 137893fb6ee3Sopenharmony_ci 137993fb6ee3Sopenharmony_ci <p>In some cases, it might be impractical to unambiguously determine the encoding before parsing 138093fb6ee3Sopenharmony_ci the document. Because of this, this specification provides for a two-pass mechanism with an 138193fb6ee3Sopenharmony_ci optional pre-scan. Implementations are allowed, as described below, to apply a simplified parsing 138293fb6ee3Sopenharmony_ci algorithm to whatever bytes they have available before beginning to parse the document. Then, the 138393fb6ee3Sopenharmony_ci real parser is started, using a tentative encoding derived from this pre-parse and other 138493fb6ee3Sopenharmony_ci out-of-band metadata. If, while the document is being loaded, the user agent discovers a character 138593fb6ee3Sopenharmony_ci encoding declaration that conflicts with this information, then the parser can get reinvoked to 138693fb6ee3Sopenharmony_ci perform a parse of the document with the real encoding.</p> 138793fb6ee3Sopenharmony_ci 138893fb6ee3Sopenharmony_ci <p id=documentEncoding>User agents must use the following algorithm, called the <dfn id=encoding-sniffing-algorithm>encoding 138993fb6ee3Sopenharmony_ci sniffing algorithm</dfn>, to determine the character encoding to use when decoding a document in 139093fb6ee3Sopenharmony_ci the first pass. This algorithm takes as input any out-of-band metadata available to the user agent 139193fb6ee3Sopenharmony_ci (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 139293fb6ee3Sopenharmony_ci 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 139393fb6ee3Sopenharmony_ci <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> 139493fb6ee3Sopenharmony_ci 139593fb6ee3Sopenharmony_ci <ol><li> 139693fb6ee3Sopenharmony_ci 139793fb6ee3Sopenharmony_ci <p>If the user has explicitly instructed the user agent to override the document's character 139893fb6ee3Sopenharmony_ci 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> 139993fb6ee3Sopenharmony_ci 140093fb6ee3Sopenharmony_ci <p class=note>Typically, user agents remember such user requests across sessions, and in some 140193fb6ee3Sopenharmony_ci 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> 140293fb6ee3Sopenharmony_ci 140393fb6ee3Sopenharmony_ci <li> 140493fb6ee3Sopenharmony_ci 140593fb6ee3Sopenharmony_ci <p>The user agent may wait for more bytes of the resource to be available, either in this step 140693fb6ee3Sopenharmony_ci or at any later step in this algorithm. For instance, a user agent might wait 500ms or 1024 140793fb6ee3Sopenharmony_ci bytes, whichever came first. In general preparsing the source to find the encoding improves 140893fb6ee3Sopenharmony_ci performance, as it reduces the need to throw away the data structures used when parsing upon 140993fb6ee3Sopenharmony_ci finding the encoding information. However, if the user agent delays too long to obtain data to 141093fb6ee3Sopenharmony_ci determine the encoding, then the cost of the delay could outweigh any performance improvements 141193fb6ee3Sopenharmony_ci from the preparse.</p> 141293fb6ee3Sopenharmony_ci 141393fb6ee3Sopenharmony_ci <p class=note>The authoring conformance requirements for character encoding declarations limit 141493fb6ee3Sopenharmony_ci them to only appearing <a href=semantics.html#charset1024>in the first 1024 bytes</a>. User agents are 141593fb6ee3Sopenharmony_ci therefore encouraged to use the prescan algorithm below (as invoked by these steps) on the first 141693fb6ee3Sopenharmony_ci 1024 bytes, but not to stall beyond that.</p> 141793fb6ee3Sopenharmony_ci 141893fb6ee3Sopenharmony_ci <li> 141993fb6ee3Sopenharmony_ci 142093fb6ee3Sopenharmony_ci 142193fb6ee3Sopenharmony_ci 142293fb6ee3Sopenharmony_ci <p>For each of the rows in the following table, starting with the first one and going down, if 142393fb6ee3Sopenharmony_ci there are as many or more bytes available than the number of bytes in the first column, and the 142493fb6ee3Sopenharmony_ci first bytes of the file match the bytes given in the first column, then return the encoding 142593fb6ee3Sopenharmony_ci 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> 142693fb6ee3Sopenharmony_ci 142793fb6ee3Sopenharmony_ci 142893fb6ee3Sopenharmony_ci <table><thead><tr><th>Bytes in Hexadecimal 142993fb6ee3Sopenharmony_ci <th>Encoding 143093fb6ee3Sopenharmony_ci <tbody><tr><td>FE FF 143193fb6ee3Sopenharmony_ci <td>Big-endian UTF-16 143293fb6ee3Sopenharmony_ci <tr><td>FF FE 143393fb6ee3Sopenharmony_ci <td>Little-endian UTF-16 143493fb6ee3Sopenharmony_ci <tr><td>EF BB BF 143593fb6ee3Sopenharmony_ci <td>UTF-8 143693fb6ee3Sopenharmony_ci 143793fb6ee3Sopenharmony_ci </table> 143893fb6ee3Sopenharmony_ci 143993fb6ee3Sopenharmony_ci <p class=note>This step looks for Unicode Byte Order Marks (BOMs).</p> 144093fb6ee3Sopenharmony_ci 144193fb6ee3Sopenharmony_ci <p class=note>That this step happens before the next one honoring the HTTP 144293fb6ee3Sopenharmony_ci <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, 144393fb6ee3Sopenharmony_ci motivated by a desire to be maximally compatible with legacy content. <a href=references.html#refsHTTP>[HTTP]</a></p> 144493fb6ee3Sopenharmony_ci 144593fb6ee3Sopenharmony_ci <li><p>If the transport layer specifies a character encoding, and it is supported, return that 144693fb6ee3Sopenharmony_ci encoding with the <a href=#concept-encoding-confidence id=determining-the-character-encoding:concept-encoding-confidence-4>confidence</a> <i>certain</i>, and 144793fb6ee3Sopenharmony_ci abort these steps.<li> 144893fb6ee3Sopenharmony_ci 144993fb6ee3Sopenharmony_ci <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 145093fb6ee3Sopenharmony_ci stream to determine its encoding</a>. The <var>end condition</var> is that the user 145193fb6ee3Sopenharmony_ci agent decides that scanning further bytes would not be efficient. User agents are encouraged to 145293fb6ee3Sopenharmony_ci only prescan the first 1024 bytes. User agents may decide that scanning <em>any</em> bytes is 145393fb6ee3Sopenharmony_ci not efficient, in which case these substeps are entirely skipped.</p> 145493fb6ee3Sopenharmony_ci 145593fb6ee3Sopenharmony_ci <p>The aforementioned algorithm either aborts unsuccessfully or returns a character encoding. If 145693fb6ee3Sopenharmony_ci it returns a character encoding, then this algorithm must be aborted, returning the same 145793fb6ee3Sopenharmony_ci encoding, with <a href=#concept-encoding-confidence id=determining-the-character-encoding:concept-encoding-confidence-5>confidence</a> <i>tentative</i>.</p> 145893fb6ee3Sopenharmony_ci 145993fb6ee3Sopenharmony_ci <li> 146093fb6ee3Sopenharmony_ci 146193fb6ee3Sopenharmony_ci <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 146293fb6ee3Sopenharmony_ci <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 146393fb6ee3Sopenharmony_ci substeps:</p> 146493fb6ee3Sopenharmony_ci 146593fb6ee3Sopenharmony_ci <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 146693fb6ee3Sopenharmony_ci <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 146793fb6ee3Sopenharmony_ci 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 146893fb6ee3Sopenharmony_ci <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 146993fb6ee3Sopenharmony_ci 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 147093fb6ee3Sopenharmony_ci 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>, 147193fb6ee3Sopenharmony_ci 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 147293fb6ee3Sopenharmony_ci <a href=#encoding-sniffing-algorithm id=determining-the-character-encoding:encoding-sniffing-algorithm>encoding sniffing algorithm</a>'s steps.</ol> 147393fb6ee3Sopenharmony_ci 147493fb6ee3Sopenharmony_ci <li><p>Otherwise, if the user agent has information on the likely encoding for this page, e.g. 147593fb6ee3Sopenharmony_ci based on the encoding of the page when it was last visited, then return that encoding, with the 147693fb6ee3Sopenharmony_ci <a href=#concept-encoding-confidence id=determining-the-character-encoding:concept-encoding-confidence-7>confidence</a> <i>tentative</i>, and abort these 147793fb6ee3Sopenharmony_ci steps.<li> 147893fb6ee3Sopenharmony_ci 147993fb6ee3Sopenharmony_ci <p>The user agent may attempt to autodetect the character encoding from applying frequency 148093fb6ee3Sopenharmony_ci analysis or other algorithms to the data stream. Such algorithms may use information about the 148193fb6ee3Sopenharmony_ci resource other than the resource's contents, including the address of the resource. If 148293fb6ee3Sopenharmony_ci autodetection succeeds in determining a character encoding, and that encoding is a supported 148393fb6ee3Sopenharmony_ci 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. 148493fb6ee3Sopenharmony_ci <a href=references.html#refsUNIVCHARDET>[UNIVCHARDET]</a></p> 148593fb6ee3Sopenharmony_ci 148693fb6ee3Sopenharmony_ci <p class=note>User agents are generally discouraged from attempting to autodetect encodings 148793fb6ee3Sopenharmony_ci for resources obtained over the network, since doing so involves inherently non-interoperable 148893fb6ee3Sopenharmony_ci heuristics. Attempting to detect encodings based on an HTML document's preamble is especially 148993fb6ee3Sopenharmony_ci tricky since HTML markup typically uses only ASCII characters, and HTML documents tend to begin 149093fb6ee3Sopenharmony_ci with a lot of markup rather than with text content.</p> 149193fb6ee3Sopenharmony_ci 149293fb6ee3Sopenharmony_ci <p class=note>The UTF-8 encoding has a highly detectable bit pattern. Files from the local 149393fb6ee3Sopenharmony_ci file system that contain bytes with values greater than 0x7F which match the UTF-8 pattern are 149493fb6ee3Sopenharmony_ci very likely to be UTF-8, while documents with byte sequences that do not match it are very 149593fb6ee3Sopenharmony_ci likely not. When a user agent can examine the whole file, rather than just the preamble, 149693fb6ee3Sopenharmony_ci detecting for UTF-8 specifically can be especially effective. <a href=references.html#refsPPUTF8>[PPUTF8]</a> <a href=references.html#refsUTF8DET>[UTF8DET]</a></p> 149793fb6ee3Sopenharmony_ci 149893fb6ee3Sopenharmony_ci <li> 149993fb6ee3Sopenharmony_ci 150093fb6ee3Sopenharmony_ci <p>Otherwise, return an implementation-defined or user-specified default character encoding, 150193fb6ee3Sopenharmony_ci with the <a href=#concept-encoding-confidence id=determining-the-character-encoding:concept-encoding-confidence-9>confidence</a> <i>tentative</i>.</p> 150293fb6ee3Sopenharmony_ci 150393fb6ee3Sopenharmony_ci <p>In controlled environments or in environments where the encoding of documents can be 150493fb6ee3Sopenharmony_ci prescribed (for example, for user agents intended for dedicated use in new networks), the 150593fb6ee3Sopenharmony_ci comprehensive <code>UTF-8</code> encoding is suggested.</p> 150693fb6ee3Sopenharmony_ci 150793fb6ee3Sopenharmony_ci <p>In other environments, the default encoding is typically dependent on the user's locale (an 150893fb6ee3Sopenharmony_ci approximation of the languages, and thus often encodings, of the pages that the user is likely 150993fb6ee3Sopenharmony_ci to frequent). The following table gives suggested defaults based on the user's locale, for 151093fb6ee3Sopenharmony_ci 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> 151193fb6ee3Sopenharmony_ci 151293fb6ee3Sopenharmony_ci 151393fb6ee3Sopenharmony_ci 151493fb6ee3Sopenharmony_ci <table><thead><tr><th colspan=2>Locale language 151593fb6ee3Sopenharmony_ci <th>Suggested default encoding 151693fb6ee3Sopenharmony_ci <tbody><tr><td>ar 151793fb6ee3Sopenharmony_ci <td>Arabic 151893fb6ee3Sopenharmony_ci <td>windows-1256 151993fb6ee3Sopenharmony_ci 152093fb6ee3Sopenharmony_ci 152193fb6ee3Sopenharmony_ci 152293fb6ee3Sopenharmony_ci 152393fb6ee3Sopenharmony_ci 152493fb6ee3Sopenharmony_ci 152593fb6ee3Sopenharmony_ci 152693fb6ee3Sopenharmony_ci 152793fb6ee3Sopenharmony_ci 152893fb6ee3Sopenharmony_ci <tr><td>ba 152993fb6ee3Sopenharmony_ci <td>Bashkir 153093fb6ee3Sopenharmony_ci <td>windows-1251 153193fb6ee3Sopenharmony_ci 153293fb6ee3Sopenharmony_ci 153393fb6ee3Sopenharmony_ci 153493fb6ee3Sopenharmony_ci <tr><td>be 153593fb6ee3Sopenharmony_ci <td>Belarusian 153693fb6ee3Sopenharmony_ci <td>windows-1251 153793fb6ee3Sopenharmony_ci 153893fb6ee3Sopenharmony_ci 153993fb6ee3Sopenharmony_ci 154093fb6ee3Sopenharmony_ci <tr><td>bg 154193fb6ee3Sopenharmony_ci <td>Bulgarian 154293fb6ee3Sopenharmony_ci <td>windows-1251 154393fb6ee3Sopenharmony_ci 154493fb6ee3Sopenharmony_ci 154593fb6ee3Sopenharmony_ci 154693fb6ee3Sopenharmony_ci 154793fb6ee3Sopenharmony_ci 154893fb6ee3Sopenharmony_ci 154993fb6ee3Sopenharmony_ci 155093fb6ee3Sopenharmony_ci 155193fb6ee3Sopenharmony_ci 155293fb6ee3Sopenharmony_ci 155393fb6ee3Sopenharmony_ci 155493fb6ee3Sopenharmony_ci 155593fb6ee3Sopenharmony_ci 155693fb6ee3Sopenharmony_ci <tr><td>cs 155793fb6ee3Sopenharmony_ci <td>Czech 155893fb6ee3Sopenharmony_ci <td>windows-1250 155993fb6ee3Sopenharmony_ci 156093fb6ee3Sopenharmony_ci 156193fb6ee3Sopenharmony_ci 156293fb6ee3Sopenharmony_ci 156393fb6ee3Sopenharmony_ci 156493fb6ee3Sopenharmony_ci 156593fb6ee3Sopenharmony_ci 156693fb6ee3Sopenharmony_ci 156793fb6ee3Sopenharmony_ci 156893fb6ee3Sopenharmony_ci 156993fb6ee3Sopenharmony_ci <tr><td>el 157093fb6ee3Sopenharmony_ci <td>Greek 157193fb6ee3Sopenharmony_ci <td>ISO-8859-7 157293fb6ee3Sopenharmony_ci 157393fb6ee3Sopenharmony_ci 157493fb6ee3Sopenharmony_ci 157593fb6ee3Sopenharmony_ci 157693fb6ee3Sopenharmony_ci 157793fb6ee3Sopenharmony_ci <tr><td>et 157893fb6ee3Sopenharmony_ci <td>Estonian 157993fb6ee3Sopenharmony_ci <td>windows-1257 158093fb6ee3Sopenharmony_ci 158193fb6ee3Sopenharmony_ci 158293fb6ee3Sopenharmony_ci 158393fb6ee3Sopenharmony_ci <tr><td>fa 158493fb6ee3Sopenharmony_ci <td>Persian 158593fb6ee3Sopenharmony_ci <td>windows-1256 158693fb6ee3Sopenharmony_ci 158793fb6ee3Sopenharmony_ci 158893fb6ee3Sopenharmony_ci 158993fb6ee3Sopenharmony_ci 159093fb6ee3Sopenharmony_ci 159193fb6ee3Sopenharmony_ci 159293fb6ee3Sopenharmony_ci 159393fb6ee3Sopenharmony_ci 159493fb6ee3Sopenharmony_ci 159593fb6ee3Sopenharmony_ci 159693fb6ee3Sopenharmony_ci 159793fb6ee3Sopenharmony_ci 159893fb6ee3Sopenharmony_ci 159993fb6ee3Sopenharmony_ci 160093fb6ee3Sopenharmony_ci 160193fb6ee3Sopenharmony_ci 160293fb6ee3Sopenharmony_ci 160393fb6ee3Sopenharmony_ci 160493fb6ee3Sopenharmony_ci 160593fb6ee3Sopenharmony_ci 160693fb6ee3Sopenharmony_ci 160793fb6ee3Sopenharmony_ci <tr><td>he 160893fb6ee3Sopenharmony_ci <td>Hebrew 160993fb6ee3Sopenharmony_ci <td>windows-1255 161093fb6ee3Sopenharmony_ci 161193fb6ee3Sopenharmony_ci 161293fb6ee3Sopenharmony_ci 161393fb6ee3Sopenharmony_ci <tr><td>hr 161493fb6ee3Sopenharmony_ci <td>Croatian 161593fb6ee3Sopenharmony_ci <td>windows-1250 161693fb6ee3Sopenharmony_ci 161793fb6ee3Sopenharmony_ci <tr><td>hu 161893fb6ee3Sopenharmony_ci <td>Hungarian 161993fb6ee3Sopenharmony_ci <td>ISO-8859-2 162093fb6ee3Sopenharmony_ci 162193fb6ee3Sopenharmony_ci 162293fb6ee3Sopenharmony_ci 162393fb6ee3Sopenharmony_ci 162493fb6ee3Sopenharmony_ci 162593fb6ee3Sopenharmony_ci 162693fb6ee3Sopenharmony_ci 162793fb6ee3Sopenharmony_ci 162893fb6ee3Sopenharmony_ci 162993fb6ee3Sopenharmony_ci 163093fb6ee3Sopenharmony_ci 163193fb6ee3Sopenharmony_ci 163293fb6ee3Sopenharmony_ci 163393fb6ee3Sopenharmony_ci <tr><td>ja 163493fb6ee3Sopenharmony_ci <td>Japanese 163593fb6ee3Sopenharmony_ci <td>Shift_JIS 163693fb6ee3Sopenharmony_ci 163793fb6ee3Sopenharmony_ci 163893fb6ee3Sopenharmony_ci 163993fb6ee3Sopenharmony_ci <tr><td>kk 164093fb6ee3Sopenharmony_ci <td>Kazakh 164193fb6ee3Sopenharmony_ci <td>windows-1251 164293fb6ee3Sopenharmony_ci 164393fb6ee3Sopenharmony_ci 164493fb6ee3Sopenharmony_ci 164593fb6ee3Sopenharmony_ci 164693fb6ee3Sopenharmony_ci 164793fb6ee3Sopenharmony_ci <tr><td>ko 164893fb6ee3Sopenharmony_ci <td>Korean 164993fb6ee3Sopenharmony_ci <td>euc-kr 165093fb6ee3Sopenharmony_ci 165193fb6ee3Sopenharmony_ci <tr><td>ku 165293fb6ee3Sopenharmony_ci <td>Kurdish 165393fb6ee3Sopenharmony_ci <td>windows-1254 165493fb6ee3Sopenharmony_ci 165593fb6ee3Sopenharmony_ci 165693fb6ee3Sopenharmony_ci 165793fb6ee3Sopenharmony_ci <tr><td>ky 165893fb6ee3Sopenharmony_ci <td>Kyrgyz 165993fb6ee3Sopenharmony_ci <td>windows-1251 166093fb6ee3Sopenharmony_ci 166193fb6ee3Sopenharmony_ci 166293fb6ee3Sopenharmony_ci 166393fb6ee3Sopenharmony_ci <tr><td>lt 166493fb6ee3Sopenharmony_ci <td>Lithuanian 166593fb6ee3Sopenharmony_ci <td>windows-1257 166693fb6ee3Sopenharmony_ci 166793fb6ee3Sopenharmony_ci <tr><td>lv 166893fb6ee3Sopenharmony_ci <td>Latvian 166993fb6ee3Sopenharmony_ci <td>windows-1257 167093fb6ee3Sopenharmony_ci 167193fb6ee3Sopenharmony_ci 167293fb6ee3Sopenharmony_ci 167393fb6ee3Sopenharmony_ci <tr><td>mk 167493fb6ee3Sopenharmony_ci <td>Macedonian 167593fb6ee3Sopenharmony_ci <td>windows-1251 167693fb6ee3Sopenharmony_ci 167793fb6ee3Sopenharmony_ci 167893fb6ee3Sopenharmony_ci 167993fb6ee3Sopenharmony_ci 168093fb6ee3Sopenharmony_ci 168193fb6ee3Sopenharmony_ci 168293fb6ee3Sopenharmony_ci 168393fb6ee3Sopenharmony_ci 168493fb6ee3Sopenharmony_ci 168593fb6ee3Sopenharmony_ci 168693fb6ee3Sopenharmony_ci 168793fb6ee3Sopenharmony_ci 168893fb6ee3Sopenharmony_ci 168993fb6ee3Sopenharmony_ci 169093fb6ee3Sopenharmony_ci 169193fb6ee3Sopenharmony_ci 169293fb6ee3Sopenharmony_ci 169393fb6ee3Sopenharmony_ci 169493fb6ee3Sopenharmony_ci 169593fb6ee3Sopenharmony_ci 169693fb6ee3Sopenharmony_ci 169793fb6ee3Sopenharmony_ci 169893fb6ee3Sopenharmony_ci 169993fb6ee3Sopenharmony_ci <tr><td>pl 170093fb6ee3Sopenharmony_ci <td>Polish 170193fb6ee3Sopenharmony_ci <td>ISO-8859-2 170293fb6ee3Sopenharmony_ci 170393fb6ee3Sopenharmony_ci 170493fb6ee3Sopenharmony_ci 170593fb6ee3Sopenharmony_ci 170693fb6ee3Sopenharmony_ci 170793fb6ee3Sopenharmony_ci 170893fb6ee3Sopenharmony_ci 170993fb6ee3Sopenharmony_ci 171093fb6ee3Sopenharmony_ci 171193fb6ee3Sopenharmony_ci 171293fb6ee3Sopenharmony_ci 171393fb6ee3Sopenharmony_ci 171493fb6ee3Sopenharmony_ci 171593fb6ee3Sopenharmony_ci 171693fb6ee3Sopenharmony_ci 171793fb6ee3Sopenharmony_ci 171893fb6ee3Sopenharmony_ci 171993fb6ee3Sopenharmony_ci 172093fb6ee3Sopenharmony_ci 172193fb6ee3Sopenharmony_ci 172293fb6ee3Sopenharmony_ci 172393fb6ee3Sopenharmony_ci <tr><td>ru 172493fb6ee3Sopenharmony_ci <td>Russian 172593fb6ee3Sopenharmony_ci <td>windows-1251 172693fb6ee3Sopenharmony_ci 172793fb6ee3Sopenharmony_ci 172893fb6ee3Sopenharmony_ci 172993fb6ee3Sopenharmony_ci 173093fb6ee3Sopenharmony_ci 173193fb6ee3Sopenharmony_ci <tr><td>sah 173293fb6ee3Sopenharmony_ci <td>Yakut 173393fb6ee3Sopenharmony_ci <td>windows-1251 173493fb6ee3Sopenharmony_ci 173593fb6ee3Sopenharmony_ci 173693fb6ee3Sopenharmony_ci 173793fb6ee3Sopenharmony_ci 173893fb6ee3Sopenharmony_ci 173993fb6ee3Sopenharmony_ci 174093fb6ee3Sopenharmony_ci 174193fb6ee3Sopenharmony_ci <tr><td>sk 174293fb6ee3Sopenharmony_ci <td>Slovak 174393fb6ee3Sopenharmony_ci <td>windows-1250 174493fb6ee3Sopenharmony_ci 174593fb6ee3Sopenharmony_ci <tr><td>sl 174693fb6ee3Sopenharmony_ci <td>Slovenian 174793fb6ee3Sopenharmony_ci <td>ISO-8859-2 174893fb6ee3Sopenharmony_ci 174993fb6ee3Sopenharmony_ci 175093fb6ee3Sopenharmony_ci 175193fb6ee3Sopenharmony_ci 175293fb6ee3Sopenharmony_ci 175393fb6ee3Sopenharmony_ci 175493fb6ee3Sopenharmony_ci 175593fb6ee3Sopenharmony_ci 175693fb6ee3Sopenharmony_ci 175793fb6ee3Sopenharmony_ci 175893fb6ee3Sopenharmony_ci 175993fb6ee3Sopenharmony_ci 176093fb6ee3Sopenharmony_ci 176193fb6ee3Sopenharmony_ci 176293fb6ee3Sopenharmony_ci 176393fb6ee3Sopenharmony_ci 176493fb6ee3Sopenharmony_ci 176593fb6ee3Sopenharmony_ci <tr><td>sr 176693fb6ee3Sopenharmony_ci <td>Serbian 176793fb6ee3Sopenharmony_ci <td>windows-1251 176893fb6ee3Sopenharmony_ci 176993fb6ee3Sopenharmony_ci 177093fb6ee3Sopenharmony_ci 177193fb6ee3Sopenharmony_ci 177293fb6ee3Sopenharmony_ci 177393fb6ee3Sopenharmony_ci 177493fb6ee3Sopenharmony_ci 177593fb6ee3Sopenharmony_ci 177693fb6ee3Sopenharmony_ci 177793fb6ee3Sopenharmony_ci 177893fb6ee3Sopenharmony_ci 177993fb6ee3Sopenharmony_ci 178093fb6ee3Sopenharmony_ci 178193fb6ee3Sopenharmony_ci 178293fb6ee3Sopenharmony_ci 178393fb6ee3Sopenharmony_ci <tr><td>tg 178493fb6ee3Sopenharmony_ci <td>Tajik 178593fb6ee3Sopenharmony_ci <td>windows-1251 178693fb6ee3Sopenharmony_ci 178793fb6ee3Sopenharmony_ci <tr><td>th 178893fb6ee3Sopenharmony_ci <td>Thai 178993fb6ee3Sopenharmony_ci <td>windows-874 179093fb6ee3Sopenharmony_ci 179193fb6ee3Sopenharmony_ci 179293fb6ee3Sopenharmony_ci 179393fb6ee3Sopenharmony_ci 179493fb6ee3Sopenharmony_ci 179593fb6ee3Sopenharmony_ci <tr><td>tr 179693fb6ee3Sopenharmony_ci <td>Turkish 179793fb6ee3Sopenharmony_ci <td>windows-1254 179893fb6ee3Sopenharmony_ci 179993fb6ee3Sopenharmony_ci 180093fb6ee3Sopenharmony_ci 180193fb6ee3Sopenharmony_ci <tr><td>tt 180293fb6ee3Sopenharmony_ci <td>Tatar 180393fb6ee3Sopenharmony_ci <td>windows-1251 180493fb6ee3Sopenharmony_ci 180593fb6ee3Sopenharmony_ci 180693fb6ee3Sopenharmony_ci 180793fb6ee3Sopenharmony_ci 180893fb6ee3Sopenharmony_ci 180993fb6ee3Sopenharmony_ci <tr><td>uk 181093fb6ee3Sopenharmony_ci <td>Ukrainian 181193fb6ee3Sopenharmony_ci <td>windows-1251 181293fb6ee3Sopenharmony_ci 181393fb6ee3Sopenharmony_ci 181493fb6ee3Sopenharmony_ci 181593fb6ee3Sopenharmony_ci 181693fb6ee3Sopenharmony_ci 181793fb6ee3Sopenharmony_ci 181893fb6ee3Sopenharmony_ci 181993fb6ee3Sopenharmony_ci <tr><td>vi 182093fb6ee3Sopenharmony_ci <td>Vietnamese 182193fb6ee3Sopenharmony_ci <td>windows-1258 182293fb6ee3Sopenharmony_ci 182393fb6ee3Sopenharmony_ci 182493fb6ee3Sopenharmony_ci 182593fb6ee3Sopenharmony_ci 182693fb6ee3Sopenharmony_ci 182793fb6ee3Sopenharmony_ci 182893fb6ee3Sopenharmony_ci 182993fb6ee3Sopenharmony_ci 183093fb6ee3Sopenharmony_ci 183193fb6ee3Sopenharmony_ci 183293fb6ee3Sopenharmony_ci 183393fb6ee3Sopenharmony_ci <tr><td>zh-CN 183493fb6ee3Sopenharmony_ci <td>Chinese (People's Republic of China) 183593fb6ee3Sopenharmony_ci <td>GB18030 183693fb6ee3Sopenharmony_ci 183793fb6ee3Sopenharmony_ci 183893fb6ee3Sopenharmony_ci 183993fb6ee3Sopenharmony_ci 184093fb6ee3Sopenharmony_ci 184193fb6ee3Sopenharmony_ci 184293fb6ee3Sopenharmony_ci 184393fb6ee3Sopenharmony_ci 184493fb6ee3Sopenharmony_ci 184593fb6ee3Sopenharmony_ci 184693fb6ee3Sopenharmony_ci 184793fb6ee3Sopenharmony_ci <tr><td>zh-TW 184893fb6ee3Sopenharmony_ci <td>Chinese (Taiwan) 184993fb6ee3Sopenharmony_ci <td>Big5 185093fb6ee3Sopenharmony_ci 185193fb6ee3Sopenharmony_ci 185293fb6ee3Sopenharmony_ci 185393fb6ee3Sopenharmony_ci <tr><td colspan=2>All other locales 185493fb6ee3Sopenharmony_ci <td>windows-1252 185593fb6ee3Sopenharmony_ci 185693fb6ee3Sopenharmony_ci </table> 185793fb6ee3Sopenharmony_ci 185893fb6ee3Sopenharmony_ci <p class=tablenote><small>The contents of this table are derived from the intersection of 185993fb6ee3Sopenharmony_ci Windows, Chrome, and Firefox defaults.</small></p> 186093fb6ee3Sopenharmony_ci 186193fb6ee3Sopenharmony_ci </ol> 186293fb6ee3Sopenharmony_ci 186393fb6ee3Sopenharmony_ci <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 186493fb6ee3Sopenharmony_ci from this algorithm, at the same time as the user agent uses the returned value to select the 186593fb6ee3Sopenharmony_ci decoder to use for the input byte stream.</p> 186693fb6ee3Sopenharmony_ci 186793fb6ee3Sopenharmony_ci <hr> 186893fb6ee3Sopenharmony_ci 186993fb6ee3Sopenharmony_ci <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 187093fb6ee3Sopenharmony_ci encoding</dfn>, given some defined <var>end condition</var>, then it must run the 187193fb6ee3Sopenharmony_ci following steps. These steps either abort unsuccessfully or return a character encoding. If at any 187293fb6ee3Sopenharmony_ci 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 187393fb6ee3Sopenharmony_ci one) the user agent either runs out of bytes (meaning the <var>position</var> pointer 187493fb6ee3Sopenharmony_ci created in the first step below goes beyond the end of the byte stream obtained so far) or reaches 187593fb6ee3Sopenharmony_ci 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 187693fb6ee3Sopenharmony_ci encoding</a> algorithm unsuccessfully.</p> 187793fb6ee3Sopenharmony_ci 187893fb6ee3Sopenharmony_ci <ol><li> 187993fb6ee3Sopenharmony_ci 188093fb6ee3Sopenharmony_ci <p>Let <var>position</var> be a pointer to a byte in the input byte stream, initially 188193fb6ee3Sopenharmony_ci pointing at the first byte.</p> 188293fb6ee3Sopenharmony_ci 188393fb6ee3Sopenharmony_ci <li> 188493fb6ee3Sopenharmony_ci 188593fb6ee3Sopenharmony_ci <p><i>Loop</i>: If <var>position</var> points to:</p> 188693fb6ee3Sopenharmony_ci 188793fb6ee3Sopenharmony_ci <dl class=switch><dt>A sequence of bytes starting with: 0x3C 0x21 0x2D 0x2D (ASCII '<!--')<dd> 188893fb6ee3Sopenharmony_ci 188993fb6ee3Sopenharmony_ci <p>Advance the <var>position</var> pointer so that it points at the first 0x3E byte 189093fb6ee3Sopenharmony_ci which is preceded by two 0x2D bytes (i.e. at the end of an ASCII '-->' sequence) and comes 189193fb6ee3Sopenharmony_ci after the 0x3C byte that was found. (The two 0x2D bytes can be the same as the those in the 189293fb6ee3Sopenharmony_ci '<!--' sequence.)</p> 189393fb6ee3Sopenharmony_ci 189493fb6ee3Sopenharmony_ci <dt>A sequence of bytes starting with: 0x3C, 0x4D or 0x6D, 0x45 or 0x65, 0x54 or 0x74, 0x41 or 0x61, and one of 0x09, 0x0A, 0x0C, 0x0D, 0x20, 0x2F (case-insensitive ASCII '<meta' followed by a space or slash)<dd> 189593fb6ee3Sopenharmony_ci 189693fb6ee3Sopenharmony_ci <ol><li><p>Advance the <var>position</var> pointer so that it points at the next 0x09, 189793fb6ee3Sopenharmony_ci 0x0A, 0x0C, 0x0D, 0x20, or 0x2F byte (the one in sequence of characters matched 189893fb6ee3Sopenharmony_ci 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 189993fb6ee3Sopenharmony_ci 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 190093fb6ee3Sopenharmony_ci attribute</a> and its value. If no attribute was sniffed, then jump to the 190193fb6ee3Sopenharmony_ci <i>processing</i> step below.<li><p>If the attribute's name is already in <var>attribute list</var>, then return 190293fb6ee3Sopenharmony_ci to the step labeled <i>attributes</i>.</p> 190393fb6ee3Sopenharmony_ci 190493fb6ee3Sopenharmony_ci <li><p>Add the attribute's name to <var>attribute list</var>.</p> 190593fb6ee3Sopenharmony_ci 190693fb6ee3Sopenharmony_ci <li> 190793fb6ee3Sopenharmony_ci 190893fb6ee3Sopenharmony_ci <p>Run the appropriate step from the following list, if one applies:</p> 190993fb6ee3Sopenharmony_ci 191093fb6ee3Sopenharmony_ci <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 191193fb6ee3Sopenharmony_ci <code>meta</code> element</a>, giving the attribute's value as the string to parse. If a 191293fb6ee3Sopenharmony_ci character encoding is returned, and if <var>charset</var> is still set to null, 191393fb6ee3Sopenharmony_ci let <var>charset</var> be the encoding returned, and set <var>need 191493fb6ee3Sopenharmony_ci 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> 191593fb6ee3Sopenharmony_ci from the attribute's value, and set <var>need pragma</var> to false.</dl> 191693fb6ee3Sopenharmony_ci 191793fb6ee3Sopenharmony_ci <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 191893fb6ee3Sopenharmony_ci below labeled <i>next byte</i>.<li><p>If <var>need pragma</var> is true but <var>got pragma</var> is 191993fb6ee3Sopenharmony_ci 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 192093fb6ee3Sopenharmony_ci <var>charset</var> to UTF-8.<li><p>If <var>charset</var> is the x-user-defined encoding, change the value of 192193fb6ee3Sopenharmony_ci <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 192293fb6ee3Sopenharmony_ci 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, 192393fb6ee3Sopenharmony_ci returning the encoding given by <var>charset</var>.</ol> 192493fb6ee3Sopenharmony_ci 192593fb6ee3Sopenharmony_ci <dt>A sequence of bytes starting with a 0x3C byte (ASCII <), optionally a 0x2F byte (ASCII /), and finally a byte in the range 0x41-0x5A or 0x61-0x7A (an ASCII letter)<dd> 192693fb6ee3Sopenharmony_ci 192793fb6ee3Sopenharmony_ci <ol><li><p>Advance the <var>position</var> pointer so that it points at the next 0x09 192893fb6ee3Sopenharmony_ci (ASCII TAB), 0x0A (ASCII LF), 0x0C (ASCII FF), 0x0D (ASCII CR), 0x20 (ASCII space), or 0x3E 192993fb6ee3Sopenharmony_ci (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> 193093fb6ee3Sopenharmony_ci until no further attributes can be found, then jump to the step below labeled <i>next 193193fb6ee3Sopenharmony_ci byte</i>.</ol> 193293fb6ee3Sopenharmony_ci 193393fb6ee3Sopenharmony_ci <dt>A sequence of bytes starting with: 0x3C 0x21 (ASCII '<!')<dt>A sequence of bytes starting with: 0x3C 0x2F (ASCII '</')<dt>A sequence of bytes starting with: 0x3C 0x3F (ASCII '<?')<dd> 193493fb6ee3Sopenharmony_ci 193593fb6ee3Sopenharmony_ci <p>Advance the <var>position</var> pointer so that it points at the first 0x3E byte 193693fb6ee3Sopenharmony_ci (ASCII >) that comes after the 0x3C byte that was found.</p> 193793fb6ee3Sopenharmony_ci 193893fb6ee3Sopenharmony_ci <dt>Any other byte<dd> 193993fb6ee3Sopenharmony_ci 194093fb6ee3Sopenharmony_ci <p>Do nothing with that byte.</p> 194193fb6ee3Sopenharmony_ci 194293fb6ee3Sopenharmony_ci </dl> 194393fb6ee3Sopenharmony_ci 194493fb6ee3Sopenharmony_ci <li><i>Next byte</i>: Move <var>position</var> so it points at the next byte in the 194593fb6ee3Sopenharmony_ci input byte stream, and return to the step above labeled <i>loop</i>.</ol> 194693fb6ee3Sopenharmony_ci 194793fb6ee3Sopenharmony_ci <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> 194893fb6ee3Sopenharmony_ci 194993fb6ee3Sopenharmony_ci <ol><li><p>If the byte at <var>position</var> is one of 0x09 (ASCII TAB), 0x0A (ASCII LF), 195093fb6ee3Sopenharmony_ci 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 195193fb6ee3Sopenharmony_ci one.<li><p>Otherwise, the byte at <var>position</var> is the start of the attribute name. 195293fb6ee3Sopenharmony_ci Let <var>attribute name</var> and <var>attribute value</var> be the empty 195393fb6ee3Sopenharmony_ci string.<li><p>Process the byte at <var>position</var> as follows:</p> 195493fb6ee3Sopenharmony_ci 195593fb6ee3Sopenharmony_ci <dl class=switch><dt>If it is 0x3D (ASCII =), and the <var>attribute name</var> is longer than the 195693fb6ee3Sopenharmony_ci empty string<dd>Advance <var>position</var> to the next byte and jump to the step below labeled 195793fb6ee3Sopenharmony_ci <i>value</i>.<dt>If it is 0x09 (ASCII TAB), 0x0A (ASCII LF), 0x0C (ASCII FF), 0x0D (ASCII CR), or 0x20 195893fb6ee3Sopenharmony_ci (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> 195993fb6ee3Sopenharmony_ci algorithm. The attribute's name is the value of <var>attribute name</var>, its value 196093fb6ee3Sopenharmony_ci 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> 196193fb6ee3Sopenharmony_ci is the value of the byte at <var>position</var>). (This converts the input to 196293fb6ee3Sopenharmony_ci 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 196393fb6ee3Sopenharmony_ci bytes outside the ASCII range are handled here, since only ASCII characters can contribute to 196493fb6ee3Sopenharmony_ci the detection of a character encoding.)</dl> 196593fb6ee3Sopenharmony_ci 196693fb6ee3Sopenharmony_ci <li><p>Advance <var>position</var> to the next byte and return to the previous 196793fb6ee3Sopenharmony_ci step.<li><p><i>Spaces</i>: If the byte at <var>position</var> is one of 0x09 (ASCII TAB), 196893fb6ee3Sopenharmony_ci 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 196993fb6ee3Sopenharmony_ci <a href=#concept-get-attributes-when-sniffing id=determining-the-character-encoding:concept-get-attributes-when-sniffing-6>get an attribute</a> algorithm. The 197093fb6ee3Sopenharmony_ci attribute's name is the value of <var>attribute name</var>, its value is the empty 197193fb6ee3Sopenharmony_ci 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 197293fb6ee3Sopenharmony_ci (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> 197393fb6ee3Sopenharmony_ci 197493fb6ee3Sopenharmony_ci <dl class=switch><dt>If it is 0x22 (ASCII ") or 0x27 (ASCII ')<dd> 197593fb6ee3Sopenharmony_ci 197693fb6ee3Sopenharmony_ci <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 197793fb6ee3Sopenharmony_ci "get an attribute" algorithm. The attribute's name is the value of <var>attribute 197893fb6ee3Sopenharmony_ci 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 197993fb6ee3Sopenharmony_ci (ASCII A) to 0x5A (ASCII Z), then append a Unicode character to <var>attribute 198093fb6ee3Sopenharmony_ci 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 198193fb6ee3Sopenharmony_ci 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> 198293fb6ee3Sopenharmony_ci 198393fb6ee3Sopenharmony_ci <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> 198493fb6ee3Sopenharmony_ci algorithm. The attribute's name is the value of <var>attribute name</var>, its value 198593fb6ee3Sopenharmony_ci 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> 198693fb6ee3Sopenharmony_ci 198793fb6ee3Sopenharmony_ci <li><p>Process the byte at <var>position</var> as 198893fb6ee3Sopenharmony_ci follows:</p> 198993fb6ee3Sopenharmony_ci 199093fb6ee3Sopenharmony_ci <dl class=switch><dt>If it is 0x09 (ASCII TAB), 0x0A (ASCII LF), 0x0C (ASCII FF), 0x0D (ASCII CR), 0x20 (ASCII 199193fb6ee3Sopenharmony_ci 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> 199293fb6ee3Sopenharmony_ci algorithm. The attribute's name is the value of <var>attribute name</var> and its 199393fb6ee3Sopenharmony_ci 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> 199493fb6ee3Sopenharmony_ci 199593fb6ee3Sopenharmony_ci <li><p>Advance <var>position</var> to the next byte and return to the previous 199693fb6ee3Sopenharmony_ci step.</ol> 199793fb6ee3Sopenharmony_ci 199893fb6ee3Sopenharmony_ci <p>For the sake of interoperability, user agents should not use a pre-scan algorithm that returns 199993fb6ee3Sopenharmony_ci different results than the one described above. (But, if you do, please at least let us know, so 200093fb6ee3Sopenharmony_ci that we can improve this algorithm and benefit everyone...)</p> 200193fb6ee3Sopenharmony_ci 200293fb6ee3Sopenharmony_ci 200393fb6ee3Sopenharmony_ci 200493fb6ee3Sopenharmony_ci 200593fb6ee3Sopenharmony_ci 200693fb6ee3Sopenharmony_ci <h5 id=character-encodings>12.2.2.3 Character encodings</h5> 200793fb6ee3Sopenharmony_ci 200893fb6ee3Sopenharmony_ci <p>User agents must support the encodings defined in the WHATWG Encoding standard. User agents 200993fb6ee3Sopenharmony_ci should not support other encodings.</p> 201093fb6ee3Sopenharmony_ci 201193fb6ee3Sopenharmony_ci <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> 201293fb6ee3Sopenharmony_ci 201393fb6ee3Sopenharmony_ci <p>Support for encodings based on EBCDIC is especially discouraged. This encoding is rarely used 201493fb6ee3Sopenharmony_ci for publicly-facing Web content. Support for UTF-32 is also especially discouraged. This encoding 201593fb6ee3Sopenharmony_ci is rarely used, and frequently implemented incorrectly.</p> 201693fb6ee3Sopenharmony_ci 201793fb6ee3Sopenharmony_ci <p class=note>This specification does not make any attempt to support EBCDIC-based encodings and 201893fb6ee3Sopenharmony_ci UTF-32 in its algorithms; support and use of these encodings can thus lead to unexpected behavior 201993fb6ee3Sopenharmony_ci in implementations of this specification.</p> 202093fb6ee3Sopenharmony_ci 202193fb6ee3Sopenharmony_ci 202293fb6ee3Sopenharmony_ci <h5 id=changing-the-encoding-while-parsing>12.2.2.4 Changing the encoding while parsing</h5> 202393fb6ee3Sopenharmony_ci 202493fb6ee3Sopenharmony_ci <p>When the parser requires the user agent to <dfn id=change-the-encoding>change the encoding</dfn>, it must run the 202593fb6ee3Sopenharmony_ci 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 202693fb6ee3Sopenharmony_ci failed to find a character encoding, or if it found a character encoding that was not the actual 202793fb6ee3Sopenharmony_ci encoding of the file.</p> 202893fb6ee3Sopenharmony_ci 202993fb6ee3Sopenharmony_ci <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 203093fb6ee3Sopenharmony_ci encoding</a>, then set the <a href=#concept-encoding-confidence id=changing-the-encoding-while-parsing:concept-encoding-confidence>confidence</a> to 203193fb6ee3Sopenharmony_ci <i>certain</i> and abort these steps. The new encoding is ignored; if it was anything but the 203293fb6ee3Sopenharmony_ci 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 203393fb6ee3Sopenharmony_ci 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. 203493fb6ee3Sopenharmony_ci 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 203593fb6ee3Sopenharmony_ci sniffing algorithm</a> determined to be the encoding, and in the second pass through the 203693fb6ee3Sopenharmony_ci parser if the first pass found that the encoding sniffing algorithm described in the earlier 203793fb6ee3Sopenharmony_ci 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 203893fb6ee3Sopenharmony_ci Unicode interpretations in both the current encoding and the new encoding, and if the user agent 203993fb6ee3Sopenharmony_ci supports changing the converter on the fly, then the user agent may change to the new converter 204093fb6ee3Sopenharmony_ci 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 204193fb6ee3Sopenharmony_ci 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 204293fb6ee3Sopenharmony_ci steps.<li><p>Otherwise, <a id=changing-the-encoding-while-parsing:navigate href=browsers.html#navigate>navigate</a> to the document again, with 204393fb6ee3Sopenharmony_ci <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 204493fb6ee3Sopenharmony_ci 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 204593fb6ee3Sopenharmony_ci the new encoding and the <a href=#concept-encoding-confidence id=changing-the-encoding-while-parsing:concept-encoding-confidence-4>confidence</a> to 204693fb6ee3Sopenharmony_ci <i>certain</i>. Whenever possible, this should be done without actually contacting the network 204793fb6ee3Sopenharmony_ci layer (the bytes should be re-parsed from memory), even if, e.g., the document is marked as not 204893fb6ee3Sopenharmony_ci being cacheable. If this is not possible and contacting the network layer would involve repeating 204993fb6ee3Sopenharmony_ci 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 205093fb6ee3Sopenharmony_ci 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 205193fb6ee3Sopenharmony_ci encoding. The resource will be misinterpreted. User agents may notify the user of the situation, 205293fb6ee3Sopenharmony_ci to aid in application development.</ol> 205393fb6ee3Sopenharmony_ci 205493fb6ee3Sopenharmony_ci <p class=note>This algorithm is only invoked when a new encoding is found declared on a 205593fb6ee3Sopenharmony_ci <code id=changing-the-encoding-while-parsing:the-meta-element><a href=semantics.html#the-meta-element>meta</a></code> element.</p> 205693fb6ee3Sopenharmony_ci 205793fb6ee3Sopenharmony_ci 205893fb6ee3Sopenharmony_ci <h5 id=preprocessing-the-input-stream>12.2.2.5 Preprocessing the input stream</h5> 205993fb6ee3Sopenharmony_ci 206093fb6ee3Sopenharmony_ci <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 206193fb6ee3Sopenharmony_ci stream</a> is decoded or from the various APIs that directly manipulate the input stream.</p> 206293fb6ee3Sopenharmony_ci 206393fb6ee3Sopenharmony_ci <p>One leading U+FEFF BYTE ORDER MARK character must be ignored if any are present in the 206493fb6ee3Sopenharmony_ci <a href=#input-stream id=preprocessing-the-input-stream:input-stream>input stream</a>.</p> 206593fb6ee3Sopenharmony_ci 206693fb6ee3Sopenharmony_ci <p class=note>The requirement to strip a U+FEFF BYTE ORDER MARK character regardless of whether 206793fb6ee3Sopenharmony_ci 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 206893fb6ee3Sopenharmony_ci Unicode, motivated by a desire to increase the resilience of user agents in the face of naïve 206993fb6ee3Sopenharmony_ci transcoders.</p> 207093fb6ee3Sopenharmony_ci 207193fb6ee3Sopenharmony_ci <p>Any occurrences of any characters in the ranges U+0001 to U+0008, U+000E to U+001F, 207293fb6ee3Sopenharmony_ci U+007F to U+009F, U+FDD0 to U+FDEF, and 207393fb6ee3Sopenharmony_ci characters U+000B, U+FFFE, U+FFFF, U+1FFFE, U+1FFFF, U+2FFFE, U+2FFFF, U+3FFFE, U+3FFFF, U+4FFFE, 207493fb6ee3Sopenharmony_ci U+4FFFF, U+5FFFE, U+5FFFF, U+6FFFE, U+6FFFF, U+7FFFE, U+7FFFF, U+8FFFE, U+8FFFF, U+9FFFE, U+9FFFF, 207593fb6ee3Sopenharmony_ci U+AFFFE, U+AFFFF, U+BFFFE, U+BFFFF, U+CFFFE, U+CFFFF, U+DFFFE, U+DFFFF, U+EFFFE, U+EFFFF, U+FFFFE, 207693fb6ee3Sopenharmony_ci 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 207793fb6ee3Sopenharmony_ci <a id=preprocessing-the-input-stream:control-characters href=infrastructure.html#control-characters>control characters</a> or permanently undefined Unicode characters (noncharacters).</p> 207893fb6ee3Sopenharmony_ci 207993fb6ee3Sopenharmony_ci <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 208093fb6ee3Sopenharmony_ci 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 208193fb6ee3Sopenharmony_ci 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> 208293fb6ee3Sopenharmony_ci 208393fb6ee3Sopenharmony_ci <p>U+000D CARRIAGE RETURN (CR) characters and U+000A LINE FEED (LF) characters are treated 208493fb6ee3Sopenharmony_ci specially. All CR characters must be converted to LF characters, and any LF characters that 208593fb6ee3Sopenharmony_ci immediately follow a CR character must be ignored. Thus, newlines in HTML DOMs are represented by 208693fb6ee3Sopenharmony_ci 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> 208793fb6ee3Sopenharmony_ci stage.</p> 208893fb6ee3Sopenharmony_ci 208993fb6ee3Sopenharmony_ci <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> 209093fb6ee3Sopenharmony_ci that has not yet been <dfn>consumed</dfn> or explicitly ignored by the requirements in 209193fb6ee3Sopenharmony_ci 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 209293fb6ee3Sopenharmony_ci first character in the input. The <dfn id=current-input-character>current input character</dfn> is the last character to have 209393fb6ee3Sopenharmony_ci been <i>consumed</i>.</p> 209493fb6ee3Sopenharmony_ci 209593fb6ee3Sopenharmony_ci <p>The <dfn id=insertion-point>insertion point</dfn> is the position (just before a character or just before the end 209693fb6ee3Sopenharmony_ci 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 209793fb6ee3Sopenharmony_ci relative to the position of the character immediately after it, it is not an absolute offset into 209893fb6ee3Sopenharmony_ci the input stream. Initially, the insertion point is undefined.</p> 209993fb6ee3Sopenharmony_ci 210093fb6ee3Sopenharmony_ci <p>The "EOF" character in the tables below is a conceptual character representing the end of the 210193fb6ee3Sopenharmony_ci <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 210293fb6ee3Sopenharmony_ci 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 210393fb6ee3Sopenharmony_ci 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 210493fb6ee3Sopenharmony_ci "EOF" character is not a real character in the stream, but rather the lack of any further 210593fb6ee3Sopenharmony_ci characters.</p> 210693fb6ee3Sopenharmony_ci 210793fb6ee3Sopenharmony_ci <p class=note>The handling of U+0000 NULL characters varies based on where the characters are 210893fb6ee3Sopenharmony_ci found. In general, they are ignored except where doing so could plausibly introduce an attack 210993fb6ee3Sopenharmony_ci vector. This handling is, by necessity, spread across both the tokenization stage and the tree 211093fb6ee3Sopenharmony_ci construction stage.</p> 211193fb6ee3Sopenharmony_ci 211293fb6ee3Sopenharmony_ci 211393fb6ee3Sopenharmony_ci 211493fb6ee3Sopenharmony_ci 211593fb6ee3Sopenharmony_ci 211693fb6ee3Sopenharmony_ci 211793fb6ee3Sopenharmony_ci <h4 id=parse-state>12.2.3 Parse state</h4> 211893fb6ee3Sopenharmony_ci 211993fb6ee3Sopenharmony_ci <h5 id=the-insertion-mode>12.2.3.1 The insertion mode</h5> 212093fb6ee3Sopenharmony_ci 212193fb6ee3Sopenharmony_ci <p>The <dfn id=insertion-mode>insertion mode</dfn> is a state variable that controls the primary operation of the 212293fb6ee3Sopenharmony_ci tree construction stage.</p> 212393fb6ee3Sopenharmony_ci 212493fb6ee3Sopenharmony_ci <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 212593fb6ee3Sopenharmony_ci 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>", 212693fb6ee3Sopenharmony_ci "<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 212793fb6ee3Sopenharmony_ci 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 212893fb6ee3Sopenharmony_ci 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>", 212993fb6ee3Sopenharmony_ci "<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 213093fb6ee3Sopenharmony_ci after body</a>", and "<a href=#the-after-after-frameset-insertion-mode id=the-insertion-mode:the-after-after-frameset-insertion-mode>after after 213193fb6ee3Sopenharmony_ci frameset</a>" during the course of the parsing, as described in the <a href=#tree-construction id=the-insertion-mode:tree-construction>tree 213293fb6ee3Sopenharmony_ci construction</a> stage. The insertion mode affects how tokens are processed and whether CDATA 213393fb6ee3Sopenharmony_ci sections are supported.</p> 213493fb6ee3Sopenharmony_ci 213593fb6ee3Sopenharmony_ci <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 213693fb6ee3Sopenharmony_ci table</a>", and "<a href=#parsing-main-inselect id=the-insertion-mode:parsing-main-inselect-2>in select</a>", are special, in 213793fb6ee3Sopenharmony_ci that the other modes defer to them at various times. When the algorithm below says that the user 213893fb6ee3Sopenharmony_ci agent is to do something "<dfn id=using-the-rules-for>using the rules for</dfn> the <var>m</var> insertion 213993fb6ee3Sopenharmony_ci mode", where <var>m</var> is one of these modes, the user agent must use the rules 214093fb6ee3Sopenharmony_ci 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 214193fb6ee3Sopenharmony_ci the <a href=#insertion-mode id=the-insertion-mode:insertion-mode-3>insertion mode</a> unchanged unless the rules in <var>m</var> themselves 214293fb6ee3Sopenharmony_ci switch the <a href=#insertion-mode id=the-insertion-mode:insertion-mode-4>insertion mode</a> to a new value.</p> 214393fb6ee3Sopenharmony_ci 214493fb6ee3Sopenharmony_ci <p>When the insertion mode is switched to "<a href=#parsing-main-incdata id=the-insertion-mode:parsing-main-incdata-2>text</a>" or 214593fb6ee3Sopenharmony_ci "<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 214693fb6ee3Sopenharmony_ci mode</dfn> is also set. This is the insertion mode to which the tree construction stage will 214793fb6ee3Sopenharmony_ci return.</p> 214893fb6ee3Sopenharmony_ci 214993fb6ee3Sopenharmony_ci <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 215093fb6ee3Sopenharmony_ci modes</dfn> is used. It is initially empty. The <dfn id=current-template-insertion-mode>current template insertion mode</dfn> is the 215193fb6ee3Sopenharmony_ci 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>. 215293fb6ee3Sopenharmony_ci The algorithms in the sections below will <i>push</i> insertion modes onto this stack, meaning 215393fb6ee3Sopenharmony_ci that the specified insertion mode is to be added to the stack, and <i>pop</i> insertion modes from 215493fb6ee3Sopenharmony_ci the stack, which means that the most recently added insertion mode must be removed from the 215593fb6ee3Sopenharmony_ci stack.</p> 215693fb6ee3Sopenharmony_ci 215793fb6ee3Sopenharmony_ci <hr> 215893fb6ee3Sopenharmony_ci 215993fb6ee3Sopenharmony_ci <p>When the steps below require the UA to <dfn id=reset-the-insertion-mode-appropriately>reset the insertion mode appropriately</dfn>, it 216093fb6ee3Sopenharmony_ci means the UA must follow these steps:</p> 216193fb6ee3Sopenharmony_ci 216293fb6ee3Sopenharmony_ci <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 216393fb6ee3Sopenharmony_ci elements</a>.<li><p><i>Loop</i>: If <var>node</var> is the first node in the stack of open elements, 216493fb6ee3Sopenharmony_ci then set <var>last</var> to true, and, if the parser was originally created as part of 216593fb6ee3Sopenharmony_ci 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> 216693fb6ee3Sopenharmony_ci element.<li> 216793fb6ee3Sopenharmony_ci 216893fb6ee3Sopenharmony_ci <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> 216993fb6ee3Sopenharmony_ci 217093fb6ee3Sopenharmony_ci <ol><li><p>If <var>last</var> is true, jump to the step below labeled 217193fb6ee3Sopenharmony_ci <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 217293fb6ee3Sopenharmony_ci 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 217393fb6ee3Sopenharmony_ci <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 217493fb6ee3Sopenharmony_ci 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 217593fb6ee3Sopenharmony_ci mode</a> to "<a href=#parsing-main-inselectintable id=the-insertion-mode:parsing-main-inselectintable-2>in select in table</a>" and 217693fb6ee3Sopenharmony_ci 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> 217793fb6ee3Sopenharmony_ci 217893fb6ee3Sopenharmony_ci <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 217993fb6ee3Sopenharmony_ci mode</a> to "<a href=#parsing-main-intr id=the-insertion-mode:parsing-main-intr-2>in row</a>" and abort these 218093fb6ee3Sopenharmony_ci 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 218193fb6ee3Sopenharmony_ci <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 218293fb6ee3Sopenharmony_ci <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 218393fb6ee3Sopenharmony_ci 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 218493fb6ee3Sopenharmony_ci <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 218593fb6ee3Sopenharmony_ci 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 218693fb6ee3Sopenharmony_ci <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 218793fb6ee3Sopenharmony_ci 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 218893fb6ee3Sopenharmony_ci <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 218993fb6ee3Sopenharmony_ci 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 219093fb6ee3Sopenharmony_ci 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 219193fb6ee3Sopenharmony_ci 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 219293fb6ee3Sopenharmony_ci <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 219393fb6ee3Sopenharmony_ci 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 219493fb6ee3Sopenharmony_ci <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 219593fb6ee3Sopenharmony_ci abort these steps. (<a href=#fragment-case id=the-insertion-mode:fragment-case-2>fragment case</a>)<li> 219693fb6ee3Sopenharmony_ci 219793fb6ee3Sopenharmony_ci <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> 219893fb6ee3Sopenharmony_ci 219993fb6ee3Sopenharmony_ci <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 220093fb6ee3Sopenharmony_ci <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>" 220193fb6ee3Sopenharmony_ci 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 220293fb6ee3Sopenharmony_ci <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 220393fb6ee3Sopenharmony_ci abort these steps.</ol> 220493fb6ee3Sopenharmony_ci 220593fb6ee3Sopenharmony_ci <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 220693fb6ee3Sopenharmony_ci case</a>)<li><p>Let <var>node</var> now be the node before <var>node</var> in the 220793fb6ee3Sopenharmony_ci <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> 220893fb6ee3Sopenharmony_ci 220993fb6ee3Sopenharmony_ci 221093fb6ee3Sopenharmony_ci <h5 id=the-stack-of-open-elements>12.2.3.2 The stack of open elements</h5> 221193fb6ee3Sopenharmony_ci 221293fb6ee3Sopenharmony_ci <p>Initially, the <dfn id=stack-of-open-elements>stack of open elements</dfn> is empty. The stack grows downwards; the 221393fb6ee3Sopenharmony_ci topmost node on the stack is the first one added to the stack, and the bottommost node of the 221493fb6ee3Sopenharmony_ci stack is the most recently added node in the stack (notwithstanding when the stack is manipulated 221593fb6ee3Sopenharmony_ci in a random access fashion as part of <a href=#adoptionAgency>the handling for misnested 221693fb6ee3Sopenharmony_ci tags</a>).</p> 221793fb6ee3Sopenharmony_ci 221893fb6ee3Sopenharmony_ci <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 221993fb6ee3Sopenharmony_ci 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> 222093fb6ee3Sopenharmony_ci 222193fb6ee3Sopenharmony_ci <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 222293fb6ee3Sopenharmony_ci 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 222393fb6ee3Sopenharmony_ci "<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> 222493fb6ee3Sopenharmony_ci 222593fb6ee3Sopenharmony_ci <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 222693fb6ee3Sopenharmony_ci gets popped off the stack when the parser <a href=#stop-parsing id=the-stack-of-open-elements:stop-parsing>finishes</a>.</p> 222793fb6ee3Sopenharmony_ci 222893fb6ee3Sopenharmony_ci <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 222993fb6ee3Sopenharmony_ci elements</a>.</p> 223093fb6ee3Sopenharmony_ci 223193fb6ee3Sopenharmony_ci <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> 223293fb6ee3Sopenharmony_ci 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 223393fb6ee3Sopenharmony_ci 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 223493fb6ee3Sopenharmony_ci node</a> is the <a href=#current-node id=the-stack-of-open-elements:current-node>current node</a>.</p> 223593fb6ee3Sopenharmony_ci 223693fb6ee3Sopenharmony_ci <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> 223793fb6ee3Sopenharmony_ci 223893fb6ee3Sopenharmony_ci <dl><dt><dfn id=special>Special</dfn><dd><p>The following elements have varying levels of special parsing rules: HTML's 223993fb6ee3Sopenharmony_ci <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>, 224093fb6ee3Sopenharmony_ci <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>, 224193fb6ee3Sopenharmony_ci <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>, 224293fb6ee3Sopenharmony_ci <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>, 224393fb6ee3Sopenharmony_ci <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>, 224493fb6ee3Sopenharmony_ci <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>, 224593fb6ee3Sopenharmony_ci <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>, 224693fb6ee3Sopenharmony_ci <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>, 224793fb6ee3Sopenharmony_ci <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>, 224893fb6ee3Sopenharmony_ci <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>, 224993fb6ee3Sopenharmony_ci <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>, 225093fb6ee3Sopenharmony_ci <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>, 225193fb6ee3Sopenharmony_ci <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>, 225293fb6ee3Sopenharmony_ci <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>, 225393fb6ee3Sopenharmony_ci <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>, 225493fb6ee3Sopenharmony_ci <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>, 225593fb6ee3Sopenharmony_ci <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>, 225693fb6ee3Sopenharmony_ci <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>, 225793fb6ee3Sopenharmony_ci <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>, 225893fb6ee3Sopenharmony_ci <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>, 225993fb6ee3Sopenharmony_ci <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 226093fb6ee3Sopenharmony_ci 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>, 226193fb6ee3Sopenharmony_ci <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>, 226293fb6ee3Sopenharmony_ci <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 226393fb6ee3Sopenharmony_ci <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> 226493fb6ee3Sopenharmony_ci 226593fb6ee3Sopenharmony_ci <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 226693fb6ee3Sopenharmony_ci list of element types <var>list</var> when the following algorithm terminates in a match 226793fb6ee3Sopenharmony_ci state:</p> 226893fb6ee3Sopenharmony_ci 226993fb6ee3Sopenharmony_ci <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 227093fb6ee3Sopenharmony_ci 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 227193fb6ee3Sopenharmony_ci elements</a> and return to step 2. (This will never fail, since the loop will always terminate 227293fb6ee3Sopenharmony_ci 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 227393fb6ee3Sopenharmony_ci reached.)</ol> 227493fb6ee3Sopenharmony_ci 227593fb6ee3Sopenharmony_ci <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 227693fb6ee3Sopenharmony_ci 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 227793fb6ee3Sopenharmony_ci that element in the specific scope</a> consisting of the following element types:</p> 227893fb6ee3Sopenharmony_ci 227993fb6ee3Sopenharmony_ci <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> 228093fb6ee3Sopenharmony_ci 228193fb6ee3Sopenharmony_ci <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 228293fb6ee3Sopenharmony_ci element types:</p> 228393fb6ee3Sopenharmony_ci 228493fb6ee3Sopenharmony_ci <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> 228593fb6ee3Sopenharmony_ci 228693fb6ee3Sopenharmony_ci <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 228793fb6ee3Sopenharmony_ci types:</p> 228893fb6ee3Sopenharmony_ci 228993fb6ee3Sopenharmony_ci <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> 229093fb6ee3Sopenharmony_ci 229193fb6ee3Sopenharmony_ci <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 229293fb6ee3Sopenharmony_ci types:</p> 229393fb6ee3Sopenharmony_ci 229493fb6ee3Sopenharmony_ci <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> 229593fb6ee3Sopenharmony_ci 229693fb6ee3Sopenharmony_ci <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 229793fb6ee3Sopenharmony_ci <em>except</em> the following:</p> 229893fb6ee3Sopenharmony_ci 229993fb6ee3Sopenharmony_ci <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> 230093fb6ee3Sopenharmony_ci 230193fb6ee3Sopenharmony_ci <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> 230293fb6ee3Sopenharmony_ci 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, 230393fb6ee3Sopenharmony_ci the stack is not changed in this situation. This can cause, amongst other strange effects, content 230493fb6ee3Sopenharmony_ci to be appended to nodes that are no longer in the DOM.</p> 230593fb6ee3Sopenharmony_ci 230693fb6ee3Sopenharmony_ci <p class=note>In some cases (namely, when <a href=#adoptionAgency>closing misnested formatting 230793fb6ee3Sopenharmony_ci elements</a>), the stack is manipulated in a random-access fashion.</p> 230893fb6ee3Sopenharmony_ci 230993fb6ee3Sopenharmony_ci 231093fb6ee3Sopenharmony_ci <h5 id=the-list-of-active-formatting-elements>12.2.3.3 The list of active formatting elements</h5> 231193fb6ee3Sopenharmony_ci 231293fb6ee3Sopenharmony_ci <p>Initially, the <dfn id=list-of-active-formatting-elements>list of active formatting elements</dfn> is empty. It is used to handle 231393fb6ee3Sopenharmony_ci mis-nested <a href=#formatting id=the-list-of-active-formatting-elements:formatting>formatting element tags</a>.</p> 231493fb6ee3Sopenharmony_ci 231593fb6ee3Sopenharmony_ci <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> 231693fb6ee3Sopenharmony_ci 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 231793fb6ee3Sopenharmony_ci 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, 231893fb6ee3Sopenharmony_ci <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> 231993fb6ee3Sopenharmony_ci 232093fb6ee3Sopenharmony_ci <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 232193fb6ee3Sopenharmony_ci with the token for which it was created, so that further elements can be created for that token if 232293fb6ee3Sopenharmony_ci necessary.</p> 232393fb6ee3Sopenharmony_ci 232493fb6ee3Sopenharmony_ci <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 232593fb6ee3Sopenharmony_ci elements</dfn> an element <var>element</var>, the UA must perform the following 232693fb6ee3Sopenharmony_ci steps:</p> 232793fb6ee3Sopenharmony_ci 232893fb6ee3Sopenharmony_ci <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> 232993fb6ee3Sopenharmony_ci 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 233093fb6ee3Sopenharmony_ci 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 233193fb6ee3Sopenharmony_ci name, namespace, and attributes as <var>element</var>, then remove the earliest such 233293fb6ee3Sopenharmony_ci 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 233393fb6ee3Sopenharmony_ci attributes must be compared as they were when the elements were created by the parser; two 233493fb6ee3Sopenharmony_ci elements have the same attributes if all their parsed attributes can be paired such that the two 233593fb6ee3Sopenharmony_ci attributes in each pair have identical names, namespaces, and values (the order of the attributes 233693fb6ee3Sopenharmony_ci does not matter).</p> 233793fb6ee3Sopenharmony_ci 233893fb6ee3Sopenharmony_ci <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 233993fb6ee3Sopenharmony_ci elements</a>.</ol> 234093fb6ee3Sopenharmony_ci 234193fb6ee3Sopenharmony_ci <p>When the steps below require the UA to <dfn id=reconstruct-the-active-formatting-elements>reconstruct the active formatting elements</dfn>, 234293fb6ee3Sopenharmony_ci the UA must perform the following steps:</p> 234393fb6ee3Sopenharmony_ci 234493fb6ee3Sopenharmony_ci <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 234593fb6ee3Sopenharmony_ci 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 234693fb6ee3Sopenharmony_ci 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 234793fb6ee3Sopenharmony_ci 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 234893fb6ee3Sopenharmony_ci 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 234993fb6ee3Sopenharmony_ci 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 235093fb6ee3Sopenharmony_ci 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 235193fb6ee3Sopenharmony_ci 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 235293fb6ee3Sopenharmony_ci 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 235393fb6ee3Sopenharmony_ci <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 235493fb6ee3Sopenharmony_ci elements</a> is not the last entry in the list, return to the step labeled 235593fb6ee3Sopenharmony_ci <i>advance</i>.</ol> 235693fb6ee3Sopenharmony_ci 235793fb6ee3Sopenharmony_ci <p>This has the effect of reopening all the formatting elements that were opened in the current 235893fb6ee3Sopenharmony_ci body, cell, or caption (whichever is youngest) that haven't been explicitly closed.</p> 235993fb6ee3Sopenharmony_ci 236093fb6ee3Sopenharmony_ci <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 236193fb6ee3Sopenharmony_ci elements</a> always consists of elements in chronological order with the least recently added 236293fb6ee3Sopenharmony_ci element first and the most recently added element last (except for while steps 8 to 11 of the 236393fb6ee3Sopenharmony_ci above algorithm are being executed, of course).</p> 236493fb6ee3Sopenharmony_ci 236593fb6ee3Sopenharmony_ci <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 236693fb6ee3Sopenharmony_ci the last marker</dfn>, the UA must perform the following steps:</p> 236793fb6ee3Sopenharmony_ci 236893fb6ee3Sopenharmony_ci <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 236993fb6ee3Sopenharmony_ci 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 237093fb6ee3Sopenharmony_ci 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>, 237193fb6ee3Sopenharmony_ci 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> 237293fb6ee3Sopenharmony_ci 237393fb6ee3Sopenharmony_ci 237493fb6ee3Sopenharmony_ci <h5 id=the-element-pointers>12.2.3.4 The element pointers</h5> 237593fb6ee3Sopenharmony_ci 237693fb6ee3Sopenharmony_ci <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> 237793fb6ee3Sopenharmony_ci 237893fb6ee3Sopenharmony_ci <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 237993fb6ee3Sopenharmony_ci <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> 238093fb6ee3Sopenharmony_ci 238193fb6ee3Sopenharmony_ci <p>The <a href=#form-element-pointer id=the-element-pointers:form-element-pointer><code>form</code> element pointer</a> points to the last 238293fb6ee3Sopenharmony_ci <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 238393fb6ee3Sopenharmony_ci make form controls associate with forms in the face of dramatically bad markup, for historical 238493fb6ee3Sopenharmony_ci 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> 238593fb6ee3Sopenharmony_ci 238693fb6ee3Sopenharmony_ci 238793fb6ee3Sopenharmony_ci <h5 id=other-parsing-state-flags>12.2.3.5 Other parsing state flags</h5> 238893fb6ee3Sopenharmony_ci 238993fb6ee3Sopenharmony_ci <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 239093fb6ee3Sopenharmony_ci 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 239193fb6ee3Sopenharmony_ci parser was created, and "disabled" otherwise.</p> 239293fb6ee3Sopenharmony_ci 239393fb6ee3Sopenharmony_ci <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 239493fb6ee3Sopenharmony_ci 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> 239593fb6ee3Sopenharmony_ci elements don't execute in that case.</p> 239693fb6ee3Sopenharmony_ci 239793fb6ee3Sopenharmony_ci <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 239893fb6ee3Sopenharmony_ci ok" after certain tokens are seen.</p> 239993fb6ee3Sopenharmony_ci 240093fb6ee3Sopenharmony_ci 240193fb6ee3Sopenharmony_ci 240293fb6ee3Sopenharmony_ci 240393fb6ee3Sopenharmony_ci 240493fb6ee3Sopenharmony_ci 240593fb6ee3Sopenharmony_ci <h4 id=tokenization>12.2.4 <dfn>Tokenization</dfn></h4> 240693fb6ee3Sopenharmony_ci 240793fb6ee3Sopenharmony_ci <p>Implementations must act as if they used the following state machine to tokenise HTML. The 240893fb6ee3Sopenharmony_ci state machine must start in the <a href=#data-state id=tokenization:data-state>data state</a>. Most states consume a single character, 240993fb6ee3Sopenharmony_ci which may have various side-effects, and either switches the state machine to a new state to 241093fb6ee3Sopenharmony_ci <i>reconsume</i> the same character, or switches it to a new state to consume the next character, 241193fb6ee3Sopenharmony_ci or stays in the same state to consume the next character. Some states have more complicated 241293fb6ee3Sopenharmony_ci behavior and can consume several characters before switching to another state. In some cases, the 241393fb6ee3Sopenharmony_ci tokenizer state is also changed by the tree construction stage.</p> 241493fb6ee3Sopenharmony_ci 241593fb6ee3Sopenharmony_ci <p>The exact behavior of certain states depends on the <a href=#insertion-mode id=tokenization:insertion-mode>insertion mode</a> and the 241693fb6ee3Sopenharmony_ci <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> 241793fb6ee3Sopenharmony_ci 241893fb6ee3Sopenharmony_ci <p>The output of the tokenization step is a series of zero or more of the following tokens: 241993fb6ee3Sopenharmony_ci DOCTYPE, start tag, end tag, comment, character, end-of-file. DOCTYPE tokens have a name, a public 242093fb6ee3Sopenharmony_ci identifier, a system identifier, and a <dfn id=force-quirks-flag><i>force-quirks flag</i></dfn>. When a DOCTYPE token 242193fb6ee3Sopenharmony_ci is created, its name, public identifier, and system identifier must be marked as missing (which is 242293fb6ee3Sopenharmony_ci 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 242393fb6ee3Sopenharmony_ci <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 242493fb6ee3Sopenharmony_ci 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 242593fb6ee3Sopenharmony_ci list must be empty. Comment and character tokens have data.</p> 242693fb6ee3Sopenharmony_ci 242793fb6ee3Sopenharmony_ci <p>When a token is emitted, it must immediately be handled by the <a href=#tree-construction id=tokenization:tree-construction>tree construction</a> 242893fb6ee3Sopenharmony_ci stage. The tree construction stage can affect the state of the tokenization stage, and can insert 242993fb6ee3Sopenharmony_ci 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 243093fb6ee3Sopenharmony_ci 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 243193fb6ee3Sopenharmony_ci into the stream being tokenized.)</p> 243293fb6ee3Sopenharmony_ci 243393fb6ee3Sopenharmony_ci <p class=note>Creating a token and emitting it are distinct actions. It is possible for a token 243493fb6ee3Sopenharmony_ci to be created but implicitly abandoned (never emitted), e.g. if the file ends unexpectedly while 243593fb6ee3Sopenharmony_ci processing the characters that are being parsed into a start tag token.</p> 243693fb6ee3Sopenharmony_ci 243793fb6ee3Sopenharmony_ci <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 243893fb6ee3Sopenharmony_ci <dfn id=acknowledge-self-closing-flag>acknowledged</dfn> when it is processed by the tree 243993fb6ee3Sopenharmony_ci construction stage, that is a <a href=#parse-error id=tokenization:parse-error>parse error</a>.</p> 244093fb6ee3Sopenharmony_ci 244193fb6ee3Sopenharmony_ci <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> 244293fb6ee3Sopenharmony_ci 244393fb6ee3Sopenharmony_ci <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 244493fb6ee3Sopenharmony_ci error</a>.</p> 244593fb6ee3Sopenharmony_ci 244693fb6ee3Sopenharmony_ci <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 244793fb6ee3Sopenharmony_ci of the last start tag to have been emitted from this tokenizer, if any. If no start tag has been 244893fb6ee3Sopenharmony_ci emitted from this tokenizer, then no end tag token is appropriate.</p> 244993fb6ee3Sopenharmony_ci 245093fb6ee3Sopenharmony_ci <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 245193fb6ee3Sopenharmony_ci flag</a>. If it is true, then the tokenizer must abort the processing of any nested invocations 245293fb6ee3Sopenharmony_ci of the tokenizer, yielding control back to the caller.</p> 245393fb6ee3Sopenharmony_ci 245493fb6ee3Sopenharmony_ci <p>The tokenizer state machine consists of the states defined in the following subsections.</p> 245593fb6ee3Sopenharmony_ci 245693fb6ee3Sopenharmony_ci 245793fb6ee3Sopenharmony_ci 245893fb6ee3Sopenharmony_ci 245993fb6ee3Sopenharmony_ci 246093fb6ee3Sopenharmony_ci <h5 id=data-state>12.2.4.1 <dfn>Data state</dfn></h5> 246193fb6ee3Sopenharmony_ci 246293fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=data-state:next-input-character>next input character</a>:</p> 246393fb6ee3Sopenharmony_ci 246493fb6ee3Sopenharmony_ci <dl class=switch><dt>U+0026 AMPERSAND (&)<dd>Switch to the <a href=#character-reference-in-data-state id=data-state:character-reference-in-data-state>character reference in data state</a>.<dt>U+003C LESS-THAN SIGN (<)<dd>Switch to the <a href=#tag-open-state id=data-state:tag-open-state>tag open state</a>.<dt>U+0000 NULL<dd><a href=#parse-error id=data-state:parse-error>Parse error</a>. Emit the <a href=#current-input-character id=data-state:current-input-character>current input character</a> as a character 246593fb6ee3Sopenharmony_ci 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> 246693fb6ee3Sopenharmony_ci 246793fb6ee3Sopenharmony_ci 246893fb6ee3Sopenharmony_ci <h5 id=character-reference-in-data-state>12.2.4.2 <dfn>Character reference in data state</dfn></h5> 246993fb6ee3Sopenharmony_ci 247093fb6ee3Sopenharmony_ci <p>Switch to the <a href=#data-state id=character-reference-in-data-state:data-state>data state</a>.</p> 247193fb6ee3Sopenharmony_ci 247293fb6ee3Sopenharmony_ci <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 247393fb6ee3Sopenharmony_ci character</a>.</p> 247493fb6ee3Sopenharmony_ci 247593fb6ee3Sopenharmony_ci <p>If nothing is returned, emit a U+0026 AMPERSAND character (&) token.</p> 247693fb6ee3Sopenharmony_ci 247793fb6ee3Sopenharmony_ci <p>Otherwise, emit the character tokens that were returned.</p> 247893fb6ee3Sopenharmony_ci 247993fb6ee3Sopenharmony_ci 248093fb6ee3Sopenharmony_ci <h5 id=rcdata-state>12.2.4.3 <dfn>RCDATA state</dfn></h5> 248193fb6ee3Sopenharmony_ci 248293fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=rcdata-state:next-input-character>next input character</a>:</p> 248393fb6ee3Sopenharmony_ci 248493fb6ee3Sopenharmony_ci <dl class=switch><dt>U+0026 AMPERSAND (&)<dd>Switch to the <a href=#character-reference-in-rcdata-state id=rcdata-state:character-reference-in-rcdata-state>character reference in RCDATA state</a>.<dt>U+003C LESS-THAN SIGN (<)<dd>Switch to the <a href=#rcdata-less-than-sign-state id=rcdata-state:rcdata-less-than-sign-state>RCDATA less-than sign state</a>.<dt>U+0000 NULL<dd><a href=#parse-error id=rcdata-state:parse-error>Parse error</a>. Emit a U+FFFD REPLACEMENT CHARACTER character token.<dt>EOF<dd>Emit an end-of-file token.<dt>Anything else<dd>Emit the <a href=#current-input-character id=rcdata-state:current-input-character>current input character</a> as a character token.</dl> 248593fb6ee3Sopenharmony_ci 248693fb6ee3Sopenharmony_ci 248793fb6ee3Sopenharmony_ci <h5 id=character-reference-in-rcdata-state>12.2.4.4 <dfn>Character reference in RCDATA state</dfn></h5> 248893fb6ee3Sopenharmony_ci 248993fb6ee3Sopenharmony_ci <p>Switch to the <a href=#rcdata-state id=character-reference-in-rcdata-state:rcdata-state>RCDATA state</a>.</p> 249093fb6ee3Sopenharmony_ci 249193fb6ee3Sopenharmony_ci <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 249293fb6ee3Sopenharmony_ci character</a>.</p> 249393fb6ee3Sopenharmony_ci 249493fb6ee3Sopenharmony_ci <p>If nothing is returned, emit a U+0026 AMPERSAND character (&) token.</p> 249593fb6ee3Sopenharmony_ci 249693fb6ee3Sopenharmony_ci <p>Otherwise, emit the character tokens that were returned.</p> 249793fb6ee3Sopenharmony_ci 249893fb6ee3Sopenharmony_ci 249993fb6ee3Sopenharmony_ci <h5 id=rawtext-state>12.2.4.5 <dfn>RAWTEXT state</dfn></h5> 250093fb6ee3Sopenharmony_ci 250193fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=rawtext-state:next-input-character>next input character</a>:</p> 250293fb6ee3Sopenharmony_ci 250393fb6ee3Sopenharmony_ci <dl class=switch><dt>U+003C LESS-THAN SIGN (<)<dd>Switch to the <a href=#rawtext-less-than-sign-state id=rawtext-state:rawtext-less-than-sign-state>RAWTEXT less-than sign state</a>.<dt>U+0000 NULL<dd><a href=#parse-error id=rawtext-state:parse-error>Parse error</a>. Emit a U+FFFD REPLACEMENT CHARACTER character token.<dt>EOF<dd>Emit an end-of-file token.<dt>Anything else<dd>Emit the <a href=#current-input-character id=rawtext-state:current-input-character>current input character</a> as a character token.</dl> 250493fb6ee3Sopenharmony_ci 250593fb6ee3Sopenharmony_ci 250693fb6ee3Sopenharmony_ci <h5 id=script-data-state>12.2.4.6 <dfn>Script data state</dfn></h5> 250793fb6ee3Sopenharmony_ci 250893fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=script-data-state:next-input-character>next input character</a>:</p> 250993fb6ee3Sopenharmony_ci 251093fb6ee3Sopenharmony_ci <dl class=switch><dt>U+003C LESS-THAN SIGN (<)<dd>Switch to the <a href=#script-data-less-than-sign-state id=script-data-state:script-data-less-than-sign-state>script data less-than sign state</a>.<dt>U+0000 NULL<dd><a href=#parse-error id=script-data-state:parse-error>Parse error</a>. Emit a U+FFFD REPLACEMENT CHARACTER character token.<dt>EOF<dd>Emit an end-of-file token.<dt>Anything else<dd>Emit the <a href=#current-input-character id=script-data-state:current-input-character>current input character</a> as a character token.</dl> 251193fb6ee3Sopenharmony_ci 251293fb6ee3Sopenharmony_ci 251393fb6ee3Sopenharmony_ci <h5 id=plaintext-state>12.2.4.7 <dfn>PLAINTEXT state</dfn></h5> 251493fb6ee3Sopenharmony_ci 251593fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=plaintext-state:next-input-character>next input character</a>:</p> 251693fb6ee3Sopenharmony_ci 251793fb6ee3Sopenharmony_ci <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> 251893fb6ee3Sopenharmony_ci 251993fb6ee3Sopenharmony_ci 252093fb6ee3Sopenharmony_ci <h5 id=tag-open-state>12.2.4.8 <dfn>Tag open state</dfn></h5> 252193fb6ee3Sopenharmony_ci 252293fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=tag-open-state:next-input-character>next input character</a>:</p> 252393fb6ee3Sopenharmony_ci 252493fb6ee3Sopenharmony_ci <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 252593fb6ee3Sopenharmony_ci 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 252693fb6ee3Sopenharmony_ci name state</a>. (Don't emit the token yet; further details will be filled in before it is 252793fb6ee3Sopenharmony_ci 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>, 252893fb6ee3Sopenharmony_ci 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 252993fb6ee3Sopenharmony_ci 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 253093fb6ee3Sopenharmony_ci character token. Reconsume the <a href=#current-input-character id=tag-open-state:current-input-character-3>current input character</a>.</dl> 253193fb6ee3Sopenharmony_ci 253293fb6ee3Sopenharmony_ci <h5 id=end-tag-open-state>12.2.4.9 <dfn>End tag open state</dfn></h5> 253393fb6ee3Sopenharmony_ci 253493fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=end-tag-open-state:next-input-character>next input character</a>:</p> 253593fb6ee3Sopenharmony_ci 253693fb6ee3Sopenharmony_ci <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 253793fb6ee3Sopenharmony_ci 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 253893fb6ee3Sopenharmony_ci name state</a>. (Don't emit the token yet; further details will be filled in before it is 253993fb6ee3Sopenharmony_ci 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>, 254093fb6ee3Sopenharmony_ci 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 254193fb6ee3Sopenharmony_ci 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 254293fb6ee3Sopenharmony_ci 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> 254393fb6ee3Sopenharmony_ci 254493fb6ee3Sopenharmony_ci 254593fb6ee3Sopenharmony_ci <h5 id=tag-name-state>12.2.4.10 <dfn>Tag name state</dfn></h5> 254693fb6ee3Sopenharmony_ci 254793fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=tag-name-state:next-input-character>next input character</a>:</p> 254893fb6ee3Sopenharmony_ci 254993fb6ee3Sopenharmony_ci <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 255093fb6ee3Sopenharmony_ci 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 255193fb6ee3Sopenharmony_ci 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 255293fb6ee3Sopenharmony_ci 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> 255393fb6ee3Sopenharmony_ci 255493fb6ee3Sopenharmony_ci 255593fb6ee3Sopenharmony_ci <h5 id=rcdata-less-than-sign-state>12.2.4.11 <dfn>RCDATA less-than sign state</dfn></h5> 255693fb6ee3Sopenharmony_ci 255793fb6ee3Sopenharmony_ci 255893fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=rcdata-less-than-sign-state:next-input-character>next input character</a>:</p> 255993fb6ee3Sopenharmony_ci 256093fb6ee3Sopenharmony_ci <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 256193fb6ee3Sopenharmony_ci 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. 256293fb6ee3Sopenharmony_ci Reconsume the <a href=#current-input-character id=rcdata-less-than-sign-state:current-input-character>current input character</a>.</dl> 256393fb6ee3Sopenharmony_ci 256493fb6ee3Sopenharmony_ci 256593fb6ee3Sopenharmony_ci <h5 id=rcdata-end-tag-open-state>12.2.4.12 <dfn>RCDATA end tag open state</dfn></h5> 256693fb6ee3Sopenharmony_ci 256793fb6ee3Sopenharmony_ci 256893fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=rcdata-end-tag-open-state:next-input-character>next input character</a>:</p> 256993fb6ee3Sopenharmony_ci 257093fb6ee3Sopenharmony_ci <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 257193fb6ee3Sopenharmony_ci <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 257293fb6ee3Sopenharmony_ci <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 257393fb6ee3Sopenharmony_ci 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 257493fb6ee3Sopenharmony_ci 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>. 257593fb6ee3Sopenharmony_ci 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 257693fb6ee3Sopenharmony_ci 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 257793fb6ee3Sopenharmony_ci 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 257893fb6ee3Sopenharmony_ci 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> 257993fb6ee3Sopenharmony_ci 258093fb6ee3Sopenharmony_ci 258193fb6ee3Sopenharmony_ci <h5 id=rcdata-end-tag-name-state>12.2.4.13 <dfn>RCDATA end tag name state</dfn></h5> 258293fb6ee3Sopenharmony_ci 258393fb6ee3Sopenharmony_ci 258493fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=rcdata-end-tag-name-state:next-input-character>next input character</a>:</p> 258593fb6ee3Sopenharmony_ci 258693fb6ee3Sopenharmony_ci <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 258793fb6ee3Sopenharmony_ci <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 258893fb6ee3Sopenharmony_ci 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 258993fb6ee3Sopenharmony_ci <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 259093fb6ee3Sopenharmony_ci 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 259193fb6ee3Sopenharmony_ci <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 259293fb6ee3Sopenharmony_ci 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 259393fb6ee3Sopenharmony_ci 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 259493fb6ee3Sopenharmony_ci 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 259593fb6ee3Sopenharmony_ci 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 259693fb6ee3Sopenharmony_ci 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 259793fb6ee3Sopenharmony_ci 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). 259893fb6ee3Sopenharmony_ci Reconsume the <a href=#current-input-character id=rcdata-end-tag-name-state:current-input-character-5>current input character</a>.</dl> 259993fb6ee3Sopenharmony_ci 260093fb6ee3Sopenharmony_ci 260193fb6ee3Sopenharmony_ci <h5 id=rawtext-less-than-sign-state>12.2.4.14 <dfn>RAWTEXT less-than sign state</dfn></h5> 260293fb6ee3Sopenharmony_ci 260393fb6ee3Sopenharmony_ci 260493fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=rawtext-less-than-sign-state:next-input-character>next input character</a>:</p> 260593fb6ee3Sopenharmony_ci 260693fb6ee3Sopenharmony_ci <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 260793fb6ee3Sopenharmony_ci 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. 260893fb6ee3Sopenharmony_ci Reconsume the <a href=#current-input-character id=rawtext-less-than-sign-state:current-input-character>current input character</a>.</dl> 260993fb6ee3Sopenharmony_ci 261093fb6ee3Sopenharmony_ci 261193fb6ee3Sopenharmony_ci <h5 id=rawtext-end-tag-open-state>12.2.4.15 <dfn>RAWTEXT end tag open state</dfn></h5> 261293fb6ee3Sopenharmony_ci 261393fb6ee3Sopenharmony_ci 261493fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=rawtext-end-tag-open-state:next-input-character>next input character</a>:</p> 261593fb6ee3Sopenharmony_ci 261693fb6ee3Sopenharmony_ci <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 261793fb6ee3Sopenharmony_ci <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 261893fb6ee3Sopenharmony_ci <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 261993fb6ee3Sopenharmony_ci 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 262093fb6ee3Sopenharmony_ci 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>. 262193fb6ee3Sopenharmony_ci 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 262293fb6ee3Sopenharmony_ci 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 262393fb6ee3Sopenharmony_ci 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 262493fb6ee3Sopenharmony_ci 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> 262593fb6ee3Sopenharmony_ci 262693fb6ee3Sopenharmony_ci 262793fb6ee3Sopenharmony_ci <h5 id=rawtext-end-tag-name-state>12.2.4.16 <dfn>RAWTEXT end tag name state</dfn></h5> 262893fb6ee3Sopenharmony_ci 262993fb6ee3Sopenharmony_ci 263093fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=rawtext-end-tag-name-state:next-input-character>next input character</a>:</p> 263193fb6ee3Sopenharmony_ci 263293fb6ee3Sopenharmony_ci <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 263393fb6ee3Sopenharmony_ci <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 263493fb6ee3Sopenharmony_ci 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 263593fb6ee3Sopenharmony_ci <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 263693fb6ee3Sopenharmony_ci 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 263793fb6ee3Sopenharmony_ci <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 263893fb6ee3Sopenharmony_ci 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 263993fb6ee3Sopenharmony_ci 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 264093fb6ee3Sopenharmony_ci 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 264193fb6ee3Sopenharmony_ci 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 264293fb6ee3Sopenharmony_ci 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 264393fb6ee3Sopenharmony_ci 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). 264493fb6ee3Sopenharmony_ci Reconsume the <a href=#current-input-character id=rawtext-end-tag-name-state:current-input-character-5>current input character</a>.</dl> 264593fb6ee3Sopenharmony_ci 264693fb6ee3Sopenharmony_ci 264793fb6ee3Sopenharmony_ci <h5 id=script-data-less-than-sign-state>12.2.4.17 <dfn>Script data less-than sign state</dfn></h5> 264893fb6ee3Sopenharmony_ci 264993fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=script-data-less-than-sign-state:next-input-character>next input character</a>:</p> 265093fb6ee3Sopenharmony_ci 265193fb6ee3Sopenharmony_ci <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 265293fb6ee3Sopenharmony_ci 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 265393fb6ee3Sopenharmony_ci 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. 265493fb6ee3Sopenharmony_ci Reconsume the <a href=#current-input-character id=script-data-less-than-sign-state:current-input-character>current input character</a>.</dl> 265593fb6ee3Sopenharmony_ci 265693fb6ee3Sopenharmony_ci 265793fb6ee3Sopenharmony_ci <h5 id=script-data-end-tag-open-state>12.2.4.18 <dfn>Script data end tag open state</dfn></h5> 265893fb6ee3Sopenharmony_ci 265993fb6ee3Sopenharmony_ci 266093fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=script-data-end-tag-open-state:next-input-character>next input character</a>:</p> 266193fb6ee3Sopenharmony_ci 266293fb6ee3Sopenharmony_ci <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 266393fb6ee3Sopenharmony_ci <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 266493fb6ee3Sopenharmony_ci <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 266593fb6ee3Sopenharmony_ci 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 266693fb6ee3Sopenharmony_ci 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>. 266793fb6ee3Sopenharmony_ci 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 266893fb6ee3Sopenharmony_ci 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 266993fb6ee3Sopenharmony_ci 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 267093fb6ee3Sopenharmony_ci 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> 267193fb6ee3Sopenharmony_ci 267293fb6ee3Sopenharmony_ci 267393fb6ee3Sopenharmony_ci <h5 id=script-data-end-tag-name-state>12.2.4.19 <dfn>Script data end tag name state</dfn></h5> 267493fb6ee3Sopenharmony_ci 267593fb6ee3Sopenharmony_ci 267693fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=script-data-end-tag-name-state:next-input-character>next input character</a>:</p> 267793fb6ee3Sopenharmony_ci 267893fb6ee3Sopenharmony_ci <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 267993fb6ee3Sopenharmony_ci <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 268093fb6ee3Sopenharmony_ci 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 268193fb6ee3Sopenharmony_ci <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 268293fb6ee3Sopenharmony_ci 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 268393fb6ee3Sopenharmony_ci <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 268493fb6ee3Sopenharmony_ci 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 268593fb6ee3Sopenharmony_ci 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 268693fb6ee3Sopenharmony_ci 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 268793fb6ee3Sopenharmony_ci 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 268893fb6ee3Sopenharmony_ci 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 268993fb6ee3Sopenharmony_ci 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). 269093fb6ee3Sopenharmony_ci Reconsume the <a href=#current-input-character id=script-data-end-tag-name-state:current-input-character-5>current input character</a>.</dl> 269193fb6ee3Sopenharmony_ci 269293fb6ee3Sopenharmony_ci 269393fb6ee3Sopenharmony_ci <h5 id=script-data-escape-start-state>12.2.4.20 <dfn>Script data escape start state</dfn></h5> 269493fb6ee3Sopenharmony_ci 269593fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=script-data-escape-start-state:next-input-character>next input character</a>:</p> 269693fb6ee3Sopenharmony_ci 269793fb6ee3Sopenharmony_ci <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 269893fb6ee3Sopenharmony_ci 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 269993fb6ee3Sopenharmony_ci character</a>.</dl> 270093fb6ee3Sopenharmony_ci 270193fb6ee3Sopenharmony_ci 270293fb6ee3Sopenharmony_ci <h5 id=script-data-escape-start-dash-state>12.2.4.21 <dfn>Script data escape start dash state</dfn></h5> 270393fb6ee3Sopenharmony_ci 270493fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=script-data-escape-start-dash-state:next-input-character>next input character</a>:</p> 270593fb6ee3Sopenharmony_ci 270693fb6ee3Sopenharmony_ci <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 270793fb6ee3Sopenharmony_ci 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 270893fb6ee3Sopenharmony_ci character</a>.</dl> 270993fb6ee3Sopenharmony_ci 271093fb6ee3Sopenharmony_ci 271193fb6ee3Sopenharmony_ci <h5 id=script-data-escaped-state>12.2.4.22 <dfn>Script data escaped state</dfn></h5> 271293fb6ee3Sopenharmony_ci 271393fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=script-data-escaped-state:next-input-character>next input character</a>:</p> 271493fb6ee3Sopenharmony_ci 271593fb6ee3Sopenharmony_ci <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 271693fb6ee3Sopenharmony_ci character token.<dt>U+003C LESS-THAN SIGN (<)<dd>Switch to the <a href=#script-data-escaped-less-than-sign-state id=script-data-escaped-state:script-data-escaped-less-than-sign-state>script data escaped less-than sign state</a>.<dt>U+0000 NULL<dd><a href=#parse-error id=script-data-escaped-state:parse-error>Parse error</a>. Emit a U+FFFD REPLACEMENT CHARACTER character token.<dt>EOF<dd>Switch to the <a href=#data-state id=script-data-escaped-state:data-state>data state</a>. <a href=#parse-error id=script-data-escaped-state:parse-error-2>Parse error</a>. Reconsume the EOF 271793fb6ee3Sopenharmony_ci 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> 271893fb6ee3Sopenharmony_ci 271993fb6ee3Sopenharmony_ci 272093fb6ee3Sopenharmony_ci <h5 id=script-data-escaped-dash-state>12.2.4.23 <dfn>Script data escaped dash state</dfn></h5> 272193fb6ee3Sopenharmony_ci 272293fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=script-data-escaped-dash-state:next-input-character>next input character</a>:</p> 272393fb6ee3Sopenharmony_ci 272493fb6ee3Sopenharmony_ci <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 272593fb6ee3Sopenharmony_ci character token.<dt>U+003C LESS-THAN SIGN (<)<dd>Switch to the <a href=#script-data-escaped-less-than-sign-state id=script-data-escaped-dash-state:script-data-escaped-less-than-sign-state>script data escaped less-than sign state</a>.<dt>U+0000 NULL<dd><a href=#parse-error id=script-data-escaped-dash-state:parse-error>Parse error</a>. Switch to the <a href=#script-data-escaped-state id=script-data-escaped-dash-state:script-data-escaped-state>script data escaped state</a>. Emit a U+FFFD 272693fb6ee3Sopenharmony_ci 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 272793fb6ee3Sopenharmony_ci 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 272893fb6ee3Sopenharmony_ci character</a> as a character token.</dl> 272993fb6ee3Sopenharmony_ci 273093fb6ee3Sopenharmony_ci 273193fb6ee3Sopenharmony_ci <h5 id=script-data-escaped-dash-dash-state>12.2.4.24 <dfn>Script data escaped dash dash state</dfn></h5> 273293fb6ee3Sopenharmony_ci 273393fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=script-data-escaped-dash-dash-state:next-input-character>next input character</a>:</p> 273493fb6ee3Sopenharmony_ci 273593fb6ee3Sopenharmony_ci <dl class=switch><dt>U+002D HYPHEN-MINUS (-)<dd>Emit a U+002D HYPHEN-MINUS character token.<dt>U+003C LESS-THAN SIGN (<)<dd>Switch to the <a href=#script-data-escaped-less-than-sign-state id=script-data-escaped-dash-dash-state:script-data-escaped-less-than-sign-state>script data escaped less-than sign state</a>.<dt>U+003E GREATER-THAN SIGN (>)<dd>Switch to the <a href=#script-data-state id=script-data-escaped-dash-dash-state:script-data-state>script data state</a>. Emit a U+003E GREATER-THAN SIGN character 273693fb6ee3Sopenharmony_ci 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 273793fb6ee3Sopenharmony_ci 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 273893fb6ee3Sopenharmony_ci 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 273993fb6ee3Sopenharmony_ci character</a> as a character token.</dl> 274093fb6ee3Sopenharmony_ci 274193fb6ee3Sopenharmony_ci 274293fb6ee3Sopenharmony_ci <h5 id=script-data-escaped-less-than-sign-state>12.2.4.25 <dfn>Script data escaped less-than sign state</dfn></h5> 274393fb6ee3Sopenharmony_ci 274493fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=script-data-escaped-less-than-sign-state:next-input-character>next input character</a>:</p> 274593fb6ee3Sopenharmony_ci 274693fb6ee3Sopenharmony_ci <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 274793fb6ee3Sopenharmony_ci 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 274893fb6ee3Sopenharmony_ci 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 274993fb6ee3Sopenharmony_ci 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 275093fb6ee3Sopenharmony_ci data double escape start state</a>. Emit a U+003C LESS-THAN SIGN character token and the 275193fb6ee3Sopenharmony_ci <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 275293fb6ee3Sopenharmony_ci <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 275393fb6ee3Sopenharmony_ci 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 275493fb6ee3Sopenharmony_ci 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 275593fb6ee3Sopenharmony_ci 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 275693fb6ee3Sopenharmony_ci 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> 275793fb6ee3Sopenharmony_ci 275893fb6ee3Sopenharmony_ci 275993fb6ee3Sopenharmony_ci <h5 id=script-data-escaped-end-tag-open-state>12.2.4.26 <dfn>Script data escaped end tag open state</dfn></h5> 276093fb6ee3Sopenharmony_ci 276193fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=script-data-escaped-end-tag-open-state:next-input-character>next input character</a>:</p> 276293fb6ee3Sopenharmony_ci 276393fb6ee3Sopenharmony_ci <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 276493fb6ee3Sopenharmony_ci <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 276593fb6ee3Sopenharmony_ci <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 276693fb6ee3Sopenharmony_ci 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 276793fb6ee3Sopenharmony_ci 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>. 276893fb6ee3Sopenharmony_ci 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 276993fb6ee3Sopenharmony_ci 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 277093fb6ee3Sopenharmony_ci 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 277193fb6ee3Sopenharmony_ci 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 277293fb6ee3Sopenharmony_ci character</a>.</dl> 277393fb6ee3Sopenharmony_ci 277493fb6ee3Sopenharmony_ci 277593fb6ee3Sopenharmony_ci <h5 id=script-data-escaped-end-tag-name-state>12.2.4.27 <dfn>Script data escaped end tag name state</dfn></h5> 277693fb6ee3Sopenharmony_ci 277793fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=script-data-escaped-end-tag-name-state:next-input-character>next input character</a>:</p> 277893fb6ee3Sopenharmony_ci 277993fb6ee3Sopenharmony_ci <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 278093fb6ee3Sopenharmony_ci <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 278193fb6ee3Sopenharmony_ci 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 278293fb6ee3Sopenharmony_ci <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 278393fb6ee3Sopenharmony_ci 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 278493fb6ee3Sopenharmony_ci <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 278593fb6ee3Sopenharmony_ci 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 278693fb6ee3Sopenharmony_ci 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 278793fb6ee3Sopenharmony_ci 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 278893fb6ee3Sopenharmony_ci 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 278993fb6ee3Sopenharmony_ci 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 279093fb6ee3Sopenharmony_ci token, a U+002F SOLIDUS character token, and a character token for each of the characters in the 279193fb6ee3Sopenharmony_ci <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 279293fb6ee3Sopenharmony_ci 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> 279393fb6ee3Sopenharmony_ci 279493fb6ee3Sopenharmony_ci 279593fb6ee3Sopenharmony_ci <h5 id=script-data-double-escape-start-state>12.2.4.28 <dfn>Script data double escape start state</dfn></h5> 279693fb6ee3Sopenharmony_ci 279793fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=script-data-double-escape-start-state:next-input-character>next input character</a>:</p> 279893fb6ee3Sopenharmony_ci 279993fb6ee3Sopenharmony_ci <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>. 280093fb6ee3Sopenharmony_ci 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 280193fb6ee3Sopenharmony_ci 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 280293fb6ee3Sopenharmony_ci 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 280393fb6ee3Sopenharmony_ci <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 280493fb6ee3Sopenharmony_ci 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 280593fb6ee3Sopenharmony_ci character</a>.</dl> 280693fb6ee3Sopenharmony_ci 280793fb6ee3Sopenharmony_ci 280893fb6ee3Sopenharmony_ci <h5 id=script-data-double-escaped-state>12.2.4.29 <dfn>Script data double escaped state</dfn></h5> 280993fb6ee3Sopenharmony_ci 281093fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=script-data-double-escaped-state:next-input-character>next input character</a>:</p> 281193fb6ee3Sopenharmony_ci 281293fb6ee3Sopenharmony_ci <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 281393fb6ee3Sopenharmony_ci character token.<dt>U+003C LESS-THAN SIGN (<)<dd>Switch to the <a href=#script-data-double-escaped-less-than-sign-state id=script-data-double-escaped-state:script-data-double-escaped-less-than-sign-state>script data double escaped less-than sign state</a>. Emit a U+003C 281493fb6ee3Sopenharmony_ci 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 281593fb6ee3Sopenharmony_ci 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> 281693fb6ee3Sopenharmony_ci 281793fb6ee3Sopenharmony_ci 281893fb6ee3Sopenharmony_ci <h5 id=script-data-double-escaped-dash-state>12.2.4.30 <dfn>Script data double escaped dash state</dfn></h5> 281993fb6ee3Sopenharmony_ci 282093fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=script-data-double-escaped-dash-state:next-input-character>next input character</a>:</p> 282193fb6ee3Sopenharmony_ci 282293fb6ee3Sopenharmony_ci <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 282393fb6ee3Sopenharmony_ci HYPHEN-MINUS character token.<dt>U+003C LESS-THAN SIGN (<)<dd>Switch to the <a href=#script-data-double-escaped-less-than-sign-state id=script-data-double-escaped-dash-state:script-data-double-escaped-less-than-sign-state>script data double escaped less-than sign state</a>. Emit a U+003C 282493fb6ee3Sopenharmony_ci 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 282593fb6ee3Sopenharmony_ci 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 282693fb6ee3Sopenharmony_ci 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 282793fb6ee3Sopenharmony_ci character</a> as a character token.</dl> 282893fb6ee3Sopenharmony_ci 282993fb6ee3Sopenharmony_ci 283093fb6ee3Sopenharmony_ci <h5 id=script-data-double-escaped-dash-dash-state>12.2.4.31 <dfn>Script data double escaped dash dash state</dfn></h5> 283193fb6ee3Sopenharmony_ci 283293fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=script-data-double-escaped-dash-dash-state:next-input-character>next input character</a>:</p> 283393fb6ee3Sopenharmony_ci 283493fb6ee3Sopenharmony_ci <dl class=switch><dt>U+002D HYPHEN-MINUS (-)<dd>Emit a U+002D HYPHEN-MINUS character token.<dt>U+003C LESS-THAN SIGN (<)<dd>Switch to the <a href=#script-data-double-escaped-less-than-sign-state id=script-data-double-escaped-dash-dash-state:script-data-double-escaped-less-than-sign-state>script data double escaped less-than sign state</a>. Emit a U+003C 283593fb6ee3Sopenharmony_ci 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 283693fb6ee3Sopenharmony_ci 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 283793fb6ee3Sopenharmony_ci 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 283893fb6ee3Sopenharmony_ci 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 283993fb6ee3Sopenharmony_ci character</a> as a character token.</dl> 284093fb6ee3Sopenharmony_ci 284193fb6ee3Sopenharmony_ci 284293fb6ee3Sopenharmony_ci <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> 284393fb6ee3Sopenharmony_ci 284493fb6ee3Sopenharmony_ci <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> 284593fb6ee3Sopenharmony_ci 284693fb6ee3Sopenharmony_ci <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 284793fb6ee3Sopenharmony_ci 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 284893fb6ee3Sopenharmony_ci input character</a>.</dl> 284993fb6ee3Sopenharmony_ci 285093fb6ee3Sopenharmony_ci 285193fb6ee3Sopenharmony_ci <h5 id=script-data-double-escape-end-state>12.2.4.33 <dfn>Script data double escape end state</dfn></h5> 285293fb6ee3Sopenharmony_ci 285393fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=script-data-double-escape-end-state:next-input-character>next input character</a>:</p> 285493fb6ee3Sopenharmony_ci 285593fb6ee3Sopenharmony_ci <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, 285693fb6ee3Sopenharmony_ci 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 285793fb6ee3Sopenharmony_ci 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 285893fb6ee3Sopenharmony_ci 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 285993fb6ee3Sopenharmony_ci <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 286093fb6ee3Sopenharmony_ci 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 286193fb6ee3Sopenharmony_ci input character</a>.</dl> 286293fb6ee3Sopenharmony_ci 286393fb6ee3Sopenharmony_ci 286493fb6ee3Sopenharmony_ci <h5 id=before-attribute-name-state>12.2.4.34 <dfn>Before attribute name state</dfn></h5> 286593fb6ee3Sopenharmony_ci 286693fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=before-attribute-name-state:next-input-character>next input character</a>:</p> 286793fb6ee3Sopenharmony_ci 286893fb6ee3Sopenharmony_ci <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 286993fb6ee3Sopenharmony_ci 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), 287093fb6ee3Sopenharmony_ci 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 287193fb6ee3Sopenharmony_ci attribute's name to a U+FFFD REPLACEMENT CHARACTER character, and its value to the empty string. 287293fb6ee3Sopenharmony_ci Switch to the <a href=#attribute-name-state id=before-attribute-name-state:attribute-name-state-2>attribute name state</a>.<dt>U+0022 QUOTATION MARK (")<dt>U+0027 APOSTROPHE (')<dt>U+003C LESS-THAN SIGN (<)<dt>U+003D EQUALS SIGN (=)<dd><a href=#parse-error id=before-attribute-name-state:parse-error-2>Parse error</a>. Treat it as per the "anything else" entry below.<dt>EOF<dd><a href=#parse-error id=before-attribute-name-state:parse-error-3>Parse error</a>. Switch to the <a href=#data-state id=before-attribute-name-state:data-state-2>data state</a>. Reconsume the EOF 287393fb6ee3Sopenharmony_ci character.<dt>Anything else<dd>Start a new attribute in the current tag token. Set that attribute's name to the 287493fb6ee3Sopenharmony_ci <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 287593fb6ee3Sopenharmony_ci <a href=#attribute-name-state id=before-attribute-name-state:attribute-name-state-3>attribute name state</a>.</dl> 287693fb6ee3Sopenharmony_ci 287793fb6ee3Sopenharmony_ci 287893fb6ee3Sopenharmony_ci <h5 id=attribute-name-state>12.2.4.35 <dfn>Attribute name state</dfn></h5> 287993fb6ee3Sopenharmony_ci 288093fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=attribute-name-state:next-input-character>next input character</a>:</p> 288193fb6ee3Sopenharmony_ci 288293fb6ee3Sopenharmony_ci <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 288393fb6ee3Sopenharmony_ci 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 288493fb6ee3Sopenharmony_ci attribute's name.<dt>U+0022 QUOTATION MARK (")<dt>U+0027 APOSTROPHE (')<dt>U+003C LESS-THAN SIGN (<)<dd><a href=#parse-error id=attribute-name-state:parse-error-2>Parse error</a>. Treat it as per the "anything else" entry below.<dt>EOF<dd><a href=#parse-error id=attribute-name-state:parse-error-3>Parse error</a>. Switch to the <a href=#data-state id=attribute-name-state:data-state-2>data state</a>. Reconsume the EOF 288593fb6ee3Sopenharmony_ci 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> 288693fb6ee3Sopenharmony_ci 288793fb6ee3Sopenharmony_ci <p>When the user agent leaves the attribute name state (and before emitting the tag token, if 288893fb6ee3Sopenharmony_ci appropriate), the complete attribute's name must be compared to the other attributes on the same 288993fb6ee3Sopenharmony_ci token; if there is already an attribute on the token with the exact same name, then this is a 289093fb6ee3Sopenharmony_ci <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> 289193fb6ee3Sopenharmony_ci 289293fb6ee3Sopenharmony_ci <p class=note>If an attribute is so removed from a token, it, and the value that gets associated 289393fb6ee3Sopenharmony_ci with it, if any, are never subsequently used by the parser, and are therefore effectively 289493fb6ee3Sopenharmony_ci discarded. Removing the attribute in this way does not change its status as the "current 289593fb6ee3Sopenharmony_ci attribute" for the purposes of the tokenizer, however.</p> 289693fb6ee3Sopenharmony_ci 289793fb6ee3Sopenharmony_ci 289893fb6ee3Sopenharmony_ci <h5 id=after-attribute-name-state>12.2.4.36 <dfn>After attribute name state</dfn></h5> 289993fb6ee3Sopenharmony_ci 290093fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=after-attribute-name-state:next-input-character>next input character</a>:</p> 290193fb6ee3Sopenharmony_ci 290293fb6ee3Sopenharmony_ci <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 290393fb6ee3Sopenharmony_ci 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), 290493fb6ee3Sopenharmony_ci 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 290593fb6ee3Sopenharmony_ci attribute's name to a U+FFFD REPLACEMENT CHARACTER character, and its value to the empty string. 290693fb6ee3Sopenharmony_ci Switch to the <a href=#attribute-name-state id=after-attribute-name-state:attribute-name-state-2>attribute name state</a>.<dt>U+0022 QUOTATION MARK (")<dt>U+0027 APOSTROPHE (')<dt>U+003C LESS-THAN SIGN (<)<dd><a href=#parse-error id=after-attribute-name-state:parse-error-2>Parse error</a>. Treat it as per the "anything else" entry below.<dt>EOF<dd><a href=#parse-error id=after-attribute-name-state:parse-error-3>Parse error</a>. Switch to the <a href=#data-state id=after-attribute-name-state:data-state-2>data state</a>. Reconsume the EOF 290793fb6ee3Sopenharmony_ci character.<dt>Anything else<dd>Start a new attribute in the current tag token. Set that attribute's name to the 290893fb6ee3Sopenharmony_ci <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 290993fb6ee3Sopenharmony_ci <a href=#attribute-name-state id=after-attribute-name-state:attribute-name-state-3>attribute name state</a>.</dl> 291093fb6ee3Sopenharmony_ci 291193fb6ee3Sopenharmony_ci 291293fb6ee3Sopenharmony_ci <h5 id=before-attribute-value-state>12.2.4.37 <dfn>Before attribute value state</dfn></h5> 291393fb6ee3Sopenharmony_ci 291493fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=before-attribute-value-state:next-input-character>next input character</a>:</p> 291593fb6ee3Sopenharmony_ci 291693fb6ee3Sopenharmony_ci <dl class=switch><dt>U+0009 CHARACTER TABULATION (tab)<dt>U+000A LINE FEED (LF)<dt>U+000C FORM FEED (FF)<dt>U+0020 SPACE<dd>Ignore the character.<dt>U+0022 QUOTATION MARK (")<dd>Switch to the <a href=#attribute-value-(double-quoted)-state id=before-attribute-value-state:attribute-value-(double-quoted)-state>attribute value (double-quoted) state</a>.<dt>U+0026 AMPERSAND (&)<dd>Switch to the <a href=#attribute-value-(unquoted)-state id=before-attribute-value-state:attribute-value-(unquoted)-state>attribute value (unquoted) state</a>. Reconsume the <a href=#current-input-character id=before-attribute-value-state:current-input-character>current 291793fb6ee3Sopenharmony_ci 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 291893fb6ee3Sopenharmony_ci 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 291993fb6ee3Sopenharmony_ci token.<dt>U+003C LESS-THAN SIGN (<)<dt>U+003D EQUALS SIGN (=)<dt>U+0060 GRAVE ACCENT (`)<dd><a href=#parse-error id=before-attribute-value-state:parse-error-3>Parse error</a>. Treat it as per the "anything else" entry below.<dt>EOF<dd><a href=#parse-error id=before-attribute-value-state:parse-error-4>Parse error</a>. Switch to the <a href=#data-state id=before-attribute-value-state:data-state-2>data state</a>. Reconsume the EOF 292093fb6ee3Sopenharmony_ci 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 292193fb6ee3Sopenharmony_ci the <a href=#attribute-value-(unquoted)-state id=before-attribute-value-state:attribute-value-(unquoted)-state-3>attribute value (unquoted) state</a>.</dl> 292293fb6ee3Sopenharmony_ci 292393fb6ee3Sopenharmony_ci 292493fb6ee3Sopenharmony_ci <h5 id=attribute-value-(double-quoted)-state>12.2.4.38 <dfn>Attribute value (double-quoted) state</dfn></h5> 292593fb6ee3Sopenharmony_ci 292693fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=attribute-value-(double-quoted)-state:next-input-character>next input character</a>:</p> 292793fb6ee3Sopenharmony_ci 292893fb6ee3Sopenharmony_ci <dl class=switch><dt>U+0022 QUOTATION MARK (")<dd>Switch to the <a href=#after-attribute-value-(quoted)-state id=attribute-value-(double-quoted)-state:after-attribute-value-(quoted)-state>after attribute value (quoted) state</a>.<dt>U+0026 AMPERSAND (&)<dd>Switch to the <a href=#character-reference-in-attribute-value-state id=attribute-value-(double-quoted)-state:character-reference-in-attribute-value-state>character reference in attribute value state</a>, with the 292993fb6ee3Sopenharmony_ci <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 293093fb6ee3Sopenharmony_ci 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 293193fb6ee3Sopenharmony_ci 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> 293293fb6ee3Sopenharmony_ci 293393fb6ee3Sopenharmony_ci 293493fb6ee3Sopenharmony_ci <h5 id=attribute-value-(single-quoted)-state>12.2.4.39 <dfn>Attribute value (single-quoted) state</dfn></h5> 293593fb6ee3Sopenharmony_ci 293693fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=attribute-value-(single-quoted)-state:next-input-character>next input character</a>:</p> 293793fb6ee3Sopenharmony_ci 293893fb6ee3Sopenharmony_ci <dl class=switch><dt>U+0027 APOSTROPHE (')<dd>Switch to the <a href=#after-attribute-value-(quoted)-state id=attribute-value-(single-quoted)-state:after-attribute-value-(quoted)-state>after attribute value (quoted) state</a>.<dt>U+0026 AMPERSAND (&)<dd>Switch to the <a href=#character-reference-in-attribute-value-state id=attribute-value-(single-quoted)-state:character-reference-in-attribute-value-state>character reference in attribute value state</a>, with the 293993fb6ee3Sopenharmony_ci <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 294093fb6ee3Sopenharmony_ci 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 294193fb6ee3Sopenharmony_ci 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> 294293fb6ee3Sopenharmony_ci 294393fb6ee3Sopenharmony_ci 294493fb6ee3Sopenharmony_ci <h5 id=attribute-value-(unquoted)-state>12.2.4.40 <dfn>Attribute value (unquoted) state</dfn></h5> 294593fb6ee3Sopenharmony_ci 294693fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=attribute-value-(unquoted)-state:next-input-character>next input character</a>:</p> 294793fb6ee3Sopenharmony_ci 294893fb6ee3Sopenharmony_ci <dl class=switch><dt>U+0009 CHARACTER TABULATION (tab)<dt>U+000A LINE FEED (LF)<dt>U+000C FORM FEED (FF)<dt>U+0020 SPACE<dd>Switch to the <a href=#before-attribute-name-state id=attribute-value-(unquoted)-state:before-attribute-name-state>before attribute name state</a>.<dt>U+0026 AMPERSAND (&)<dd>Switch to the <a href=#character-reference-in-attribute-value-state id=attribute-value-(unquoted)-state:character-reference-in-attribute-value-state>character reference in attribute value state</a>, with the 294993fb6ee3Sopenharmony_ci <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 295093fb6ee3Sopenharmony_ci attribute's value.<dt>U+0022 QUOTATION MARK (")<dt>U+0027 APOSTROPHE (')<dt>U+003C LESS-THAN SIGN (<)<dt>U+003D EQUALS SIGN (=)<dt>U+0060 GRAVE ACCENT (`)<dd><a href=#parse-error id=attribute-value-(unquoted)-state:parse-error-2>Parse error</a>. Treat it as per the "anything else" entry below.<dt>EOF<dd><a href=#parse-error id=attribute-value-(unquoted)-state:parse-error-3>Parse error</a>. Switch to the <a href=#data-state id=attribute-value-(unquoted)-state:data-state-2>data state</a>. Reconsume the EOF 295193fb6ee3Sopenharmony_ci 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> 295293fb6ee3Sopenharmony_ci 295393fb6ee3Sopenharmony_ci 295493fb6ee3Sopenharmony_ci <h5 id=character-reference-in-attribute-value-state>12.2.4.41 <dfn>Character reference in attribute value state</dfn></h5> 295593fb6ee3Sopenharmony_ci 295693fb6ee3Sopenharmony_ci <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> 295793fb6ee3Sopenharmony_ci 295893fb6ee3Sopenharmony_ci <p>If nothing is returned, append a U+0026 AMPERSAND character (&) to the current attribute's 295993fb6ee3Sopenharmony_ci value.</p> 296093fb6ee3Sopenharmony_ci 296193fb6ee3Sopenharmony_ci <p>Otherwise, append the returned character tokens to the current attribute's value.</p> 296293fb6ee3Sopenharmony_ci 296393fb6ee3Sopenharmony_ci <p>Finally, switch back to the attribute value state that switched into this state.</p> 296493fb6ee3Sopenharmony_ci 296593fb6ee3Sopenharmony_ci 296693fb6ee3Sopenharmony_ci <h5 id=after-attribute-value-(quoted)-state>12.2.4.42 <dfn>After attribute value (quoted) state</dfn></h5> 296793fb6ee3Sopenharmony_ci 296893fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=after-attribute-value-(quoted)-state:next-input-character>next input character</a>:</p> 296993fb6ee3Sopenharmony_ci 297093fb6ee3Sopenharmony_ci <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 297193fb6ee3Sopenharmony_ci 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 297293fb6ee3Sopenharmony_ci the character.</dl> 297393fb6ee3Sopenharmony_ci 297493fb6ee3Sopenharmony_ci 297593fb6ee3Sopenharmony_ci <h5 id=self-closing-start-tag-state>12.2.4.43 <dfn>Self-closing start tag state</dfn></h5> 297693fb6ee3Sopenharmony_ci 297793fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=self-closing-start-tag-state:next-input-character>next input character</a>:</p> 297893fb6ee3Sopenharmony_ci 297993fb6ee3Sopenharmony_ci <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 298093fb6ee3Sopenharmony_ci 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 298193fb6ee3Sopenharmony_ci 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 298293fb6ee3Sopenharmony_ci the character.</dl> 298393fb6ee3Sopenharmony_ci 298493fb6ee3Sopenharmony_ci 298593fb6ee3Sopenharmony_ci <h5 id=bogus-comment-state>12.2.4.44 <dfn>Bogus comment state</dfn></h5> 298693fb6ee3Sopenharmony_ci 298793fb6ee3Sopenharmony_ci <p>Consume every character up to and including the first U+003E GREATER-THAN SIGN character (>) 298893fb6ee3Sopenharmony_ci or the end of the file (EOF), whichever comes first. 298993fb6ee3Sopenharmony_ci If more than one character was consumed, then emit a comment token whose data is the 299093fb6ee3Sopenharmony_ci concatenation of all the characters starting from and including the character that caused the 299193fb6ee3Sopenharmony_ci state machine to switch into the bogus comment state, up to and including the character 299293fb6ee3Sopenharmony_ci immediately before the last consumed character (i.e. up to the character just before the U+003E or 299393fb6ee3Sopenharmony_ci EOF character), but with any U+0000 NULL characters replaced by U+FFFD REPLACEMENT CHARACTER 299493fb6ee3Sopenharmony_ci characters. (If the comment was started by the end of the file (EOF), the token is empty. 299593fb6ee3Sopenharmony_ci Similarly, the token is empty if it was generated by the string "<code><!></code>".)</p> 299693fb6ee3Sopenharmony_ci 299793fb6ee3Sopenharmony_ci <p>Switch to the <a href=#data-state id=bogus-comment-state:data-state>data state</a>.</p> 299893fb6ee3Sopenharmony_ci 299993fb6ee3Sopenharmony_ci <p>If the end of the file was reached, reconsume the EOF character.</p> 300093fb6ee3Sopenharmony_ci 300193fb6ee3Sopenharmony_ci 300293fb6ee3Sopenharmony_ci <h5 id=markup-declaration-open-state>12.2.4.45 <dfn>Markup declaration open state</dfn></h5> 300393fb6ee3Sopenharmony_ci 300493fb6ee3Sopenharmony_ci <p>If the next two characters are both U+002D HYPHEN-MINUS characters (-), consume those two 300593fb6ee3Sopenharmony_ci 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 300693fb6ee3Sopenharmony_ci start state</a>.</p> 300793fb6ee3Sopenharmony_ci 300893fb6ee3Sopenharmony_ci <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 300993fb6ee3Sopenharmony_ci the word "DOCTYPE", then consume those characters and switch to the <a href=#doctype-state id=markup-declaration-open-state:doctype-state>DOCTYPE 301093fb6ee3Sopenharmony_ci state</a>.</p> 301193fb6ee3Sopenharmony_ci 301293fb6ee3Sopenharmony_ci <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 301393fb6ee3Sopenharmony_ci <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 301493fb6ee3Sopenharmony_ci for the string "[CDATA[" (the five uppercase letters "CDATA" with a U+005B LEFT SQUARE BRACKET 301593fb6ee3Sopenharmony_ci 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 301693fb6ee3Sopenharmony_ci state</a>.</p> 301793fb6ee3Sopenharmony_ci 301893fb6ee3Sopenharmony_ci <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>. 301993fb6ee3Sopenharmony_ci The next character that is consumed, if any, is the first character that will be in the 302093fb6ee3Sopenharmony_ci comment.</p> 302193fb6ee3Sopenharmony_ci 302293fb6ee3Sopenharmony_ci 302393fb6ee3Sopenharmony_ci <h5 id=comment-start-state>12.2.4.46 <dfn>Comment start state</dfn></h5> 302493fb6ee3Sopenharmony_ci 302593fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=comment-start-state:next-input-character>next input character</a>:</p> 302693fb6ee3Sopenharmony_ci 302793fb6ee3Sopenharmony_ci <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 302893fb6ee3Sopenharmony_ci 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. 302993fb6ee3Sopenharmony_ci 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 303093fb6ee3Sopenharmony_ci <a href=#comment-state id=comment-start-state:comment-state-2>comment state</a>.</dl> 303193fb6ee3Sopenharmony_ci 303293fb6ee3Sopenharmony_ci 303393fb6ee3Sopenharmony_ci <h5 id=comment-start-dash-state>12.2.4.47 <dfn>Comment start dash state</dfn></h5> 303493fb6ee3Sopenharmony_ci 303593fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=comment-start-dash-state:next-input-character>next input character</a>:</p> 303693fb6ee3Sopenharmony_ci 303793fb6ee3Sopenharmony_ci <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 303893fb6ee3Sopenharmony_ci 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. 303993fb6ee3Sopenharmony_ci 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 304093fb6ee3Sopenharmony_ci the comment token's data. Switch to the <a href=#comment-state id=comment-start-dash-state:comment-state-2>comment state</a>.</dl> 304193fb6ee3Sopenharmony_ci 304293fb6ee3Sopenharmony_ci 304393fb6ee3Sopenharmony_ci <h5 id=comment-state>12.2.4.48 <dfn id=comment>Comment state</dfn></h5> 304493fb6ee3Sopenharmony_ci 304593fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=comment-state:next-input-character>next input character</a>:</p> 304693fb6ee3Sopenharmony_ci 304793fb6ee3Sopenharmony_ci <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 304893fb6ee3Sopenharmony_ci 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. 304993fb6ee3Sopenharmony_ci 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> 305093fb6ee3Sopenharmony_ci 305193fb6ee3Sopenharmony_ci 305293fb6ee3Sopenharmony_ci <h5 id=comment-end-dash-state>12.2.4.49 <dfn>Comment end dash state</dfn></h5> 305393fb6ee3Sopenharmony_ci 305493fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=comment-end-dash-state:next-input-character>next input character</a>:</p> 305593fb6ee3Sopenharmony_ci 305693fb6ee3Sopenharmony_ci <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 305793fb6ee3Sopenharmony_ci 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. 305893fb6ee3Sopenharmony_ci 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 305993fb6ee3Sopenharmony_ci the comment token's data. Switch to the <a href=#comment-state id=comment-end-dash-state:comment-state-2>comment state</a>.</dl> 306093fb6ee3Sopenharmony_ci 306193fb6ee3Sopenharmony_ci 306293fb6ee3Sopenharmony_ci <h5 id=comment-end-state>12.2.4.50 <dfn>Comment end state</dfn></h5> 306393fb6ee3Sopenharmony_ci 306493fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=comment-end-state:next-input-character>next input character</a>:</p> 306593fb6ee3Sopenharmony_ci 306693fb6ee3Sopenharmony_ci <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 306793fb6ee3Sopenharmony_ci REPLACEMENT CHARACTER character to the comment token's data. Switch to the <a href=#comment-state id=comment-end-state:comment-state>comment 306893fb6ee3Sopenharmony_ci 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 306993fb6ee3Sopenharmony_ci 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. 307093fb6ee3Sopenharmony_ci 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 307193fb6ee3Sopenharmony_ci input character</a> to the comment token's data. Switch to the <a href=#comment-state id=comment-end-state:comment-state-2>comment 307293fb6ee3Sopenharmony_ci state</a>.</dl> 307393fb6ee3Sopenharmony_ci 307493fb6ee3Sopenharmony_ci 307593fb6ee3Sopenharmony_ci <h5 id=comment-end-bang-state>12.2.4.51 <dfn>Comment end bang state</dfn></h5> 307693fb6ee3Sopenharmony_ci 307793fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=comment-end-bang-state:next-input-character>next input character</a>:</p> 307893fb6ee3Sopenharmony_ci 307993fb6ee3Sopenharmony_ci <dl class=switch><dt>U+002D HYPHEN-MINUS (-)<dd>Append two U+002D HYPHEN-MINUS characters (-) and a U+0021 EXCLAMATION MARK character (!) to 308093fb6ee3Sopenharmony_ci 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 308193fb6ee3Sopenharmony_ci MARK character (!), and a U+FFFD REPLACEMENT CHARACTER character to the comment token's data. 308293fb6ee3Sopenharmony_ci 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. 308393fb6ee3Sopenharmony_ci Reconsume the EOF character.<dt>Anything else<dd>Append two U+002D HYPHEN-MINUS characters (-), a U+0021 EXCLAMATION MARK character (!), and 308493fb6ee3Sopenharmony_ci 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 308593fb6ee3Sopenharmony_ci state</a>.</dl> 308693fb6ee3Sopenharmony_ci 308793fb6ee3Sopenharmony_ci 308893fb6ee3Sopenharmony_ci <h5 id=doctype-state>12.2.4.52 <dfn>DOCTYPE state</dfn></h5> 308993fb6ee3Sopenharmony_ci 309093fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=doctype-state:next-input-character>next input character</a>:</p> 309193fb6ee3Sopenharmony_ci 309293fb6ee3Sopenharmony_ci <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. 309393fb6ee3Sopenharmony_ci 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 309493fb6ee3Sopenharmony_ci character.</dl> 309593fb6ee3Sopenharmony_ci 309693fb6ee3Sopenharmony_ci 309793fb6ee3Sopenharmony_ci <h5 id=before-doctype-name-state>12.2.4.53 <dfn>Before DOCTYPE name state</dfn></h5> 309893fb6ee3Sopenharmony_ci 309993fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=before-doctype-name-state:next-input-character>next input character</a>:</p> 310093fb6ee3Sopenharmony_ci 310193fb6ee3Sopenharmony_ci <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 310293fb6ee3Sopenharmony_ci <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 310393fb6ee3Sopenharmony_ci <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 310493fb6ee3Sopenharmony_ci 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 310593fb6ee3Sopenharmony_ci <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. 310693fb6ee3Sopenharmony_ci 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>. 310793fb6ee3Sopenharmony_ci Switch to the <a href=#doctype-name-state id=before-doctype-name-state:doctype-name-state-3>DOCTYPE name state</a>.</dl> 310893fb6ee3Sopenharmony_ci 310993fb6ee3Sopenharmony_ci 311093fb6ee3Sopenharmony_ci <h5 id=doctype-name-state>12.2.4.54 <dfn>DOCTYPE name state</dfn></h5> 311193fb6ee3Sopenharmony_ci 311293fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=doctype-name-state:next-input-character>next input character</a>:</p> 311393fb6ee3Sopenharmony_ci 311493fb6ee3Sopenharmony_ci <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 311593fb6ee3Sopenharmony_ci 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 311693fb6ee3Sopenharmony_ci 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 311793fb6ee3Sopenharmony_ci <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> 311893fb6ee3Sopenharmony_ci 311993fb6ee3Sopenharmony_ci 312093fb6ee3Sopenharmony_ci <h5 id=after-doctype-name-state>12.2.4.55 <dfn>After DOCTYPE name state</dfn></h5> 312193fb6ee3Sopenharmony_ci 312293fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=after-doctype-name-state:next-input-character>next input character</a>:</p> 312393fb6ee3Sopenharmony_ci 312493fb6ee3Sopenharmony_ci <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 312593fb6ee3Sopenharmony_ci <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> 312693fb6ee3Sopenharmony_ci 312793fb6ee3Sopenharmony_ci <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 312893fb6ee3Sopenharmony_ci <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 312993fb6ee3Sopenharmony_ci 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> 313093fb6ee3Sopenharmony_ci 313193fb6ee3Sopenharmony_ci <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 313293fb6ee3Sopenharmony_ci 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 313393fb6ee3Sopenharmony_ci 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> 313493fb6ee3Sopenharmony_ci 313593fb6ee3Sopenharmony_ci <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> 313693fb6ee3Sopenharmony_ci 313793fb6ee3Sopenharmony_ci </dl> 313893fb6ee3Sopenharmony_ci 313993fb6ee3Sopenharmony_ci 314093fb6ee3Sopenharmony_ci <h5 id=after-doctype-public-keyword-state>12.2.4.56 <dfn>After DOCTYPE public keyword state</dfn></h5> 314193fb6ee3Sopenharmony_ci 314293fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=after-doctype-public-keyword-state:next-input-character>next input character</a>:</p> 314393fb6ee3Sopenharmony_ci 314493fb6ee3Sopenharmony_ci <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 314593fb6ee3Sopenharmony_ci 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 314693fb6ee3Sopenharmony_ci 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>. 314793fb6ee3Sopenharmony_ci 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 314893fb6ee3Sopenharmony_ci <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>. 314993fb6ee3Sopenharmony_ci Switch to the <a href=#bogus-doctype-state id=after-doctype-public-keyword-state:bogus-doctype-state>bogus DOCTYPE state</a>.</dl> 315093fb6ee3Sopenharmony_ci 315193fb6ee3Sopenharmony_ci 315293fb6ee3Sopenharmony_ci <h5 id=before-doctype-public-identifier-state>12.2.4.57 <dfn>Before DOCTYPE public identifier state</dfn></h5> 315393fb6ee3Sopenharmony_ci 315493fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=before-doctype-public-identifier-state:next-input-character>next input character</a>:</p> 315593fb6ee3Sopenharmony_ci 315693fb6ee3Sopenharmony_ci <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 315793fb6ee3Sopenharmony_ci 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 315893fb6ee3Sopenharmony_ci 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>. 315993fb6ee3Sopenharmony_ci 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 316093fb6ee3Sopenharmony_ci <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>. 316193fb6ee3Sopenharmony_ci Switch to the <a href=#bogus-doctype-state id=before-doctype-public-identifier-state:bogus-doctype-state>bogus DOCTYPE state</a>.</dl> 316293fb6ee3Sopenharmony_ci 316393fb6ee3Sopenharmony_ci 316493fb6ee3Sopenharmony_ci <h5 id=doctype-public-identifier-(double-quoted)-state>12.2.4.58 <dfn>DOCTYPE public identifier (double-quoted) state</dfn></h5> 316593fb6ee3Sopenharmony_ci 316693fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=doctype-public-identifier-(double-quoted)-state:next-input-character>next input character</a>:</p> 316793fb6ee3Sopenharmony_ci 316893fb6ee3Sopenharmony_ci <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 316993fb6ee3Sopenharmony_ci 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>. 317093fb6ee3Sopenharmony_ci 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 317193fb6ee3Sopenharmony_ci <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 317293fb6ee3Sopenharmony_ci identifier.</dl> 317393fb6ee3Sopenharmony_ci 317493fb6ee3Sopenharmony_ci 317593fb6ee3Sopenharmony_ci <h5 id=doctype-public-identifier-(single-quoted)-state>12.2.4.59 <dfn>DOCTYPE public identifier (single-quoted) state</dfn></h5> 317693fb6ee3Sopenharmony_ci 317793fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=doctype-public-identifier-(single-quoted)-state:next-input-character>next input character</a>:</p> 317893fb6ee3Sopenharmony_ci 317993fb6ee3Sopenharmony_ci <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 318093fb6ee3Sopenharmony_ci 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>. 318193fb6ee3Sopenharmony_ci 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 318293fb6ee3Sopenharmony_ci <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 318393fb6ee3Sopenharmony_ci identifier.</dl> 318493fb6ee3Sopenharmony_ci 318593fb6ee3Sopenharmony_ci 318693fb6ee3Sopenharmony_ci <h5 id=after-doctype-public-identifier-state>12.2.4.60 <dfn>After DOCTYPE public identifier state</dfn></h5> 318793fb6ee3Sopenharmony_ci 318893fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=after-doctype-public-identifier-state:next-input-character>next input character</a>:</p> 318993fb6ee3Sopenharmony_ci 319093fb6ee3Sopenharmony_ci <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 319193fb6ee3Sopenharmony_ci 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 319293fb6ee3Sopenharmony_ci 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 319393fb6ee3Sopenharmony_ci <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>. 319493fb6ee3Sopenharmony_ci Switch to the <a href=#bogus-doctype-state id=after-doctype-public-identifier-state:bogus-doctype-state>bogus DOCTYPE state</a>.</dl> 319593fb6ee3Sopenharmony_ci 319693fb6ee3Sopenharmony_ci 319793fb6ee3Sopenharmony_ci <h5 id=between-doctype-public-and-system-identifiers-state>12.2.4.61 <dfn>Between DOCTYPE public and system identifiers state</dfn></h5> 319893fb6ee3Sopenharmony_ci 319993fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=between-doctype-public-and-system-identifiers-state:next-input-character>next input character</a>:</p> 320093fb6ee3Sopenharmony_ci 320193fb6ee3Sopenharmony_ci <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 320293fb6ee3Sopenharmony_ci 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 320393fb6ee3Sopenharmony_ci 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 320493fb6ee3Sopenharmony_ci <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>. 320593fb6ee3Sopenharmony_ci Switch to the <a href=#bogus-doctype-state id=between-doctype-public-and-system-identifiers-state:bogus-doctype-state>bogus DOCTYPE state</a>.</dl> 320693fb6ee3Sopenharmony_ci 320793fb6ee3Sopenharmony_ci 320893fb6ee3Sopenharmony_ci <h5 id=after-doctype-system-keyword-state>12.2.4.62 <dfn>After DOCTYPE system keyword state</dfn></h5> 320993fb6ee3Sopenharmony_ci 321093fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=after-doctype-system-keyword-state:next-input-character>next input character</a>:</p> 321193fb6ee3Sopenharmony_ci 321293fb6ee3Sopenharmony_ci <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 321393fb6ee3Sopenharmony_ci 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 321493fb6ee3Sopenharmony_ci 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>. 321593fb6ee3Sopenharmony_ci 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 321693fb6ee3Sopenharmony_ci <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>. 321793fb6ee3Sopenharmony_ci Switch to the <a href=#bogus-doctype-state id=after-doctype-system-keyword-state:bogus-doctype-state>bogus DOCTYPE state</a>.</dl> 321893fb6ee3Sopenharmony_ci 321993fb6ee3Sopenharmony_ci 322093fb6ee3Sopenharmony_ci <h5 id=before-doctype-system-identifier-state>12.2.4.63 <dfn>Before DOCTYPE system identifier state</dfn></h5> 322193fb6ee3Sopenharmony_ci 322293fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=before-doctype-system-identifier-state:next-input-character>next input character</a>:</p> 322393fb6ee3Sopenharmony_ci 322493fb6ee3Sopenharmony_ci <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 322593fb6ee3Sopenharmony_ci 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 322693fb6ee3Sopenharmony_ci 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>. 322793fb6ee3Sopenharmony_ci 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 322893fb6ee3Sopenharmony_ci <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>. 322993fb6ee3Sopenharmony_ci Switch to the <a href=#bogus-doctype-state id=before-doctype-system-identifier-state:bogus-doctype-state>bogus DOCTYPE state</a>.</dl> 323093fb6ee3Sopenharmony_ci 323193fb6ee3Sopenharmony_ci 323293fb6ee3Sopenharmony_ci <h5 id=doctype-system-identifier-(double-quoted)-state>12.2.4.64 <dfn>DOCTYPE system identifier (double-quoted) state</dfn></h5> 323393fb6ee3Sopenharmony_ci 323493fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=doctype-system-identifier-(double-quoted)-state:next-input-character>next input character</a>:</p> 323593fb6ee3Sopenharmony_ci 323693fb6ee3Sopenharmony_ci <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 323793fb6ee3Sopenharmony_ci 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>. 323893fb6ee3Sopenharmony_ci 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 323993fb6ee3Sopenharmony_ci <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 324093fb6ee3Sopenharmony_ci identifier.</dl> 324193fb6ee3Sopenharmony_ci 324293fb6ee3Sopenharmony_ci 324393fb6ee3Sopenharmony_ci <h5 id=doctype-system-identifier-(single-quoted)-state>12.2.4.65 <dfn>DOCTYPE system identifier (single-quoted) state</dfn></h5> 324493fb6ee3Sopenharmony_ci 324593fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=doctype-system-identifier-(single-quoted)-state:next-input-character>next input character</a>:</p> 324693fb6ee3Sopenharmony_ci 324793fb6ee3Sopenharmony_ci <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 324893fb6ee3Sopenharmony_ci 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>. 324993fb6ee3Sopenharmony_ci 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 325093fb6ee3Sopenharmony_ci <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 325193fb6ee3Sopenharmony_ci identifier.</dl> 325293fb6ee3Sopenharmony_ci 325393fb6ee3Sopenharmony_ci 325493fb6ee3Sopenharmony_ci <h5 id=after-doctype-system-identifier-state>12.2.4.66 <dfn>After DOCTYPE system identifier state</dfn></h5> 325593fb6ee3Sopenharmony_ci 325693fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=after-doctype-system-identifier-state:next-input-character>next input character</a>:</p> 325793fb6ee3Sopenharmony_ci 325893fb6ee3Sopenharmony_ci <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 325993fb6ee3Sopenharmony_ci <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 326093fb6ee3Sopenharmony_ci <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> 326193fb6ee3Sopenharmony_ci 326293fb6ee3Sopenharmony_ci 326393fb6ee3Sopenharmony_ci <h5 id=bogus-doctype-state>12.2.4.67 <dfn>Bogus DOCTYPE state</dfn></h5> 326493fb6ee3Sopenharmony_ci 326593fb6ee3Sopenharmony_ci <p>Consume the <a href=#next-input-character id=bogus-doctype-state:next-input-character>next input character</a>:</p> 326693fb6ee3Sopenharmony_ci 326793fb6ee3Sopenharmony_ci <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 326893fb6ee3Sopenharmony_ci character.<dt>Anything else<dd>Ignore the character.</dl> 326993fb6ee3Sopenharmony_ci 327093fb6ee3Sopenharmony_ci 327193fb6ee3Sopenharmony_ci <h5 id=cdata-section-state>12.2.4.68 <dfn>CDATA section state</dfn></h5> 327293fb6ee3Sopenharmony_ci 327393fb6ee3Sopenharmony_ci <p>Switch to the <a href=#data-state id=cdata-section-state:data-state>data state</a>.</p> 327493fb6ee3Sopenharmony_ci 327593fb6ee3Sopenharmony_ci <p>Consume every character up to the next occurrence of the three character sequence U+005D RIGHT 327693fb6ee3Sopenharmony_ci SQUARE BRACKET U+005D RIGHT SQUARE BRACKET U+003E GREATER-THAN SIGN (<code>]]></code>), 327793fb6ee3Sopenharmony_ci or the end of the file (EOF), whichever comes first. Emit a series of character tokens consisting 327893fb6ee3Sopenharmony_ci of all the characters consumed except the matching three character sequence at the end (if one was 327993fb6ee3Sopenharmony_ci found before the end of the file).</p> 328093fb6ee3Sopenharmony_ci 328193fb6ee3Sopenharmony_ci <p>If the end of the file was reached, reconsume the EOF character.</p> 328293fb6ee3Sopenharmony_ci 328393fb6ee3Sopenharmony_ci 328493fb6ee3Sopenharmony_ci 328593fb6ee3Sopenharmony_ci <h5 id=tokenizing-character-references>12.2.4.69 Tokenizing character references</h5> 328693fb6ee3Sopenharmony_ci 328793fb6ee3Sopenharmony_ci <p>This section defines how to <dfn id=consume-a-character-reference>consume a character reference</dfn>, optionally with an 328893fb6ee3Sopenharmony_ci <dfn id=additional-allowed-character>additional allowed character</dfn>, which, if specified where the algorithm is invoked, adds 328993fb6ee3Sopenharmony_ci a character to the list of characters that cause there to not be a character reference.</p> 329093fb6ee3Sopenharmony_ci 329193fb6ee3Sopenharmony_ci <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 329293fb6ee3Sopenharmony_ci attributes</a>.</p> 329393fb6ee3Sopenharmony_ci 329493fb6ee3Sopenharmony_ci <p>The behavior depends on the identity of the next character (the one immediately after the 329593fb6ee3Sopenharmony_ci U+0026 AMPERSAND character), as follows:</p> 329693fb6ee3Sopenharmony_ci 329793fb6ee3Sopenharmony_ci <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 329893fb6ee3Sopenharmony_ci an error, either.)<dt>U+0023 NUMBER SIGN (#)<dd> 329993fb6ee3Sopenharmony_ci 330093fb6ee3Sopenharmony_ci <p>Consume the U+0023 NUMBER SIGN.</p> 330193fb6ee3Sopenharmony_ci 330293fb6ee3Sopenharmony_ci <p>The behavior further depends on the character after the U+0023 NUMBER SIGN:</p> 330393fb6ee3Sopenharmony_ci 330493fb6ee3Sopenharmony_ci <dl class=switch><dt>U+0078 LATIN SMALL LETTER X<dt>U+0058 LATIN CAPITAL LETTER X<dd> 330593fb6ee3Sopenharmony_ci 330693fb6ee3Sopenharmony_ci <p>Consume the X.</p> 330793fb6ee3Sopenharmony_ci 330893fb6ee3Sopenharmony_ci <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> 330993fb6ee3Sopenharmony_ci 331093fb6ee3Sopenharmony_ci <p>When it comes to interpreting the number, interpret it as a hexadecimal number.</p> 331193fb6ee3Sopenharmony_ci 331293fb6ee3Sopenharmony_ci <dt>Anything else<dd> 331393fb6ee3Sopenharmony_ci 331493fb6ee3Sopenharmony_ci <p>Follow the steps below, but using <a id=tokenizing-character-references:ascii-digits href=infrastructure.html#ascii-digits>ASCII digits</a>.</p> 331593fb6ee3Sopenharmony_ci 331693fb6ee3Sopenharmony_ci <p>When it comes to interpreting the number, interpret it as a decimal number.</p> 331793fb6ee3Sopenharmony_ci 331893fb6ee3Sopenharmony_ci </dl> 331993fb6ee3Sopenharmony_ci 332093fb6ee3Sopenharmony_ci <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 332193fb6ee3Sopenharmony_ci digits</a> or <a id=tokenizing-character-references:ascii-digits-2 href=infrastructure.html#ascii-digits>ASCII digits</a>).</p> 332293fb6ee3Sopenharmony_ci 332393fb6ee3Sopenharmony_ci <p>If no characters match the range, then don't consume any characters (and unconsume the U+0023 332493fb6ee3Sopenharmony_ci 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>; 332593fb6ee3Sopenharmony_ci nothing is returned.</p> 332693fb6ee3Sopenharmony_ci 332793fb6ee3Sopenharmony_ci <p>Otherwise, if the next character is a U+003B SEMICOLON, consume that too. If it isn't, there 332893fb6ee3Sopenharmony_ci is a <a href=#parse-error id=tokenizing-character-references:parse-error-2>parse error</a>.</p> 332993fb6ee3Sopenharmony_ci 333093fb6ee3Sopenharmony_ci <p>If one or more characters match the range, then take them all and interpret the string of 333193fb6ee3Sopenharmony_ci characters as a number (either hexadecimal or decimal as appropriate).</p> 333293fb6ee3Sopenharmony_ci 333393fb6ee3Sopenharmony_ci <p>If that number is one of the numbers in the first column of the following table, then this is 333493fb6ee3Sopenharmony_ci 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 333593fb6ee3Sopenharmony_ci character token for the Unicode character given in the second column of that row.</p> 333693fb6ee3Sopenharmony_ci 333793fb6ee3Sopenharmony_ci <table id=table-charref-overrides><thead><tr><th>Number <th colspan=2>Unicode character 333893fb6ee3Sopenharmony_ci <tbody><tr><td>0x00 <td>U+FFFD <td>REPLACEMENT CHARACTER 333993fb6ee3Sopenharmony_ci 334093fb6ee3Sopenharmony_ci <tr><td>0x80 <td>U+20AC <td>EURO SIGN (€) 334193fb6ee3Sopenharmony_ci 334293fb6ee3Sopenharmony_ci <tr><td>0x82 <td>U+201A <td>SINGLE LOW-9 QUOTATION MARK (‚) 334393fb6ee3Sopenharmony_ci <tr><td>0x83 <td>U+0192 <td>LATIN SMALL LETTER F WITH HOOK (ƒ) 334493fb6ee3Sopenharmony_ci <tr><td>0x84 <td>U+201E <td>DOUBLE LOW-9 QUOTATION MARK („) 334593fb6ee3Sopenharmony_ci <tr><td>0x85 <td>U+2026 <td>HORIZONTAL ELLIPSIS (…) 334693fb6ee3Sopenharmony_ci <tr><td>0x86 <td>U+2020 <td>DAGGER (†) 334793fb6ee3Sopenharmony_ci <tr><td>0x87 <td>U+2021 <td>DOUBLE DAGGER (‡) 334893fb6ee3Sopenharmony_ci <tr><td>0x88 <td>U+02C6 <td>MODIFIER LETTER CIRCUMFLEX ACCENT (ˆ) 334993fb6ee3Sopenharmony_ci <tr><td>0x89 <td>U+2030 <td>PER MILLE SIGN (‰) 335093fb6ee3Sopenharmony_ci <tr><td>0x8A <td>U+0160 <td>LATIN CAPITAL LETTER S WITH CARON (Š) 335193fb6ee3Sopenharmony_ci <tr><td>0x8B <td>U+2039 <td>SINGLE LEFT-POINTING ANGLE QUOTATION MARK (‹) 335293fb6ee3Sopenharmony_ci <tr><td>0x8C <td>U+0152 <td>LATIN CAPITAL LIGATURE OE (Œ) 335393fb6ee3Sopenharmony_ci 335493fb6ee3Sopenharmony_ci <tr><td>0x8E <td>U+017D <td>LATIN CAPITAL LETTER Z WITH CARON (Ž) 335593fb6ee3Sopenharmony_ci 335693fb6ee3Sopenharmony_ci 335793fb6ee3Sopenharmony_ci <tr><td>0x91 <td>U+2018 <td>LEFT SINGLE QUOTATION MARK (‘) 335893fb6ee3Sopenharmony_ci <tr><td>0x92 <td>U+2019 <td>RIGHT SINGLE QUOTATION MARK (’) 335993fb6ee3Sopenharmony_ci <tr><td>0x93 <td>U+201C <td>LEFT DOUBLE QUOTATION MARK (“) 336093fb6ee3Sopenharmony_ci <tr><td>0x94 <td>U+201D <td>RIGHT DOUBLE QUOTATION MARK (”) 336193fb6ee3Sopenharmony_ci <tr><td>0x95 <td>U+2022 <td>BULLET (•) 336293fb6ee3Sopenharmony_ci <tr><td>0x96 <td>U+2013 <td>EN DASH (–) 336393fb6ee3Sopenharmony_ci <tr><td>0x97 <td>U+2014 <td>EM DASH (—) 336493fb6ee3Sopenharmony_ci <tr><td>0x98 <td>U+02DC <td>SMALL TILDE (˜) 336593fb6ee3Sopenharmony_ci <tr><td>0x99 <td>U+2122 <td>TRADE MARK SIGN (™) 336693fb6ee3Sopenharmony_ci <tr><td>0x9A <td>U+0161 <td>LATIN SMALL LETTER S WITH CARON (š) 336793fb6ee3Sopenharmony_ci <tr><td>0x9B <td>U+203A <td>SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (›) 336893fb6ee3Sopenharmony_ci <tr><td>0x9C <td>U+0153 <td>LATIN SMALL LIGATURE OE (œ) 336993fb6ee3Sopenharmony_ci 337093fb6ee3Sopenharmony_ci <tr><td>0x9E <td>U+017E <td>LATIN SMALL LETTER Z WITH CARON (ž) 337193fb6ee3Sopenharmony_ci <tr><td>0x9F <td>U+0178 <td>LATIN CAPITAL LETTER Y WITH DIAERESIS (Ÿ) 337293fb6ee3Sopenharmony_ci </table> 337393fb6ee3Sopenharmony_ci 337493fb6ee3Sopenharmony_ci <p>Otherwise, if the number is in the range 0xD800 to 0xDFFF or is greater 337593fb6ee3Sopenharmony_ci 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 337693fb6ee3Sopenharmony_ci character token.</p> 337793fb6ee3Sopenharmony_ci 337893fb6ee3Sopenharmony_ci <p>Otherwise, return a character token for the Unicode character whose code point is that 337993fb6ee3Sopenharmony_ci number. 338093fb6ee3Sopenharmony_ci 338193fb6ee3Sopenharmony_ci Additionally, if the number is in the range 0x0001 to 0x0008, 0x000D to 0x001F, 0x007F to 0x009F, 0xFDD0 to 0xFDEF, or is 338293fb6ee3Sopenharmony_ci one of 0x000B, 0xFFFE, 0xFFFF, 0x1FFFE, 0x1FFFF, 0x2FFFE, 0x2FFFF, 0x3FFFE, 0x3FFFF, 0x4FFFE, 338393fb6ee3Sopenharmony_ci 0x4FFFF, 0x5FFFE, 0x5FFFF, 0x6FFFE, 0x6FFFF, 0x7FFFE, 0x7FFFF, 0x8FFFE, 0x8FFFF, 0x9FFFE, 338493fb6ee3Sopenharmony_ci 0x9FFFF, 0xAFFFE, 0xAFFFF, 0xBFFFE, 0xBFFFF, 0xCFFFE, 0xCFFFF, 0xDFFFE, 0xDFFFF, 0xEFFFE, 338593fb6ee3Sopenharmony_ci 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> 338693fb6ee3Sopenharmony_ci 338793fb6ee3Sopenharmony_ci <dt>Anything else<dd> 338893fb6ee3Sopenharmony_ci 338993fb6ee3Sopenharmony_ci <p>Consume the maximum number of characters possible, with the consumed characters matching one 339093fb6ee3Sopenharmony_ci 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 339193fb6ee3Sopenharmony_ci a <a id=tokenizing-character-references:case-sensitive href=infrastructure.html#case-sensitive>case-sensitive</a> manner).</p> 339293fb6ee3Sopenharmony_ci 339393fb6ee3Sopenharmony_ci <p>If no match can be made, then no characters are consumed, and nothing is returned. In this 339493fb6ee3Sopenharmony_ci case, if the characters after the U+0026 AMPERSAND character (&) consist of a sequence of 339593fb6ee3Sopenharmony_ci 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 339693fb6ee3Sopenharmony_ci (;), then this is a <a href=#parse-error id=tokenizing-character-references:parse-error-6>parse error</a>.</p> 339793fb6ee3Sopenharmony_ci 339893fb6ee3Sopenharmony_ci <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 339993fb6ee3Sopenharmony_ci SEMICOLON character (;), and the next character is either a U+003D EQUALS SIGN character (=) or 340093fb6ee3Sopenharmony_ci an <a href=infrastructure.html#alphanumeric-ascii-characters id=tokenizing-character-references:alphanumeric-ascii-characters-2>alphanumeric ASCII character</a>, then, for 340193fb6ee3Sopenharmony_ci historical reasons, all the characters that were matched after the U+0026 AMPERSAND character 340293fb6ee3Sopenharmony_ci (&) must be unconsumed, and nothing is returned. 340393fb6ee3Sopenharmony_ci 340493fb6ee3Sopenharmony_ci However, if this next character is in fact a U+003D EQUALS SIGN character (=), then this is a 340593fb6ee3Sopenharmony_ci <a href=#parse-error id=tokenizing-character-references:parse-error-7>parse error</a>, because some legacy user agents will 340693fb6ee3Sopenharmony_ci misinterpret the markup in those cases.</p> 340793fb6ee3Sopenharmony_ci 340893fb6ee3Sopenharmony_ci <p>Otherwise, a character reference is parsed. If the last character matched is not a U+003B 340993fb6ee3Sopenharmony_ci SEMICOLON character (;), there is a <a href=#parse-error id=tokenizing-character-references:parse-error-8>parse error</a>.</p> 341093fb6ee3Sopenharmony_ci 341193fb6ee3Sopenharmony_ci <p>Return one or two character tokens for the character(s) corresponding to the character 341293fb6ee3Sopenharmony_ci 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> 341393fb6ee3Sopenharmony_ci table).</p> 341493fb6ee3Sopenharmony_ci 341593fb6ee3Sopenharmony_ci <div class=example> 341693fb6ee3Sopenharmony_ci 341793fb6ee3Sopenharmony_ci <p>If the markup contains (not in an attribute) the string <code>I'm &notit; I 341893fb6ee3Sopenharmony_ci tell you</code>, the character reference is parsed as "not", as in, <code>I'm ¬it; 341993fb6ee3Sopenharmony_ci I tell you</code> (and this is a parse error). But if the markup was <code>I'm 342093fb6ee3Sopenharmony_ci &notin; I tell you</code>, the character reference would be parsed as "notin;", resulting 342193fb6ee3Sopenharmony_ci in <code>I'm ∉ I tell you</code> (and no parse error).</p> 342293fb6ee3Sopenharmony_ci 342393fb6ee3Sopenharmony_ci </div> 342493fb6ee3Sopenharmony_ci 342593fb6ee3Sopenharmony_ci </dl> 342693fb6ee3Sopenharmony_ci 342793fb6ee3Sopenharmony_ci 342893fb6ee3Sopenharmony_ci 342993fb6ee3Sopenharmony_ci 343093fb6ee3Sopenharmony_ci 343193fb6ee3Sopenharmony_ci 343293fb6ee3Sopenharmony_ci 343393fb6ee3Sopenharmony_ci 343493fb6ee3Sopenharmony_ci <h4 id=tree-construction>12.2.5 <dfn>Tree construction</dfn></h4> 343593fb6ee3Sopenharmony_ci 343693fb6ee3Sopenharmony_ci <p>The input to the tree construction stage is a sequence of tokens from the 343793fb6ee3Sopenharmony_ci <a href=#tokenization id=tree-construction:tokenization>tokenization</a> stage. The tree construction stage is associated with a DOM 343893fb6ee3Sopenharmony_ci <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 343993fb6ee3Sopenharmony_ci dynamically modifying or extending that document's DOM tree.</p> 344093fb6ee3Sopenharmony_ci 344193fb6ee3Sopenharmony_ci <p>This specification does not define when an interactive user agent has to render the 344293fb6ee3Sopenharmony_ci <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 344393fb6ee3Sopenharmony_ci input.</p> 344493fb6ee3Sopenharmony_ci 344593fb6ee3Sopenharmony_ci <hr> 344693fb6ee3Sopenharmony_ci 344793fb6ee3Sopenharmony_ci <p>As each token is emitted from the tokenizer, the user agent must follow the appropriate steps 344893fb6ee3Sopenharmony_ci from the following list, known as the <dfn id=tree-construction-dispatcher>tree construction dispatcher</dfn>:</p> 344993fb6ee3Sopenharmony_ci 345093fb6ee3Sopenharmony_ci <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 345193fb6ee3Sopenharmony_ci <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> 345293fb6ee3Sopenharmony_ci 345393fb6ee3Sopenharmony_ci <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 345493fb6ee3Sopenharmony_ci construction dispatcher</a> (even if the token is subsequently just ignored).</p> 345593fb6ee3Sopenharmony_ci 345693fb6ee3Sopenharmony_ci <p>A node is a <dfn id=mathml-text-integration-point>MathML text integration point</dfn> if it is one of the following 345793fb6ee3Sopenharmony_ci elements:</p> 345893fb6ee3Sopenharmony_ci 345993fb6ee3Sopenharmony_ci <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> 346093fb6ee3Sopenharmony_ci 346193fb6ee3Sopenharmony_ci <p>A node is an <dfn id=html-integration-point>HTML integration point</dfn> if it is one of the following elements:</p> 346293fb6ee3Sopenharmony_ci 346393fb6ee3Sopenharmony_ci <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 346493fb6ee3Sopenharmony_ci namespace</a> whose start tag token had an attribute with the name "encoding" whose value was 346593fb6ee3Sopenharmony_ci 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 346693fb6ee3Sopenharmony_ci namespace</a> whose start tag token had an attribute with the name "encoding" whose value was 346793fb6ee3Sopenharmony_ci 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> 346893fb6ee3Sopenharmony_ci 346993fb6ee3Sopenharmony_ci <p class=note>Not all of the tag names mentioned below are conformant tag names in this 347093fb6ee3Sopenharmony_ci specification; many are included to handle legacy content. They still form part of the algorithm 347193fb6ee3Sopenharmony_ci that implementations are required to implement to claim conformance.</p> 347293fb6ee3Sopenharmony_ci 347393fb6ee3Sopenharmony_ci <p class=note>The algorithm described below places no limit on the depth of the DOM tree 347493fb6ee3Sopenharmony_ci 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> 347593fb6ee3Sopenharmony_ci 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 347693fb6ee3Sopenharmony_ci depth constraints.</p> 347793fb6ee3Sopenharmony_ci 347893fb6ee3Sopenharmony_ci 347993fb6ee3Sopenharmony_ci <h5 id=creating-and-inserting-nodes>12.2.5.1 Creating and inserting nodes</h5> 348093fb6ee3Sopenharmony_ci 348193fb6ee3Sopenharmony_ci <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> 348293fb6ee3Sopenharmony_ci 348393fb6ee3Sopenharmony_ci <p>The <dfn id=appropriate-place-for-inserting-a-node>appropriate place for inserting a node</dfn>, optionally using a particular 348493fb6ee3Sopenharmony_ci <i>override target</i>, is the position in an element returned by running the following steps:</p> 348593fb6ee3Sopenharmony_ci 348693fb6ee3Sopenharmony_ci <ol><li> 348793fb6ee3Sopenharmony_ci 348893fb6ee3Sopenharmony_ci <p>If there was an <i>override target</i> specified, then let <var>target</var> be the 348993fb6ee3Sopenharmony_ci <i>override target</i>.</p> 349093fb6ee3Sopenharmony_ci 349193fb6ee3Sopenharmony_ci <p>Otherwise, let <var>target</var> be the <a href=#current-node id=creating-and-inserting-nodes:current-node>current node</a>.</p> 349293fb6ee3Sopenharmony_ci 349393fb6ee3Sopenharmony_ci <li> 349493fb6ee3Sopenharmony_ci 349593fb6ee3Sopenharmony_ci <p>Determine the <var>adjusted insertion location</var> using the first matching steps 349693fb6ee3Sopenharmony_ci from the following list:</p> 349793fb6ee3Sopenharmony_ci 349893fb6ee3Sopenharmony_ci <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>, 349993fb6ee3Sopenharmony_ci <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> 350093fb6ee3Sopenharmony_ci 350193fb6ee3Sopenharmony_ci <p class=note>Foster parenting happens when content is misnested in tables.</p> 350293fb6ee3Sopenharmony_ci 350393fb6ee3Sopenharmony_ci <p>Run these substeps:</p> 350493fb6ee3Sopenharmony_ci 350593fb6ee3Sopenharmony_ci <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 350693fb6ee3Sopenharmony_ci <a href=#stack-of-open-elements id=creating-and-inserting-nodes:stack-of-open-elements>stack of open elements</a>, if any.</p> 350793fb6ee3Sopenharmony_ci 350893fb6ee3Sopenharmony_ci <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 350993fb6ee3Sopenharmony_ci <a href=#stack-of-open-elements id=creating-and-inserting-nodes:stack-of-open-elements-2>stack of open elements</a>, if any.</p> 351093fb6ee3Sopenharmony_ci 351193fb6ee3Sopenharmony_ci <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 351293fb6ee3Sopenharmony_ci (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 351393fb6ee3Sopenharmony_ci 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), 351493fb6ee3Sopenharmony_ci and abort these substeps.<li><p>If there is no <var>last table</var>, then let <var>adjusted insertion 351593fb6ee3Sopenharmony_ci 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 351693fb6ee3Sopenharmony_ci <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. 351793fb6ee3Sopenharmony_ci (<a href=#fragment-case id=creating-and-inserting-nodes:fragment-case>fragment case</a>)</p> 351893fb6ee3Sopenharmony_ci 351993fb6ee3Sopenharmony_ci 352093fb6ee3Sopenharmony_ci 352193fb6ee3Sopenharmony_ci <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 352293fb6ee3Sopenharmony_ci node, immediately before <var>last table</var>, and abort these 352393fb6ee3Sopenharmony_ci 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 352493fb6ee3Sopenharmony_ci element</var>, after its last child (if any).</ol> 352593fb6ee3Sopenharmony_ci 352693fb6ee3Sopenharmony_ci <p class=note>These steps are involved in part because it's possible for elements, the 352793fb6ee3Sopenharmony_ci <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 352893fb6ee3Sopenharmony_ci in the DOM, or indeed removed from the DOM entirely, after the element was inserted by the 352993fb6ee3Sopenharmony_ci parser.</p> 353093fb6ee3Sopenharmony_ci 353193fb6ee3Sopenharmony_ci <dt>Otherwise<dd> 353293fb6ee3Sopenharmony_ci 353393fb6ee3Sopenharmony_ci <p>Let <var>adjusted insertion location</var> be inside <var>target</var>, 353493fb6ee3Sopenharmony_ci after its last child (if any).</p> 353593fb6ee3Sopenharmony_ci 353693fb6ee3Sopenharmony_ci </dl> 353793fb6ee3Sopenharmony_ci 353893fb6ee3Sopenharmony_ci <li> 353993fb6ee3Sopenharmony_ci 354093fb6ee3Sopenharmony_ci <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> 354193fb6ee3Sopenharmony_ci 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 354293fb6ee3Sopenharmony_ci contents</a>, after its last child (if any).</p> 354393fb6ee3Sopenharmony_ci 354493fb6ee3Sopenharmony_ci <li> 354593fb6ee3Sopenharmony_ci 354693fb6ee3Sopenharmony_ci <p>Return the <var>adjusted insertion location</var>.</p> 354793fb6ee3Sopenharmony_ci 354893fb6ee3Sopenharmony_ci </ol> 354993fb6ee3Sopenharmony_ci 355093fb6ee3Sopenharmony_ci <hr> 355193fb6ee3Sopenharmony_ci 355293fb6ee3Sopenharmony_ci <p>When the steps below require the UA to <dfn id=create-an-element-for-the-token>create an 355393fb6ee3Sopenharmony_ci element for a token</dfn> in a particular <var>given namespace</var> and with a 355493fb6ee3Sopenharmony_ci particular <var>intended parent</var>, the UA must run the following steps:</p> 355593fb6ee3Sopenharmony_ci 355693fb6ee3Sopenharmony_ci <ol><li> 355793fb6ee3Sopenharmony_ci 355893fb6ee3Sopenharmony_ci <p>Create a node implementing the interface appropriate for the element type corresponding to 355993fb6ee3Sopenharmony_ci the tag name of the token in <var>given namespace</var> (as given in the specification 356093fb6ee3Sopenharmony_ci 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 356193fb6ee3Sopenharmony_ci namespace</a>, this specification defines it to be the <code id=creating-and-inserting-nodes:htmlanchorelement><a href=semantics.html#htmlanchorelement>HTMLAnchorElement</a></code> 356293fb6ee3Sopenharmony_ci interface), with the tag name being the name of that element, with the node being in the given 356393fb6ee3Sopenharmony_ci namespace, and with the attributes on the node being those given in the given token.</p> 356493fb6ee3Sopenharmony_ci 356593fb6ee3Sopenharmony_ci <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 356693fb6ee3Sopenharmony_ci 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 356793fb6ee3Sopenharmony_ci <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 356893fb6ee3Sopenharmony_ci that namespace's specification must use the interface <code id=creating-and-inserting-nodes:element><a href=infrastructure.html#element>Element</a></code>.</p> 356993fb6ee3Sopenharmony_ci 357093fb6ee3Sopenharmony_ci <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 357193fb6ee3Sopenharmony_ci 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> 357293fb6ee3Sopenharmony_ci 357393fb6ee3Sopenharmony_ci <li><p>If the newly created element has an <code>xmlns</code> attribute <em>in the 357493fb6ee3Sopenharmony_ci <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, 357593fb6ee3Sopenharmony_ci 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 357693fb6ee3Sopenharmony_ci <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>, 357793fb6ee3Sopenharmony_ci 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 357893fb6ee3Sopenharmony_ci 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> 357993fb6ee3Sopenharmony_ci 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 358093fb6ee3Sopenharmony_ci <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 358193fb6ee3Sopenharmony_ci 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 358293fb6ee3Sopenharmony_ci <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 358393fb6ee3Sopenharmony_ci 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 358493fb6ee3Sopenharmony_ci the parser subsequently attempts to insert the element.<li><p>Return the newly created element.</ol> 358593fb6ee3Sopenharmony_ci 358693fb6ee3Sopenharmony_ci <hr> 358793fb6ee3Sopenharmony_ci 358893fb6ee3Sopenharmony_ci 358993fb6ee3Sopenharmony_ci 359093fb6ee3Sopenharmony_ci <p>When the steps below require the user agent to <dfn id=insert-a-foreign-element>insert a foreign element</dfn> for a token 359193fb6ee3Sopenharmony_ci in a given namespace, the user agent must run these steps:</p> 359293fb6ee3Sopenharmony_ci 359393fb6ee3Sopenharmony_ci <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 359493fb6ee3Sopenharmony_ci 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 359593fb6ee3Sopenharmony_ci parent being the element in which the <var>adjusted insertion location</var> finds 359693fb6ee3Sopenharmony_ci itself.<li> 359793fb6ee3Sopenharmony_ci 359893fb6ee3Sopenharmony_ci <p>If it is possible to insert an element at the <var>adjusted insertion 359993fb6ee3Sopenharmony_ci location</var>, then insert the newly created element at the <var>adjusted insertion 360093fb6ee3Sopenharmony_ci location</var>.</p> 360193fb6ee3Sopenharmony_ci 360293fb6ee3Sopenharmony_ci <p class=note>If the <var>adjusted insertion location</var> cannot accept more 360393fb6ee3Sopenharmony_ci 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 360493fb6ee3Sopenharmony_ci newly created element is dropped on the floor.</p> 360593fb6ee3Sopenharmony_ci 360693fb6ee3Sopenharmony_ci <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 360793fb6ee3Sopenharmony_ci <a href=#current-node id=creating-and-inserting-nodes:current-node-2>current node</a>.<li><p>Return the newly created element.</ol> 360893fb6ee3Sopenharmony_ci 360993fb6ee3Sopenharmony_ci <p>When the steps below require the user agent to <dfn id=insert-an-html-element>insert an HTML element</dfn> for a token, 361093fb6ee3Sopenharmony_ci 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 361193fb6ee3Sopenharmony_ci namespace</a>.</p> 361293fb6ee3Sopenharmony_ci 361393fb6ee3Sopenharmony_ci <hr> 361493fb6ee3Sopenharmony_ci 361593fb6ee3Sopenharmony_ci <p>When the steps below require the user agent to <dfn id=adjust-mathml-attributes>adjust MathML attributes</dfn> for a token, 361693fb6ee3Sopenharmony_ci then, if the token has an attribute named <code>definitionurl</code>, change its name to 361793fb6ee3Sopenharmony_ci <code>definitionURL</code> (note the case difference).</p> 361893fb6ee3Sopenharmony_ci 361993fb6ee3Sopenharmony_ci <p>When the steps below require the user agent to <dfn id=adjust-svg-attributes>adjust SVG attributes</dfn> for a token, 362093fb6ee3Sopenharmony_ci then, for each attribute on the token whose attribute name is one of the ones in the first column 362193fb6ee3Sopenharmony_ci of the following table, change the attribute's name to the name given in the corresponding cell in 362293fb6ee3Sopenharmony_ci the second column. (This fixes the case of SVG attributes that are not all lowercase.)</p> 362393fb6ee3Sopenharmony_ci 362493fb6ee3Sopenharmony_ci <table><thead><tr><th> Attribute name on token <th> Attribute name on element 362593fb6ee3Sopenharmony_ci <tbody><tr><td> <code>attributename</code> <td> <code>attributeName</code> 362693fb6ee3Sopenharmony_ci <tr><td> <code>attributetype</code> <td> <code>attributeType</code> 362793fb6ee3Sopenharmony_ci <tr><td> <code>basefrequency</code> <td> <code>baseFrequency</code> 362893fb6ee3Sopenharmony_ci <tr><td> <code>baseprofile</code> <td> <code>baseProfile</code> 362993fb6ee3Sopenharmony_ci <tr><td> <code>calcmode</code> <td> <code>calcMode</code> 363093fb6ee3Sopenharmony_ci <tr><td> <code>clippathunits</code> <td> <code>clipPathUnits</code> 363193fb6ee3Sopenharmony_ci <tr><td> <code>diffuseconstant</code> <td> <code>diffuseConstant</code> 363293fb6ee3Sopenharmony_ci <tr><td> <code>edgemode</code> <td> <code>edgeMode</code> 363393fb6ee3Sopenharmony_ci <tr><td> <code>filterunits</code> <td> <code>filterUnits</code> 363493fb6ee3Sopenharmony_ci <tr><td> <code>glyphref</code> <td> <code>glyphRef</code> 363593fb6ee3Sopenharmony_ci <tr><td> <code>gradienttransform</code> <td> <code>gradientTransform</code> 363693fb6ee3Sopenharmony_ci <tr><td> <code>gradientunits</code> <td> <code>gradientUnits</code> 363793fb6ee3Sopenharmony_ci <tr><td> <code>kernelmatrix</code> <td> <code>kernelMatrix</code> 363893fb6ee3Sopenharmony_ci <tr><td> <code>kernelunitlength</code> <td> <code>kernelUnitLength</code> 363993fb6ee3Sopenharmony_ci <tr><td> <code>keypoints</code> <td> <code>keyPoints</code> 364093fb6ee3Sopenharmony_ci <tr><td> <code>keysplines</code> <td> <code>keySplines</code> 364193fb6ee3Sopenharmony_ci <tr><td> <code>keytimes</code> <td> <code>keyTimes</code> 364293fb6ee3Sopenharmony_ci <tr><td> <code>lengthadjust</code> <td> <code>lengthAdjust</code> 364393fb6ee3Sopenharmony_ci <tr><td> <code>limitingconeangle</code> <td> <code>limitingConeAngle</code> 364493fb6ee3Sopenharmony_ci <tr><td> <code>markerheight</code> <td> <code>markerHeight</code> 364593fb6ee3Sopenharmony_ci <tr><td> <code>markerunits</code> <td> <code>markerUnits</code> 364693fb6ee3Sopenharmony_ci <tr><td> <code>markerwidth</code> <td> <code>markerWidth</code> 364793fb6ee3Sopenharmony_ci <tr><td> <code>maskcontentunits</code> <td> <code>maskContentUnits</code> 364893fb6ee3Sopenharmony_ci <tr><td> <code>maskunits</code> <td> <code>maskUnits</code> 364993fb6ee3Sopenharmony_ci <tr><td> <code>numoctaves</code> <td> <code>numOctaves</code> 365093fb6ee3Sopenharmony_ci <tr><td> <code>pathlength</code> <td> <code>pathLength</code> 365193fb6ee3Sopenharmony_ci <tr><td> <code>patterncontentunits</code> <td> <code>patternContentUnits</code> 365293fb6ee3Sopenharmony_ci <tr><td> <code>patterntransform</code> <td> <code>patternTransform</code> 365393fb6ee3Sopenharmony_ci <tr><td> <code>patternunits</code> <td> <code>patternUnits</code> 365493fb6ee3Sopenharmony_ci <tr><td> <code>pointsatx</code> <td> <code>pointsAtX</code> 365593fb6ee3Sopenharmony_ci <tr><td> <code>pointsaty</code> <td> <code>pointsAtY</code> 365693fb6ee3Sopenharmony_ci <tr><td> <code>pointsatz</code> <td> <code>pointsAtZ</code> 365793fb6ee3Sopenharmony_ci <tr><td> <code>preservealpha</code> <td> <code>preserveAlpha</code> 365893fb6ee3Sopenharmony_ci <tr><td> <code>preserveaspectratio</code> <td> <code>preserveAspectRatio</code> 365993fb6ee3Sopenharmony_ci <tr><td> <code>primitiveunits</code> <td> <code>primitiveUnits</code> 366093fb6ee3Sopenharmony_ci <tr><td> <code>refx</code> <td> <code>refX</code> 366193fb6ee3Sopenharmony_ci <tr><td> <code>refy</code> <td> <code>refY</code> 366293fb6ee3Sopenharmony_ci <tr><td> <code>repeatcount</code> <td> <code>repeatCount</code> 366393fb6ee3Sopenharmony_ci <tr><td> <code>repeatdur</code> <td> <code>repeatDur</code> 366493fb6ee3Sopenharmony_ci <tr><td> <code>requiredextensions</code> <td> <code>requiredExtensions</code> 366593fb6ee3Sopenharmony_ci <tr><td> <code>requiredfeatures</code> <td> <code>requiredFeatures</code> 366693fb6ee3Sopenharmony_ci <tr><td> <code>specularconstant</code> <td> <code>specularConstant</code> 366793fb6ee3Sopenharmony_ci <tr><td> <code>specularexponent</code> <td> <code>specularExponent</code> 366893fb6ee3Sopenharmony_ci <tr><td> <code>spreadmethod</code> <td> <code>spreadMethod</code> 366993fb6ee3Sopenharmony_ci <tr><td> <code>startoffset</code> <td> <code>startOffset</code> 367093fb6ee3Sopenharmony_ci <tr><td> <code>stddeviation</code> <td> <code>stdDeviation</code> 367193fb6ee3Sopenharmony_ci <tr><td> <code>stitchtiles</code> <td> <code>stitchTiles</code> 367293fb6ee3Sopenharmony_ci <tr><td> <code>surfacescale</code> <td> <code>surfaceScale</code> 367393fb6ee3Sopenharmony_ci <tr><td> <code>systemlanguage</code> <td> <code>systemLanguage</code> 367493fb6ee3Sopenharmony_ci <tr><td> <code>tablevalues</code> <td> <code>tableValues</code> 367593fb6ee3Sopenharmony_ci <tr><td> <code>targetx</code> <td> <code>targetX</code> 367693fb6ee3Sopenharmony_ci <tr><td> <code>targety</code> <td> <code>targetY</code> 367793fb6ee3Sopenharmony_ci <tr><td> <code>textlength</code> <td> <code>textLength</code> 367893fb6ee3Sopenharmony_ci <tr><td> <code>viewbox</code> <td> <code>viewBox</code> 367993fb6ee3Sopenharmony_ci <tr><td> <code>viewtarget</code> <td> <code>viewTarget</code> 368093fb6ee3Sopenharmony_ci <tr><td> <code>xchannelselector</code> <td> <code>xChannelSelector</code> 368193fb6ee3Sopenharmony_ci <tr><td> <code>ychannelselector</code> <td> <code>yChannelSelector</code> 368293fb6ee3Sopenharmony_ci <tr><td> <code>zoomandpan</code> <td> <code>zoomAndPan</code> 368393fb6ee3Sopenharmony_ci </table> 368493fb6ee3Sopenharmony_ci 368593fb6ee3Sopenharmony_ci <p>When the steps below require the user agent to <dfn id=adjust-foreign-attributes>adjust foreign attributes</dfn> for a 368693fb6ee3Sopenharmony_ci token, then, if any of the attributes on the token match the strings given in the first column of 368793fb6ee3Sopenharmony_ci the following table, let the attribute be a namespaced attribute, with the prefix being the string 368893fb6ee3Sopenharmony_ci given in the corresponding cell in the second column, the local name being the string given in the 368993fb6ee3Sopenharmony_ci corresponding cell in the third column, and the namespace being the namespace given in the 369093fb6ee3Sopenharmony_ci corresponding cell in the fourth column. (This fixes the use of namespaced attributes, in 369193fb6ee3Sopenharmony_ci particular <a href=dom.html#attr-xml-lang id=creating-and-inserting-nodes:attr-xml-lang><code>lang</code> attributes in the <span>XML 369293fb6ee3Sopenharmony_ci namespace</span></a>.)</p> 369393fb6ee3Sopenharmony_ci 369493fb6ee3Sopenharmony_ci <table><thead><tr><th> Attribute name <th> Prefix <th> Local name <th> Namespace 369593fb6ee3Sopenharmony_ci <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> 369693fb6ee3Sopenharmony_ci <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> 369793fb6ee3Sopenharmony_ci <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> 369893fb6ee3Sopenharmony_ci <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> 369993fb6ee3Sopenharmony_ci <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> 370093fb6ee3Sopenharmony_ci <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> 370193fb6ee3Sopenharmony_ci <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> 370293fb6ee3Sopenharmony_ci <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> 370393fb6ee3Sopenharmony_ci <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> 370493fb6ee3Sopenharmony_ci <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> 370593fb6ee3Sopenharmony_ci <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> 370693fb6ee3Sopenharmony_ci <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> 370793fb6ee3Sopenharmony_ci </table> 370893fb6ee3Sopenharmony_ci 370993fb6ee3Sopenharmony_ci <hr> 371093fb6ee3Sopenharmony_ci 371193fb6ee3Sopenharmony_ci <p>When the steps below require the user agent to <dfn id=insert-a-character>insert a character</dfn> while processing a 371293fb6ee3Sopenharmony_ci token, the user agent must run the following steps:</p> 371393fb6ee3Sopenharmony_ci 371493fb6ee3Sopenharmony_ci <ol><li><p>Let <var>data</var> be the characters passed to the algorithm, or, if no 371593fb6ee3Sopenharmony_ci characters were explicitly specified, the character of the character token being 371693fb6ee3Sopenharmony_ci 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 371793fb6ee3Sopenharmony_ci place for inserting a node</a>.<li> 371893fb6ee3Sopenharmony_ci 371993fb6ee3Sopenharmony_ci <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, 372093fb6ee3Sopenharmony_ci then abort these steps. 372193fb6ee3Sopenharmony_ci 372293fb6ee3Sopenharmony_ci <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 372393fb6ee3Sopenharmony_ci children, so they are dropped on the floor.</p> 372493fb6ee3Sopenharmony_ci 372593fb6ee3Sopenharmony_ci <li> 372693fb6ee3Sopenharmony_ci 372793fb6ee3Sopenharmony_ci <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 372893fb6ee3Sopenharmony_ci 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> 372993fb6ee3Sopenharmony_ci 373093fb6ee3Sopenharmony_ci <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 373193fb6ee3Sopenharmony_ci 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 373293fb6ee3Sopenharmony_ci element in which the <var>adjusted insertion location</var> finds itself, and insert 373393fb6ee3Sopenharmony_ci the newly created node at the <var>adjusted insertion location</var>.</p> 373493fb6ee3Sopenharmony_ci 373593fb6ee3Sopenharmony_ci </ol> 373693fb6ee3Sopenharmony_ci 373793fb6ee3Sopenharmony_ci <div class=example> 373893fb6ee3Sopenharmony_ci 373993fb6ee3Sopenharmony_ci <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> 374093fb6ee3Sopenharmony_ci nodes that they result in, assuming a user agent that executes scripts.</p> 374193fb6ee3Sopenharmony_ci 374293fb6ee3Sopenharmony_ci <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 374393fb6ee3Sopenharmony_ci <tbody><tr><td><pre>A<script> 374493fb6ee3Sopenharmony_civar script = document.getElementsByTagName('script')[0]; 374593fb6ee3Sopenharmony_cidocument.body.removeChild(script); 374693fb6ee3Sopenharmony_ci</script>B</pre> 374793fb6ee3Sopenharmony_ci <td>One <code id=creating-and-inserting-nodes:text-7><a href=infrastructure.html#text>Text</a></code> node in the document, containing "AB". 374893fb6ee3Sopenharmony_ci <tr><td><pre>A<script> 374993fb6ee3Sopenharmony_civar text = document.createTextNode('B'); 375093fb6ee3Sopenharmony_cidocument.body.appendChild(text); 375193fb6ee3Sopenharmony_ci</script>C</pre> 375293fb6ee3Sopenharmony_ci <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). 375393fb6ee3Sopenharmony_ci <tr><td><pre>A<script> 375493fb6ee3Sopenharmony_civar text = document.getElementsByTagName('script')[0].firstChild; 375593fb6ee3Sopenharmony_citext.data = 'B'; 375693fb6ee3Sopenharmony_cidocument.body.appendChild(text); 375793fb6ee3Sopenharmony_ci</script>C</pre> 375893fb6ee3Sopenharmony_ci <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". 375993fb6ee3Sopenharmony_ci <tr><td><pre>A<table>B<tr>C</tr>D</table></pre> 376093fb6ee3Sopenharmony_ci <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>.) 376193fb6ee3Sopenharmony_ci <tr><td><pre>A<table><tr> B</tr> C</table></pre> 376293fb6ee3Sopenharmony_ci <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>.) 376393fb6ee3Sopenharmony_ci <tr><td><pre>A<table><tr> B</tr> </em>C</table></pre> 376493fb6ee3Sopenharmony_ci <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.) 376593fb6ee3Sopenharmony_ci </table> 376693fb6ee3Sopenharmony_ci 376793fb6ee3Sopenharmony_ci </div> 376893fb6ee3Sopenharmony_ci 376993fb6ee3Sopenharmony_ci <hr> 377093fb6ee3Sopenharmony_ci 377193fb6ee3Sopenharmony_ci <p>When the steps below require the user agent to <dfn id=insert-a-comment>insert a comment</dfn> while processing a 377293fb6ee3Sopenharmony_ci comment token, optionally with an explicitly insertion position <var>position</var>, the 377393fb6ee3Sopenharmony_ci user agent must run the following steps:</p> 377493fb6ee3Sopenharmony_ci 377593fb6ee3Sopenharmony_ci <ol><li><p>Let <var>data</var> be the data given in the comment token being 377693fb6ee3Sopenharmony_ci processed.<li><p>If <var>position</var> was specified, then let the <var>adjusted 377793fb6ee3Sopenharmony_ci insertion location</var> be <var>position</var>. Otherwise, let <var>adjusted 377893fb6ee3Sopenharmony_ci 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 377993fb6ee3Sopenharmony_ci <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 378093fb6ee3Sopenharmony_ci the same as that of the node in which the <var>adjusted insertion location</var> finds 378193fb6ee3Sopenharmony_ci itself.</p> 378293fb6ee3Sopenharmony_ci 378393fb6ee3Sopenharmony_ci <li><p>Insert the newly created node at the <var>adjusted insertion 378493fb6ee3Sopenharmony_ci location</var>.</ol> 378593fb6ee3Sopenharmony_ci 378693fb6ee3Sopenharmony_ci <hr> 378793fb6ee3Sopenharmony_ci 378893fb6ee3Sopenharmony_ci <p id=mutation-during-parsing>DOM mutation events must not fire for changes caused by the UA 378993fb6ee3Sopenharmony_ci 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> 379093fb6ee3Sopenharmony_ci 379193fb6ee3Sopenharmony_ci <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> 379293fb6ee3Sopenharmony_ci 379393fb6ee3Sopenharmony_ci 379493fb6ee3Sopenharmony_ci 379593fb6ee3Sopenharmony_ci <h5 id=parsing-elements-that-contain-only-text>12.2.5.2 Parsing elements that contain only text</h5> 379693fb6ee3Sopenharmony_ci 379793fb6ee3Sopenharmony_ci <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 379893fb6ee3Sopenharmony_ci parsing algorithm</dfn> consist of the following steps. These algorithms are always invoked in 379993fb6ee3Sopenharmony_ci response to a start tag token.</p> 380093fb6ee3Sopenharmony_ci 380193fb6ee3Sopenharmony_ci <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 380293fb6ee3Sopenharmony_ci 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 380393fb6ee3Sopenharmony_ci 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 380493fb6ee3Sopenharmony_ci 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 380593fb6ee3Sopenharmony_ci mode</a>.</p> 380693fb6ee3Sopenharmony_ci 380793fb6ee3Sopenharmony_ci <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> 380893fb6ee3Sopenharmony_ci 380993fb6ee3Sopenharmony_ci 381093fb6ee3Sopenharmony_ci <h5 id=closing-elements-that-have-implied-end-tags>12.2.5.3 Closing elements that have implied end tags</h5> 381193fb6ee3Sopenharmony_ci 381293fb6ee3Sopenharmony_ci <p>When the steps below require the UA to <dfn id=generate-implied-end-tags>generate implied end tags</dfn>, then, while the 381393fb6ee3Sopenharmony_ci <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 381493fb6ee3Sopenharmony_ci <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 381593fb6ee3Sopenharmony_ci <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 381693fb6ee3Sopenharmony_ci 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> 381793fb6ee3Sopenharmony_ci 381893fb6ee3Sopenharmony_ci <p>If a step requires the UA to generate implied end tags but lists an element to exclude from the 381993fb6ee3Sopenharmony_ci process, then the UA must perform the above steps as if that element was not in the above 382093fb6ee3Sopenharmony_ci list.</p> 382193fb6ee3Sopenharmony_ci 382293fb6ee3Sopenharmony_ci <p>When the steps below require the UA to <dfn id=generate-all-implied-end-tags-thoroughly>generate all implied end tags thoroughly</dfn>, 382393fb6ee3Sopenharmony_ci 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 382493fb6ee3Sopenharmony_ci <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 382593fb6ee3Sopenharmony_ci <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 382693fb6ee3Sopenharmony_ci <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 382793fb6ee3Sopenharmony_ci <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 382893fb6ee3Sopenharmony_ci <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 382993fb6ee3Sopenharmony_ci 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> 383093fb6ee3Sopenharmony_ci 383193fb6ee3Sopenharmony_ci 383293fb6ee3Sopenharmony_ci 383393fb6ee3Sopenharmony_ci <h5 id=parsing-main-inhtml>12.2.5.4 The rules for parsing tokens in HTML content</h5> 383493fb6ee3Sopenharmony_ci 383593fb6ee3Sopenharmony_ci 383693fb6ee3Sopenharmony_ci <h6 id=the-initial-insertion-mode>12.2.5.4.1 The "<dfn>initial</dfn>" insertion mode</h6> 383793fb6ee3Sopenharmony_ci 383893fb6ee3Sopenharmony_ci <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 383993fb6ee3Sopenharmony_ci follows:</p> 384093fb6ee3Sopenharmony_ci 384193fb6ee3Sopenharmony_ci <dl class=switch><dt>A character token that is one of U+0009 CHARACTER 384293fb6ee3Sopenharmony_ci TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF), 384393fb6ee3Sopenharmony_ci U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dd> 384493fb6ee3Sopenharmony_ci <p>Ignore the token.</p> 384593fb6ee3Sopenharmony_ci <dt>A comment token<dd> 384693fb6ee3Sopenharmony_ci <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> 384793fb6ee3Sopenharmony_ci <dt>A DOCTYPE token<dd> 384893fb6ee3Sopenharmony_ci 384993fb6ee3Sopenharmony_ci <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 385093fb6ee3Sopenharmony_ci 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 385193fb6ee3Sopenharmony_ci "<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 385293fb6ee3Sopenharmony_ci matched, then there is a <a href=#parse-error id=the-initial-insertion-mode:parse-error>parse error</a>.</p> 385393fb6ee3Sopenharmony_ci 385493fb6ee3Sopenharmony_ci <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 385593fb6ee3Sopenharmony_ci "<code>-//W3C//DTD HTML 4.0//EN</code>", and the token's system identifier 385693fb6ee3Sopenharmony_ci 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 385793fb6ee3Sopenharmony_ci "<code>-//W3C//DTD HTML 4.01//EN</code>", and the token's system identifier 385893fb6ee3Sopenharmony_ci 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 385993fb6ee3Sopenharmony_ci "<code>-//W3C//DTD XHTML 1.0 Strict//EN</code>", and the token's system 386093fb6ee3Sopenharmony_ci 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 386193fb6ee3Sopenharmony_ci "<code>-//W3C//DTD XHTML 1.1//EN</code>", and the token's system identifier 386293fb6ee3Sopenharmony_ci 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> 386393fb6ee3Sopenharmony_ci 386493fb6ee3Sopenharmony_ci <p>Conformance checkers may, based on the values (including presence or lack thereof) of the 386593fb6ee3Sopenharmony_ci DOCTYPE token's name, public identifier, or system identifier, switch to a conformance checking 386693fb6ee3Sopenharmony_ci mode for another language (e.g. based on the DOCTYPE token a conformance checker could recognise 386793fb6ee3Sopenharmony_ci that the document is an HTML4-era document, and defer to an HTML4 conformance checker.)</p> 386893fb6ee3Sopenharmony_ci 386993fb6ee3Sopenharmony_ci <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 387093fb6ee3Sopenharmony_ci if the name was missing; the <code>publicId</code> attribute set to the public 387193fb6ee3Sopenharmony_ci identifier given in the DOCTYPE token, or the empty string if the public identifier was missing; 387293fb6ee3Sopenharmony_ci the <code>systemId</code> attribute set to the system identifier given in the DOCTYPE 387393fb6ee3Sopenharmony_ci token, or the empty string if the system identifier was missing; and the other attributes 387493fb6ee3Sopenharmony_ci 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. 387593fb6ee3Sopenharmony_ci 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 387693fb6ee3Sopenharmony_ci returned as the value of the <code>doctype</code> attribute of the 387793fb6ee3Sopenharmony_ci <code id=the-initial-insertion-mode:document-4><a href=dom.html#document>Document</a></code> object.</p> 387893fb6ee3Sopenharmony_ci 387993fb6ee3Sopenharmony_ci <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> 388093fb6ee3Sopenharmony_ci <code>srcdoc</code> document</a>, and the DOCTYPE token matches 388193fb6ee3Sopenharmony_ci 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 388293fb6ee3Sopenharmony_ci mode</a>:</p> 388393fb6ee3Sopenharmony_ci 388493fb6ee3Sopenharmony_ci <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> 388593fb6ee3Sopenharmony_ci 388693fb6ee3Sopenharmony_ci <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 388793fb6ee3Sopenharmony_ci 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 388893fb6ee3Sopenharmony_ci mode</a>:</p> 388993fb6ee3Sopenharmony_ci 389093fb6ee3Sopenharmony_ci <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> 389193fb6ee3Sopenharmony_ci 389293fb6ee3Sopenharmony_ci <p>The system identifier and public identifier strings must be compared to the values given in 389393fb6ee3Sopenharmony_ci 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 389493fb6ee3Sopenharmony_ci value is the empty string is not considered missing for the purposes of the conditions 389593fb6ee3Sopenharmony_ci above.</p> 389693fb6ee3Sopenharmony_ci 389793fb6ee3Sopenharmony_ci <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> 389893fb6ee3Sopenharmony_ci 389993fb6ee3Sopenharmony_ci <dt>Anything else<dd> 390093fb6ee3Sopenharmony_ci 390193fb6ee3Sopenharmony_ci <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 390293fb6ee3Sopenharmony_ci 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> 390393fb6ee3Sopenharmony_ci 390493fb6ee3Sopenharmony_ci <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> 390593fb6ee3Sopenharmony_ci 390693fb6ee3Sopenharmony_ci </dl> 390793fb6ee3Sopenharmony_ci 390893fb6ee3Sopenharmony_ci 390993fb6ee3Sopenharmony_ci <h6 id=the-before-html-insertion-mode>12.2.5.4.2 The "<dfn>before html</dfn>" insertion mode</h6> 391093fb6ee3Sopenharmony_ci 391193fb6ee3Sopenharmony_ci <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 391293fb6ee3Sopenharmony_ci follows:</p> 391393fb6ee3Sopenharmony_ci 391493fb6ee3Sopenharmony_ci <dl class=switch><dt>A DOCTYPE token<dd> 391593fb6ee3Sopenharmony_ci <p><a href=#parse-error id=the-before-html-insertion-mode:parse-error>Parse error</a>. Ignore the token.</p> 391693fb6ee3Sopenharmony_ci <dt>A comment token<dd> 391793fb6ee3Sopenharmony_ci <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> 391893fb6ee3Sopenharmony_ci <dt>A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C 391993fb6ee3Sopenharmony_ci FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dd> 392093fb6ee3Sopenharmony_ci <p>Ignore the token.</p> 392193fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "html"<dd> 392293fb6ee3Sopenharmony_ci 392393fb6ee3Sopenharmony_ci <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 392493fb6ee3Sopenharmony_ci <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 392593fb6ee3Sopenharmony_ci 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> 392693fb6ee3Sopenharmony_ci 392793fb6ee3Sopenharmony_ci <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 392893fb6ee3Sopenharmony_ci 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 392993fb6ee3Sopenharmony_ci 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 393093fb6ee3Sopenharmony_ci 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 393193fb6ee3Sopenharmony_ci successful, run the <a href=browsers.html#concept-appcache-init id=the-before-html-insertion-mode:concept-appcache-init>application cache selection 393293fb6ee3Sopenharmony_ci 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 393393fb6ee3Sopenharmony_ci 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 393493fb6ee3Sopenharmony_ci fragment flag</i> set; otherwise, if there is no such attribute, or its value is the empty 393593fb6ee3Sopenharmony_ci 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 393693fb6ee3Sopenharmony_ci cache selection algorithm</a> with no manifest. The algorithm must be passed the 393793fb6ee3Sopenharmony_ci <code id=the-before-html-insertion-mode:document-5><a href=dom.html#document>Document</a></code> object.</p> 393893fb6ee3Sopenharmony_ci 393993fb6ee3Sopenharmony_ci <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 394093fb6ee3Sopenharmony_ci head</a>".</p> 394193fb6ee3Sopenharmony_ci 394293fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is one of: "head", "body", "html", "br"<dd> 394393fb6ee3Sopenharmony_ci <p>Act as described in the "anything else" entry below.</p> 394493fb6ee3Sopenharmony_ci <dt>Any other end tag<dd> 394593fb6ee3Sopenharmony_ci <p><a href=#parse-error id=the-before-html-insertion-mode:parse-error-2>Parse error</a>. Ignore the token.</p> 394693fb6ee3Sopenharmony_ci <dt>Anything else<dd> 394793fb6ee3Sopenharmony_ci 394893fb6ee3Sopenharmony_ci <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 394993fb6ee3Sopenharmony_ci 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 395093fb6ee3Sopenharmony_ci elements</a>.</p> 395193fb6ee3Sopenharmony_ci 395293fb6ee3Sopenharmony_ci <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, 395393fb6ee3Sopenharmony_ci passing it the <code id=the-before-html-insertion-mode:document-9><a href=dom.html#document>Document</a></code> object.</p> 395493fb6ee3Sopenharmony_ci 395593fb6ee3Sopenharmony_ci <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 395693fb6ee3Sopenharmony_ci head</a>", then reprocess the token.</p> 395793fb6ee3Sopenharmony_ci 395893fb6ee3Sopenharmony_ci </dl> 395993fb6ee3Sopenharmony_ci 396093fb6ee3Sopenharmony_ci <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 396193fb6ee3Sopenharmony_ci scripts; nothing in particular happens in such cases, content continues being appended to the 396293fb6ee3Sopenharmony_ci nodes as described in the next section.</p> 396393fb6ee3Sopenharmony_ci 396493fb6ee3Sopenharmony_ci 396593fb6ee3Sopenharmony_ci <h6 id=the-before-head-insertion-mode>12.2.5.4.3 The "<dfn>before head</dfn>" insertion mode</h6> 396693fb6ee3Sopenharmony_ci 396793fb6ee3Sopenharmony_ci <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 396893fb6ee3Sopenharmony_ci follows:</p> 396993fb6ee3Sopenharmony_ci 397093fb6ee3Sopenharmony_ci <dl class=switch><dt>A character token that is one of U+0009 CHARACTER 397193fb6ee3Sopenharmony_ci TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF), 397293fb6ee3Sopenharmony_ci U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dd> 397393fb6ee3Sopenharmony_ci <p>Ignore the token.</p> 397493fb6ee3Sopenharmony_ci <dt>A comment token<dd> 397593fb6ee3Sopenharmony_ci <p><a href=#insert-a-comment id=the-before-head-insertion-mode:insert-a-comment>Insert a comment</a>.</p> 397693fb6ee3Sopenharmony_ci <dt>A DOCTYPE token<dd> 397793fb6ee3Sopenharmony_ci <p><a href=#parse-error id=the-before-head-insertion-mode:parse-error>Parse error</a>. Ignore the token.</p> 397893fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "html"<dd> 397993fb6ee3Sopenharmony_ci <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> 398093fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "head"<dd> 398193fb6ee3Sopenharmony_ci 398293fb6ee3Sopenharmony_ci <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> 398393fb6ee3Sopenharmony_ci 398493fb6ee3Sopenharmony_ci <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 398593fb6ee3Sopenharmony_ci <code id=the-before-head-insertion-mode:the-head-element><a href=semantics.html#the-head-element>head</a></code> element.</p> 398693fb6ee3Sopenharmony_ci 398793fb6ee3Sopenharmony_ci <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 398893fb6ee3Sopenharmony_ci head</a>".</p> 398993fb6ee3Sopenharmony_ci 399093fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is one of: "head", "body", "html", "br"<dd> 399193fb6ee3Sopenharmony_ci 399293fb6ee3Sopenharmony_ci <p>Act as described in the "anything else" entry below.</p> 399393fb6ee3Sopenharmony_ci 399493fb6ee3Sopenharmony_ci <dt>Any other end tag<dd> 399593fb6ee3Sopenharmony_ci 399693fb6ee3Sopenharmony_ci <p><a href=#parse-error id=the-before-head-insertion-mode:parse-error-2>Parse error</a>. Ignore the token.</p> 399793fb6ee3Sopenharmony_ci 399893fb6ee3Sopenharmony_ci <dt>Anything else<dd> 399993fb6ee3Sopenharmony_ci 400093fb6ee3Sopenharmony_ci 400193fb6ee3Sopenharmony_ci 400293fb6ee3Sopenharmony_ci <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> 400393fb6ee3Sopenharmony_ci 400493fb6ee3Sopenharmony_ci <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 400593fb6ee3Sopenharmony_ci <code id=the-before-head-insertion-mode:the-head-element-2><a href=semantics.html#the-head-element>head</a></code> element.</p> 400693fb6ee3Sopenharmony_ci 400793fb6ee3Sopenharmony_ci <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 400893fb6ee3Sopenharmony_ci head</a>".</p> 400993fb6ee3Sopenharmony_ci 401093fb6ee3Sopenharmony_ci 401193fb6ee3Sopenharmony_ci 401293fb6ee3Sopenharmony_ci <p>Reprocess the current token.</p> 401393fb6ee3Sopenharmony_ci 401493fb6ee3Sopenharmony_ci </dl> 401593fb6ee3Sopenharmony_ci 401693fb6ee3Sopenharmony_ci 401793fb6ee3Sopenharmony_ci <h6 id=parsing-main-inhead>12.2.5.4.4 The "<dfn>in head</dfn>" insertion mode</h6> 401893fb6ee3Sopenharmony_ci 401993fb6ee3Sopenharmony_ci <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 402093fb6ee3Sopenharmony_ci 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> 402193fb6ee3Sopenharmony_ci 402293fb6ee3Sopenharmony_ci <dl class=switch><dt>A character token that is one of U+0009 CHARACTER 402393fb6ee3Sopenharmony_ci TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF), 402493fb6ee3Sopenharmony_ci U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dd> 402593fb6ee3Sopenharmony_ci <p><a href=#insert-a-character id=parsing-main-inhead:insert-a-character>Insert the character</a>.</p> 402693fb6ee3Sopenharmony_ci <dt>A comment token<dd> 402793fb6ee3Sopenharmony_ci <p><a href=#insert-a-comment id=parsing-main-inhead:insert-a-comment>Insert a comment</a>.</p> 402893fb6ee3Sopenharmony_ci <dt>A DOCTYPE token<dd> 402993fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-inhead:parse-error>Parse error</a>. Ignore the token.</p> 403093fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "html"<dd> 403193fb6ee3Sopenharmony_ci <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> 403293fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is one of: "base", "basefont", 403393fb6ee3Sopenharmony_ci "bgsound", "link"<dd> 403493fb6ee3Sopenharmony_ci 403593fb6ee3Sopenharmony_ci <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 403693fb6ee3Sopenharmony_ci node</a> off the <a href=#stack-of-open-elements id=parsing-main-inhead:stack-of-open-elements>stack of open elements</a>.</p> 403793fb6ee3Sopenharmony_ci 403893fb6ee3Sopenharmony_ci <p><a href=#acknowledge-self-closing-flag id=parsing-main-inhead:acknowledge-self-closing-flag>Acknowledge the token's <i>self-closing 403993fb6ee3Sopenharmony_ci flag</i></a>, if it is set.</p> 404093fb6ee3Sopenharmony_ci 404193fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "meta"<dd> 404293fb6ee3Sopenharmony_ci 404393fb6ee3Sopenharmony_ci <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 404493fb6ee3Sopenharmony_ci 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> 404593fb6ee3Sopenharmony_ci 404693fb6ee3Sopenharmony_ci <p><a href=#acknowledge-self-closing-flag id=parsing-main-inhead:acknowledge-self-closing-flag-2>Acknowledge the token's <i>self-closing 404793fb6ee3Sopenharmony_ci flag</i></a>, if it is set.</p> 404893fb6ee3Sopenharmony_ci 404993fb6ee3Sopenharmony_ci <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 405093fb6ee3Sopenharmony_ci 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 405193fb6ee3Sopenharmony_ci UTF-16 encoding</a>, and the <a href=#concept-encoding-confidence id=parsing-main-inhead:concept-encoding-confidence>confidence</a> is 405293fb6ee3Sopenharmony_ci 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> 405393fb6ee3Sopenharmony_ci 405493fb6ee3Sopenharmony_ci <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> 405593fb6ee3Sopenharmony_ci 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 405693fb6ee3Sopenharmony_ci extracting a character encoding from a <code>meta</code> element</a> to that attribute's 405793fb6ee3Sopenharmony_ci 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 405893fb6ee3Sopenharmony_ci encoding</a>, and the <a href=#concept-encoding-confidence id=parsing-main-inhead:concept-encoding-confidence-2>confidence</a> is 405993fb6ee3Sopenharmony_ci 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> 406093fb6ee3Sopenharmony_ci 406193fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "title"<dd> 406293fb6ee3Sopenharmony_ci <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> 406393fb6ee3Sopenharmony_ci <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> 406493fb6ee3Sopenharmony_ci <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> 406593fb6ee3Sopenharmony_ci <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> 406693fb6ee3Sopenharmony_ci 406793fb6ee3Sopenharmony_ci <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> 406893fb6ee3Sopenharmony_ci 406993fb6ee3Sopenharmony_ci <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 407093fb6ee3Sopenharmony_ci head noscript</a>".</p> 407193fb6ee3Sopenharmony_ci 407293fb6ee3Sopenharmony_ci <dt id=scriptTag>A start tag whose tag name is "script"<dd> 407393fb6ee3Sopenharmony_ci 407493fb6ee3Sopenharmony_ci <p>Run these steps:</p> 407593fb6ee3Sopenharmony_ci 407693fb6ee3Sopenharmony_ci <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 407793fb6ee3Sopenharmony_ci 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 407893fb6ee3Sopenharmony_ci the intended parent being the element in which the <var>adjusted insertion 407993fb6ee3Sopenharmony_ci location</var> finds itself.<li> 408093fb6ee3Sopenharmony_ci 408193fb6ee3Sopenharmony_ci <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 408293fb6ee3Sopenharmony_ci <a id=parsing-main-inhead:non-blocking href=scripting.html#non-blocking>"non-blocking"</a> flag.</p> 408393fb6ee3Sopenharmony_ci 408493fb6ee3Sopenharmony_ci <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, 408593fb6ee3Sopenharmony_ci instead of blowing the document away, as would happen in most other cases. It also prevents 408693fb6ee3Sopenharmony_ci the script from executing until the end tag is seen.</p> 408793fb6ee3Sopenharmony_ci 408893fb6ee3Sopenharmony_ci <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 408993fb6ee3Sopenharmony_ci 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>. 409093fb6ee3Sopenharmony_ci (<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 409193fb6ee3Sopenharmony_ci 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 409293fb6ee3Sopenharmony_ci <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 409393fb6ee3Sopenharmony_ci mode</a>.</p> 409493fb6ee3Sopenharmony_ci 409593fb6ee3Sopenharmony_ci <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> 409693fb6ee3Sopenharmony_ci 409793fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is "head"<dd> 409893fb6ee3Sopenharmony_ci 409993fb6ee3Sopenharmony_ci <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 410093fb6ee3Sopenharmony_ci <a href=#stack-of-open-elements id=parsing-main-inhead:stack-of-open-elements-4>stack of open elements</a>.</p> 410193fb6ee3Sopenharmony_ci 410293fb6ee3Sopenharmony_ci <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 410393fb6ee3Sopenharmony_ci head</a>".</p> 410493fb6ee3Sopenharmony_ci 410593fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is one of: "body", "html", "br"<dd> 410693fb6ee3Sopenharmony_ci <p>Act as described in the "anything else" entry below.</p> 410793fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "template"<dd> 410893fb6ee3Sopenharmony_ci 410993fb6ee3Sopenharmony_ci <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> 411093fb6ee3Sopenharmony_ci 411193fb6ee3Sopenharmony_ci <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 411293fb6ee3Sopenharmony_ci active formatting elements</a>.</p> 411393fb6ee3Sopenharmony_ci 411493fb6ee3Sopenharmony_ci <p>Set the <a href=#frameset-ok-flag id=parsing-main-inhead:frameset-ok-flag>frameset-ok flag</a> to "not ok".</p> 411593fb6ee3Sopenharmony_ci 411693fb6ee3Sopenharmony_ci <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 411793fb6ee3Sopenharmony_ci template</a>".</p> 411893fb6ee3Sopenharmony_ci 411993fb6ee3Sopenharmony_ci <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 412093fb6ee3Sopenharmony_ci 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 412193fb6ee3Sopenharmony_ci mode</a>.</p> 412293fb6ee3Sopenharmony_ci 412393fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is "template"<dd> 412493fb6ee3Sopenharmony_ci 412593fb6ee3Sopenharmony_ci <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 412693fb6ee3Sopenharmony_ci this is a <a href=#parse-error id=parsing-main-inhead:parse-error-2>parse error</a>; ignore the token.</p> 412793fb6ee3Sopenharmony_ci 412893fb6ee3Sopenharmony_ci <p>Otherwise, run these steps:</p> 412993fb6ee3Sopenharmony_ci 413093fb6ee3Sopenharmony_ci <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 413193fb6ee3Sopenharmony_ci <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> 413293fb6ee3Sopenharmony_ci 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 413393fb6ee3Sopenharmony_ci insertion modes</a>.</p> 413493fb6ee3Sopenharmony_ci 413593fb6ee3Sopenharmony_ci <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> 413693fb6ee3Sopenharmony_ci 413793fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "head"<dt>Any other end tag<dd> 413893fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-inhead:parse-error-4>Parse error</a>. Ignore the token.</p> 413993fb6ee3Sopenharmony_ci <dt>Anything else<dd> 414093fb6ee3Sopenharmony_ci 414193fb6ee3Sopenharmony_ci 414293fb6ee3Sopenharmony_ci 414393fb6ee3Sopenharmony_ci 414493fb6ee3Sopenharmony_ci <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 414593fb6ee3Sopenharmony_ci <a href=#stack-of-open-elements id=parsing-main-inhead:stack-of-open-elements-7>stack of open elements</a>.</p> 414693fb6ee3Sopenharmony_ci 414793fb6ee3Sopenharmony_ci <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 414893fb6ee3Sopenharmony_ci head</a>".</p> 414993fb6ee3Sopenharmony_ci 415093fb6ee3Sopenharmony_ci 415193fb6ee3Sopenharmony_ci <p>Reprocess the token.</p> 415293fb6ee3Sopenharmony_ci 415393fb6ee3Sopenharmony_ci </dl> 415493fb6ee3Sopenharmony_ci 415593fb6ee3Sopenharmony_ci 415693fb6ee3Sopenharmony_ci <h6 id=parsing-main-inheadnoscript>12.2.5.4.5 The "<dfn>in head noscript</dfn>" insertion mode</h6> 415793fb6ee3Sopenharmony_ci 415893fb6ee3Sopenharmony_ci <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 415993fb6ee3Sopenharmony_ci token as follows:</p> 416093fb6ee3Sopenharmony_ci 416193fb6ee3Sopenharmony_ci <dl class=switch><dt>A DOCTYPE token<dd> 416293fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-inheadnoscript:parse-error>Parse error</a>. Ignore the token.</p> 416393fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "html"<dd> 416493fb6ee3Sopenharmony_ci 416593fb6ee3Sopenharmony_ci <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> 416693fb6ee3Sopenharmony_ci 416793fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is "noscript"<dd> 416893fb6ee3Sopenharmony_ci 416993fb6ee3Sopenharmony_ci <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 417093fb6ee3Sopenharmony_ci <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 417193fb6ee3Sopenharmony_ci <code id=parsing-main-inheadnoscript:the-head-element><a href=semantics.html#the-head-element>head</a></code> element.</p> 417293fb6ee3Sopenharmony_ci 417393fb6ee3Sopenharmony_ci <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 417493fb6ee3Sopenharmony_ci head</a>".</p> 417593fb6ee3Sopenharmony_ci 417693fb6ee3Sopenharmony_ci <dt>A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C 417793fb6ee3Sopenharmony_ci 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", 417893fb6ee3Sopenharmony_ci "style"<dd> 417993fb6ee3Sopenharmony_ci 418093fb6ee3Sopenharmony_ci <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> 418193fb6ee3Sopenharmony_ci 418293fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is "br"<dd> 418393fb6ee3Sopenharmony_ci <p>Act as described in the "anything else" entry below.</p> 418493fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is one of: "head", "noscript"<dt>Any other end tag<dd> 418593fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-inheadnoscript:parse-error-2>Parse error</a>. Ignore the token.</p> 418693fb6ee3Sopenharmony_ci <dt>Anything else<dd> 418793fb6ee3Sopenharmony_ci 418893fb6ee3Sopenharmony_ci 418993fb6ee3Sopenharmony_ci 419093fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-inheadnoscript:parse-error-3>Parse error</a>.</p> 419193fb6ee3Sopenharmony_ci 419293fb6ee3Sopenharmony_ci 419393fb6ee3Sopenharmony_ci <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 419493fb6ee3Sopenharmony_ci <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 419593fb6ee3Sopenharmony_ci <code id=parsing-main-inheadnoscript:the-head-element-2><a href=semantics.html#the-head-element>head</a></code> element.</p> 419693fb6ee3Sopenharmony_ci 419793fb6ee3Sopenharmony_ci <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 419893fb6ee3Sopenharmony_ci head</a>".</p> 419993fb6ee3Sopenharmony_ci 420093fb6ee3Sopenharmony_ci 420193fb6ee3Sopenharmony_ci <p>Reprocess the token.</p> 420293fb6ee3Sopenharmony_ci 420393fb6ee3Sopenharmony_ci </dl> 420493fb6ee3Sopenharmony_ci 420593fb6ee3Sopenharmony_ci 420693fb6ee3Sopenharmony_ci <h6 id=the-after-head-insertion-mode>12.2.5.4.6 The "<dfn>after head</dfn>" insertion mode</h6> 420793fb6ee3Sopenharmony_ci 420893fb6ee3Sopenharmony_ci <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 420993fb6ee3Sopenharmony_ci follows:</p> 421093fb6ee3Sopenharmony_ci 421193fb6ee3Sopenharmony_ci <dl class=switch><dt>A character token that is one of U+0009 CHARACTER 421293fb6ee3Sopenharmony_ci TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF), 421393fb6ee3Sopenharmony_ci U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dd> 421493fb6ee3Sopenharmony_ci <p><a href=#insert-a-character id=the-after-head-insertion-mode:insert-a-character>Insert the character</a>.</p> 421593fb6ee3Sopenharmony_ci <dt>A comment token<dd> 421693fb6ee3Sopenharmony_ci <p><a href=#insert-a-comment id=the-after-head-insertion-mode:insert-a-comment>Insert a comment</a>.</p> 421793fb6ee3Sopenharmony_ci <dt>A DOCTYPE token<dd> 421893fb6ee3Sopenharmony_ci <p><a href=#parse-error id=the-after-head-insertion-mode:parse-error>Parse error</a>. Ignore the token.</p> 421993fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "html"<dd> 422093fb6ee3Sopenharmony_ci 422193fb6ee3Sopenharmony_ci <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> 422293fb6ee3Sopenharmony_ci 422393fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "body"<dd> 422493fb6ee3Sopenharmony_ci 422593fb6ee3Sopenharmony_ci <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> 422693fb6ee3Sopenharmony_ci 422793fb6ee3Sopenharmony_ci <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> 422893fb6ee3Sopenharmony_ci 422993fb6ee3Sopenharmony_ci <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 423093fb6ee3Sopenharmony_ci body</a>".</p> 423193fb6ee3Sopenharmony_ci 423293fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "frameset"<dd> 423393fb6ee3Sopenharmony_ci 423493fb6ee3Sopenharmony_ci <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> 423593fb6ee3Sopenharmony_ci 423693fb6ee3Sopenharmony_ci <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 423793fb6ee3Sopenharmony_ci frameset</a>".</p> 423893fb6ee3Sopenharmony_ci 423993fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is one of: "base", "basefont", "bgsound", "link", "meta", 424093fb6ee3Sopenharmony_ci "noframes", "script", "style", "template", "title"<dd> 424193fb6ee3Sopenharmony_ci 424293fb6ee3Sopenharmony_ci <p><a href=#parse-error id=the-after-head-insertion-mode:parse-error-2>Parse error</a>.</p> 424393fb6ee3Sopenharmony_ci 424493fb6ee3Sopenharmony_ci <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 424593fb6ee3Sopenharmony_ci the <a href=#stack-of-open-elements id=the-after-head-insertion-mode:stack-of-open-elements>stack of open elements</a>.</p> 424693fb6ee3Sopenharmony_ci 424793fb6ee3Sopenharmony_ci <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> 424893fb6ee3Sopenharmony_ci 424993fb6ee3Sopenharmony_ci <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> 425093fb6ee3Sopenharmony_ci 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 425193fb6ee3Sopenharmony_ci this point.)</p> 425293fb6ee3Sopenharmony_ci 425393fb6ee3Sopenharmony_ci <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 425493fb6ee3Sopenharmony_ci this point.</p> 425593fb6ee3Sopenharmony_ci 425693fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is "template"<dd> 425793fb6ee3Sopenharmony_ci <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> 425893fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is one of: "body", "html", "br"<dd> 425993fb6ee3Sopenharmony_ci <p>Act as described in the "anything else" entry below.</p> 426093fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "head"<dt>Any other end tag<dd> 426193fb6ee3Sopenharmony_ci <p><a href=#parse-error id=the-after-head-insertion-mode:parse-error-3>Parse error</a>. Ignore the token.</p> 426293fb6ee3Sopenharmony_ci <dt>Anything else<dd> 426393fb6ee3Sopenharmony_ci 426493fb6ee3Sopenharmony_ci 426593fb6ee3Sopenharmony_ci <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> 426693fb6ee3Sopenharmony_ci 426793fb6ee3Sopenharmony_ci <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 426893fb6ee3Sopenharmony_ci body</a>".</p> 426993fb6ee3Sopenharmony_ci 427093fb6ee3Sopenharmony_ci 427193fb6ee3Sopenharmony_ci <p>Reprocess the current token.</p> 427293fb6ee3Sopenharmony_ci 427393fb6ee3Sopenharmony_ci </dl> 427493fb6ee3Sopenharmony_ci 427593fb6ee3Sopenharmony_ci 427693fb6ee3Sopenharmony_ci <h6 id=parsing-main-inbody>12.2.5.4.7 The "<dfn>in body</dfn>" insertion mode</h6> 427793fb6ee3Sopenharmony_ci 427893fb6ee3Sopenharmony_ci <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 427993fb6ee3Sopenharmony_ci 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> 428093fb6ee3Sopenharmony_ci 428193fb6ee3Sopenharmony_ci <dl class=switch><dt>A character token that is U+0000 NULL<dd> 428293fb6ee3Sopenharmony_ci 428393fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-inbody:parse-error>Parse error</a>. Ignore the token.</p> 428493fb6ee3Sopenharmony_ci 428593fb6ee3Sopenharmony_ci 428693fb6ee3Sopenharmony_ci 428793fb6ee3Sopenharmony_ci <dt>A character token that is one of U+0009 CHARACTER TABULATION, 428893fb6ee3Sopenharmony_ci U+000A LINE FEED (LF), U+000C FORM FEED (FF), U+000D CARRIAGE 428993fb6ee3Sopenharmony_ci RETURN (CR), or U+0020 SPACE<dd> 429093fb6ee3Sopenharmony_ci 429193fb6ee3Sopenharmony_ci <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> 429293fb6ee3Sopenharmony_ci 429393fb6ee3Sopenharmony_ci <p><a href=#insert-a-character id=parsing-main-inbody:insert-a-character>Insert the token's character</a>.</p> 429493fb6ee3Sopenharmony_ci 429593fb6ee3Sopenharmony_ci <dt>Any other character token<dd> 429693fb6ee3Sopenharmony_ci 429793fb6ee3Sopenharmony_ci <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> 429893fb6ee3Sopenharmony_ci 429993fb6ee3Sopenharmony_ci <p><a href=#insert-a-character id=parsing-main-inbody:insert-a-character-2>Insert the token's character</a>.</p> 430093fb6ee3Sopenharmony_ci 430193fb6ee3Sopenharmony_ci <p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag>frameset-ok flag</a> to "not ok".</p> 430293fb6ee3Sopenharmony_ci 430393fb6ee3Sopenharmony_ci <dt>A comment token<dd> 430493fb6ee3Sopenharmony_ci <p><a href=#insert-a-comment id=parsing-main-inbody:insert-a-comment>Insert a comment</a>.</p> 430593fb6ee3Sopenharmony_ci <dt>A DOCTYPE token<dd> 430693fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-inbody:parse-error-2>Parse error</a>. Ignore the token.</p> 430793fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "html"<dd> 430893fb6ee3Sopenharmony_ci 430993fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-inbody:parse-error-3>Parse error</a>.</p> 431093fb6ee3Sopenharmony_ci 431193fb6ee3Sopenharmony_ci <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 431293fb6ee3Sopenharmony_ci ignore the token.</p> 431393fb6ee3Sopenharmony_ci 431493fb6ee3Sopenharmony_ci <p>Otherwise, for each attribute on the token, check to see if the attribute is already present 431593fb6ee3Sopenharmony_ci 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 431693fb6ee3Sopenharmony_ci and its corresponding value to that element.</p> 431793fb6ee3Sopenharmony_ci 431893fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is one of: "base", "basefont", "bgsound", "link", "meta", 431993fb6ee3Sopenharmony_ci "noframes", "script", "style", "template", "title"<dt>An end tag whose tag name is "template"<dd> 432093fb6ee3Sopenharmony_ci <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> 432193fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "body"<dd> 432293fb6ee3Sopenharmony_ci 432393fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-inbody:parse-error-4>Parse error</a>.</p> 432493fb6ee3Sopenharmony_ci 432593fb6ee3Sopenharmony_ci <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> 432693fb6ee3Sopenharmony_ci 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 432793fb6ee3Sopenharmony_ci <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. 432893fb6ee3Sopenharmony_ci (<a href=#fragment-case id=parsing-main-inbody:fragment-case>fragment case</a>)</p> 432993fb6ee3Sopenharmony_ci 433093fb6ee3Sopenharmony_ci <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 433193fb6ee3Sopenharmony_ci 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 433293fb6ee3Sopenharmony_ci 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 433393fb6ee3Sopenharmony_ci and its corresponding value to that element.</p> 433493fb6ee3Sopenharmony_ci 433593fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "frameset"<dd> 433693fb6ee3Sopenharmony_ci 433793fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-inbody:parse-error-5>Parse error</a>.</p> 433893fb6ee3Sopenharmony_ci 433993fb6ee3Sopenharmony_ci <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 434093fb6ee3Sopenharmony_ci 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 434193fb6ee3Sopenharmony_ci token. (<a href=#fragment-case id=parsing-main-inbody:fragment-case-2>fragment case</a>)</p> 434293fb6ee3Sopenharmony_ci 434393fb6ee3Sopenharmony_ci <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> 434493fb6ee3Sopenharmony_ci 434593fb6ee3Sopenharmony_ci <p>Otherwise, run the following steps:</p> 434693fb6ee3Sopenharmony_ci 434793fb6ee3Sopenharmony_ci <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 434893fb6ee3Sopenharmony_ci 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 434993fb6ee3Sopenharmony_ci <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> 435093fb6ee3Sopenharmony_ci 435193fb6ee3Sopenharmony_ci <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 435293fb6ee3Sopenharmony_ci frameset</a>".</p> 435393fb6ee3Sopenharmony_ci 435493fb6ee3Sopenharmony_ci </ol> 435593fb6ee3Sopenharmony_ci 435693fb6ee3Sopenharmony_ci <dt>An end-of-file token<dd> 435793fb6ee3Sopenharmony_ci 435893fb6ee3Sopenharmony_ci <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 435993fb6ee3Sopenharmony_ci <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 436093fb6ee3Sopenharmony_ci template</a>" <a href=#insertion-mode id=parsing-main-inbody:insertion-mode-4>insertion mode</a>.</p> 436193fb6ee3Sopenharmony_ci 436293fb6ee3Sopenharmony_ci 436393fb6ee3Sopenharmony_ci <p>Otherwise, follow these steps:</p> 436493fb6ee3Sopenharmony_ci 436593fb6ee3Sopenharmony_ci <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 436693fb6ee3Sopenharmony_ci <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 436793fb6ee3Sopenharmony_ci <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 436893fb6ee3Sopenharmony_ci <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 436993fb6ee3Sopenharmony_ci <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 437093fb6ee3Sopenharmony_ci <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 437193fb6ee3Sopenharmony_ci <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> 437293fb6ee3Sopenharmony_ci 437393fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is "body"<dd> 437493fb6ee3Sopenharmony_ci 437593fb6ee3Sopenharmony_ci <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>; 437693fb6ee3Sopenharmony_ci ignore the token.</p> 437793fb6ee3Sopenharmony_ci 437893fb6ee3Sopenharmony_ci 437993fb6ee3Sopenharmony_ci 438093fb6ee3Sopenharmony_ci <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 438193fb6ee3Sopenharmony_ci <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 438293fb6ee3Sopenharmony_ci <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 438393fb6ee3Sopenharmony_ci <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 438493fb6ee3Sopenharmony_ci <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 438593fb6ee3Sopenharmony_ci <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 438693fb6ee3Sopenharmony_ci <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> 438793fb6ee3Sopenharmony_ci 438893fb6ee3Sopenharmony_ci 438993fb6ee3Sopenharmony_ci 439093fb6ee3Sopenharmony_ci <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 439193fb6ee3Sopenharmony_ci body</a>".</p> 439293fb6ee3Sopenharmony_ci 439393fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is "html"<dd> 439493fb6ee3Sopenharmony_ci 439593fb6ee3Sopenharmony_ci 439693fb6ee3Sopenharmony_ci <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>; 439793fb6ee3Sopenharmony_ci ignore the token.</p> 439893fb6ee3Sopenharmony_ci 439993fb6ee3Sopenharmony_ci 440093fb6ee3Sopenharmony_ci 440193fb6ee3Sopenharmony_ci <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 440293fb6ee3Sopenharmony_ci <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 440393fb6ee3Sopenharmony_ci <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 440493fb6ee3Sopenharmony_ci <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 440593fb6ee3Sopenharmony_ci <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 440693fb6ee3Sopenharmony_ci <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 440793fb6ee3Sopenharmony_ci <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> 440893fb6ee3Sopenharmony_ci 440993fb6ee3Sopenharmony_ci 441093fb6ee3Sopenharmony_ci 441193fb6ee3Sopenharmony_ci <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 441293fb6ee3Sopenharmony_ci body</a>".</p> 441393fb6ee3Sopenharmony_ci 441493fb6ee3Sopenharmony_ci 441593fb6ee3Sopenharmony_ci <p>Reprocess the token.</p> 441693fb6ee3Sopenharmony_ci 441793fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is one of: "address", "article", "aside", "blockquote", "center", 441893fb6ee3Sopenharmony_ci "details", "dialog", "dir", "div", "dl", "fieldset", "figcaption", "figure", "footer", "header", 441993fb6ee3Sopenharmony_ci "hgroup", "main", "menu", "nav", "ol", "p", "section", "summary", "ul"<dd> 442093fb6ee3Sopenharmony_ci 442193fb6ee3Sopenharmony_ci 442293fb6ee3Sopenharmony_ci 442393fb6ee3Sopenharmony_ci <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 442493fb6ee3Sopenharmony_ci <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> 442593fb6ee3Sopenharmony_ci element</a>.</p> 442693fb6ee3Sopenharmony_ci 442793fb6ee3Sopenharmony_ci <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> 442893fb6ee3Sopenharmony_ci 442993fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is one of: "h1", "h2", "h3", "h4", 443093fb6ee3Sopenharmony_ci "h5", "h6"<dd> 443193fb6ee3Sopenharmony_ci 443293fb6ee3Sopenharmony_ci <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 443393fb6ee3Sopenharmony_ci <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> 443493fb6ee3Sopenharmony_ci element</a>.</p> 443593fb6ee3Sopenharmony_ci 443693fb6ee3Sopenharmony_ci <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 443793fb6ee3Sopenharmony_ci 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 443893fb6ee3Sopenharmony_ci 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> 443993fb6ee3Sopenharmony_ci 444093fb6ee3Sopenharmony_ci 444193fb6ee3Sopenharmony_ci <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> 444293fb6ee3Sopenharmony_ci 444393fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is one of: "pre", "listing"<dd> 444493fb6ee3Sopenharmony_ci 444593fb6ee3Sopenharmony_ci <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 444693fb6ee3Sopenharmony_ci 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> 444793fb6ee3Sopenharmony_ci element</a>.</p> 444893fb6ee3Sopenharmony_ci 444993fb6ee3Sopenharmony_ci <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> 445093fb6ee3Sopenharmony_ci 445193fb6ee3Sopenharmony_ci <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 445293fb6ee3Sopenharmony_ci 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 445393fb6ee3Sopenharmony_ci as an authoring convenience.)</p> 445493fb6ee3Sopenharmony_ci 445593fb6ee3Sopenharmony_ci 445693fb6ee3Sopenharmony_ci 445793fb6ee3Sopenharmony_ci <p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-4>frameset-ok flag</a> to "not ok".</p> 445893fb6ee3Sopenharmony_ci 445993fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "form"<dd> 446093fb6ee3Sopenharmony_ci 446193fb6ee3Sopenharmony_ci <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 446293fb6ee3Sopenharmony_ci 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 446393fb6ee3Sopenharmony_ci <a href=#parse-error id=parsing-main-inbody:parse-error-12>parse error</a>; ignore the token.</p> 446493fb6ee3Sopenharmony_ci 446593fb6ee3Sopenharmony_ci <p>Otherwise:</p> 446693fb6ee3Sopenharmony_ci 446793fb6ee3Sopenharmony_ci <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 446893fb6ee3Sopenharmony_ci 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> 446993fb6ee3Sopenharmony_ci element</a>.</p> 447093fb6ee3Sopenharmony_ci 447193fb6ee3Sopenharmony_ci <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> 447293fb6ee3Sopenharmony_ci 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> 447393fb6ee3Sopenharmony_ci 447493fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "li"<dd> 447593fb6ee3Sopenharmony_ci 447693fb6ee3Sopenharmony_ci <p>Run these steps:</p> 447793fb6ee3Sopenharmony_ci 447893fb6ee3Sopenharmony_ci <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 447993fb6ee3Sopenharmony_ci node</a> (the bottommost node of the stack).<li> 448093fb6ee3Sopenharmony_ci 448193fb6ee3Sopenharmony_ci <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 448293fb6ee3Sopenharmony_ci substeps:</p> 448393fb6ee3Sopenharmony_ci 448493fb6ee3Sopenharmony_ci <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 448593fb6ee3Sopenharmony_ci <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> 448693fb6ee3Sopenharmony_ci element has been popped from the stack.<li><p>Jump to the step labeled <i>done</i> below.</ol> 448793fb6ee3Sopenharmony_ci 448893fb6ee3Sopenharmony_ci <li><p>If <var>node</var> is in the <a href=#special id=parsing-main-inbody:special>special</a> category, but is not an 448993fb6ee3Sopenharmony_ci <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 449093fb6ee3Sopenharmony_ci 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 449193fb6ee3Sopenharmony_ci 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 449293fb6ee3Sopenharmony_ci <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> 449393fb6ee3Sopenharmony_ci 449493fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is one of: "dd", "dt"<dd> 449593fb6ee3Sopenharmony_ci 449693fb6ee3Sopenharmony_ci <p>Run these steps:</p> 449793fb6ee3Sopenharmony_ci 449893fb6ee3Sopenharmony_ci <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 449993fb6ee3Sopenharmony_ci node</a> (the bottommost node of the stack).<li> 450093fb6ee3Sopenharmony_ci 450193fb6ee3Sopenharmony_ci <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 450293fb6ee3Sopenharmony_ci substeps:</p> 450393fb6ee3Sopenharmony_ci 450493fb6ee3Sopenharmony_ci <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 450593fb6ee3Sopenharmony_ci <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> 450693fb6ee3Sopenharmony_ci element has been popped from the stack.<li><p>Jump to the step labeled <i>done</i> below.</ol> 450793fb6ee3Sopenharmony_ci 450893fb6ee3Sopenharmony_ci <li> 450993fb6ee3Sopenharmony_ci 451093fb6ee3Sopenharmony_ci <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> 451193fb6ee3Sopenharmony_ci 451293fb6ee3Sopenharmony_ci <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 451393fb6ee3Sopenharmony_ci <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> 451493fb6ee3Sopenharmony_ci element has been popped from the stack.<li><p>Jump to the step labeled <i>done</i> below.</ol> 451593fb6ee3Sopenharmony_ci 451693fb6ee3Sopenharmony_ci <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 451793fb6ee3Sopenharmony_ci <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 451893fb6ee3Sopenharmony_ci 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 451993fb6ee3Sopenharmony_ci 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 452093fb6ee3Sopenharmony_ci <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> 452193fb6ee3Sopenharmony_ci 452293fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "plaintext"<dd> 452393fb6ee3Sopenharmony_ci 452493fb6ee3Sopenharmony_ci <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 452593fb6ee3Sopenharmony_ci <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> 452693fb6ee3Sopenharmony_ci element</a>.</p> 452793fb6ee3Sopenharmony_ci 452893fb6ee3Sopenharmony_ci <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> 452993fb6ee3Sopenharmony_ci 453093fb6ee3Sopenharmony_ci <p>Switch the tokenizer to the <a href=#plaintext-state id=parsing-main-inbody:plaintext-state>PLAINTEXT state</a>.</p> 453193fb6ee3Sopenharmony_ci 453293fb6ee3Sopenharmony_ci <p class=note>Once a start tag with the tag name "plaintext" has been seen, that will be the 453393fb6ee3Sopenharmony_ci last token ever seen other than character tokens (and the end-of-file token), because there is 453493fb6ee3Sopenharmony_ci no way to switch out of the <a href=#plaintext-state id=parsing-main-inbody:plaintext-state-2>PLAINTEXT state</a>.</p> 453593fb6ee3Sopenharmony_ci 453693fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "button"<dd> 453793fb6ee3Sopenharmony_ci 453893fb6ee3Sopenharmony_ci <ol><li> 453993fb6ee3Sopenharmony_ci 454093fb6ee3Sopenharmony_ci <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 454193fb6ee3Sopenharmony_ci <code>button</code> element in scope</a>, then run these substeps:</p> 454293fb6ee3Sopenharmony_ci 454393fb6ee3Sopenharmony_ci <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> 454493fb6ee3Sopenharmony_ci element has been popped from the stack.</ol> 454593fb6ee3Sopenharmony_ci 454693fb6ee3Sopenharmony_ci <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> 454793fb6ee3Sopenharmony_ci 454893fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is one of: "address", "article", "aside", "blockquote", "button", 454993fb6ee3Sopenharmony_ci "center", "details", "dialog", "dir", "div", "dl", "fieldset", "figcaption", "figure", "footer", 455093fb6ee3Sopenharmony_ci "header", "hgroup", "listing", "main", "menu", "nav", "ol", "pre", "section", "summary", 455193fb6ee3Sopenharmony_ci "ul"<dd> 455293fb6ee3Sopenharmony_ci 455393fb6ee3Sopenharmony_ci <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 455493fb6ee3Sopenharmony_ci 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 455593fb6ee3Sopenharmony_ci error</a>; ignore the token.</p> 455693fb6ee3Sopenharmony_ci 455793fb6ee3Sopenharmony_ci <p>Otherwise, run these steps:</p> 455893fb6ee3Sopenharmony_ci 455993fb6ee3Sopenharmony_ci <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 456093fb6ee3Sopenharmony_ci the same tag name as that of the token, then this is a 456193fb6ee3Sopenharmony_ci <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 456293fb6ee3Sopenharmony_ci stack.</ol> 456393fb6ee3Sopenharmony_ci 456493fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is "form"<dd> 456593fb6ee3Sopenharmony_ci 456693fb6ee3Sopenharmony_ci <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 456793fb6ee3Sopenharmony_ci run these substeps:</p> 456893fb6ee3Sopenharmony_ci 456993fb6ee3Sopenharmony_ci <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> 457093fb6ee3Sopenharmony_ci 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 457193fb6ee3Sopenharmony_ci 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 457293fb6ee3Sopenharmony_ci 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 457393fb6ee3Sopenharmony_ci <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> 457493fb6ee3Sopenharmony_ci 457593fb6ee3Sopenharmony_ci <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 457693fb6ee3Sopenharmony_ci elements</a>, then run these substeps instead:</p> 457793fb6ee3Sopenharmony_ci 457893fb6ee3Sopenharmony_ci <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 457993fb6ee3Sopenharmony_ci 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 458093fb6ee3Sopenharmony_ci <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> 458193fb6ee3Sopenharmony_ci element has been popped from the stack.</ol> 458293fb6ee3Sopenharmony_ci 458393fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is "p"<dd> 458493fb6ee3Sopenharmony_ci 458593fb6ee3Sopenharmony_ci <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 458693fb6ee3Sopenharmony_ci 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 458793fb6ee3Sopenharmony_ci attributes.</p> 458893fb6ee3Sopenharmony_ci 458993fb6ee3Sopenharmony_ci <p><a href=#close-a-p-element id=parsing-main-inbody:close-a-p-element-8>Close a <code>p</code> element</a>.</p> 459093fb6ee3Sopenharmony_ci 459193fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is "li"<dd> 459293fb6ee3Sopenharmony_ci 459393fb6ee3Sopenharmony_ci <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 459493fb6ee3Sopenharmony_ci error</a>; ignore the token.</p> 459593fb6ee3Sopenharmony_ci 459693fb6ee3Sopenharmony_ci <p>Otherwise, run these steps:</p> 459793fb6ee3Sopenharmony_ci 459893fb6ee3Sopenharmony_ci <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 459993fb6ee3Sopenharmony_ci <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> 460093fb6ee3Sopenharmony_ci element has been popped from the stack.</ol> 460193fb6ee3Sopenharmony_ci 460293fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is one of: "dd", "dt"<dd> 460393fb6ee3Sopenharmony_ci 460493fb6ee3Sopenharmony_ci <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 460593fb6ee3Sopenharmony_ci 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 460693fb6ee3Sopenharmony_ci error</a>; ignore the token.</p> 460793fb6ee3Sopenharmony_ci 460893fb6ee3Sopenharmony_ci <p>Otherwise, run these steps:</p> 460993fb6ee3Sopenharmony_ci 461093fb6ee3Sopenharmony_ci <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 461193fb6ee3Sopenharmony_ci 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 461293fb6ee3Sopenharmony_ci 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 461393fb6ee3Sopenharmony_ci 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 461493fb6ee3Sopenharmony_ci stack.</ol> 461593fb6ee3Sopenharmony_ci 461693fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is one of: "h1", "h2", "h3", "h4", "h5", "h6"<dd> 461793fb6ee3Sopenharmony_ci 461893fb6ee3Sopenharmony_ci <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 461993fb6ee3Sopenharmony_ci element</a> and whose tag name is one of "h1", "h2", "h3", "h4", "h5", or "h6", then this is 462093fb6ee3Sopenharmony_ci a <a href=#parse-error id=parsing-main-inbody:parse-error-28>parse error</a>; ignore the token.</p> 462193fb6ee3Sopenharmony_ci 462293fb6ee3Sopenharmony_ci <p>Otherwise, run these steps:</p> 462393fb6ee3Sopenharmony_ci 462493fb6ee3Sopenharmony_ci <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 462593fb6ee3Sopenharmony_ci 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 462693fb6ee3Sopenharmony_ci 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" 462793fb6ee3Sopenharmony_ci has been popped from the stack.</ol> 462893fb6ee3Sopenharmony_ci 462993fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is "sarcasm"<dd> 463093fb6ee3Sopenharmony_ci <p>Take a deep breath, then act as described in the "any other end 463193fb6ee3Sopenharmony_ci tag" entry below.</p> 463293fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "a"<dd> 463393fb6ee3Sopenharmony_ci 463493fb6ee3Sopenharmony_ci <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 463593fb6ee3Sopenharmony_ci between the end of the list and the last <a href=#concept-parser-marker id=parsing-main-inbody:concept-parser-marker>marker</a> on 463693fb6ee3Sopenharmony_ci 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 463793fb6ee3Sopenharmony_ci 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 463893fb6ee3Sopenharmony_ci 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 463993fb6ee3Sopenharmony_ci 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 464093fb6ee3Sopenharmony_ci 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 464193fb6ee3Sopenharmony_ci scope</a>).</p> 464293fb6ee3Sopenharmony_ci 464393fb6ee3Sopenharmony_ci <p class=example>In the non-conforming stream 464493fb6ee3Sopenharmony_ci <code><a href="a">a<table><a href="b">b</table>x</code>, the first 464593fb6ee3Sopenharmony_ci <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 464693fb6ee3Sopenharmony_ci 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> 464793fb6ee3Sopenharmony_ci element is not in table scope (meaning that a regular <code></a></code> end tag at the start 464893fb6ee3Sopenharmony_ci 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 464993fb6ee3Sopenharmony_ci <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 465093fb6ee3Sopenharmony_ci will often result in non-conforming DOMs when parsed.</p> 465193fb6ee3Sopenharmony_ci 465293fb6ee3Sopenharmony_ci <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> 465393fb6ee3Sopenharmony_ci 465493fb6ee3Sopenharmony_ci <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 465593fb6ee3Sopenharmony_ci formatting elements</a> that element.</p> 465693fb6ee3Sopenharmony_ci 465793fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is one of: "b", "big", "code", "em", 465893fb6ee3Sopenharmony_ci "font", "i", "s", "small", "strike", "strong", "tt", "u"<dd> 465993fb6ee3Sopenharmony_ci 466093fb6ee3Sopenharmony_ci <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> 466193fb6ee3Sopenharmony_ci 466293fb6ee3Sopenharmony_ci <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 466393fb6ee3Sopenharmony_ci formatting elements</a> that element.</p> 466493fb6ee3Sopenharmony_ci 466593fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "nobr"<dd> 466693fb6ee3Sopenharmony_ci 466793fb6ee3Sopenharmony_ci <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> 466893fb6ee3Sopenharmony_ci 466993fb6ee3Sopenharmony_ci <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 467093fb6ee3Sopenharmony_ci <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 467193fb6ee3Sopenharmony_ci <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 467293fb6ee3Sopenharmony_ci <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> 467393fb6ee3Sopenharmony_ci 467493fb6ee3Sopenharmony_ci <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 467593fb6ee3Sopenharmony_ci formatting elements</a> that element.</p> 467693fb6ee3Sopenharmony_ci 467793fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is one of: "a", 467893fb6ee3Sopenharmony_ci "b", "big", "code", "em", "font", "i", "nobr", "s", "small", 467993fb6ee3Sopenharmony_ci "strike", "strong", "tt", "u"<dd> 468093fb6ee3Sopenharmony_ci 468193fb6ee3Sopenharmony_ci <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> 468293fb6ee3Sopenharmony_ci 468393fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is one of: "applet", "marquee", "object"<dd> 468493fb6ee3Sopenharmony_ci 468593fb6ee3Sopenharmony_ci <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> 468693fb6ee3Sopenharmony_ci 468793fb6ee3Sopenharmony_ci <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> 468893fb6ee3Sopenharmony_ci 468993fb6ee3Sopenharmony_ci <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 469093fb6ee3Sopenharmony_ci active formatting elements</a>.</p> 469193fb6ee3Sopenharmony_ci 469293fb6ee3Sopenharmony_ci <p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-8>frameset-ok flag</a> to "not ok".</p> 469393fb6ee3Sopenharmony_ci 469493fb6ee3Sopenharmony_ci <dt>An end tag token whose tag name is one of: "applet", "marquee", "object"<dd> 469593fb6ee3Sopenharmony_ci 469693fb6ee3Sopenharmony_ci <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 469793fb6ee3Sopenharmony_ci 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 469893fb6ee3Sopenharmony_ci error</a>; ignore the token.</p> 469993fb6ee3Sopenharmony_ci 470093fb6ee3Sopenharmony_ci <p>Otherwise, run these steps:</p> 470193fb6ee3Sopenharmony_ci 470293fb6ee3Sopenharmony_ci <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 470393fb6ee3Sopenharmony_ci 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 470493fb6ee3Sopenharmony_ci 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 470593fb6ee3Sopenharmony_ci 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> 470693fb6ee3Sopenharmony_ci 470793fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "table"<dd> 470893fb6ee3Sopenharmony_ci 470993fb6ee3Sopenharmony_ci <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 471093fb6ee3Sopenharmony_ci <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 471193fb6ee3Sopenharmony_ci <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> 471293fb6ee3Sopenharmony_ci element</a>.</p> 471393fb6ee3Sopenharmony_ci 471493fb6ee3Sopenharmony_ci <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> 471593fb6ee3Sopenharmony_ci 471693fb6ee3Sopenharmony_ci <p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-9>frameset-ok flag</a> to "not ok".</p> 471793fb6ee3Sopenharmony_ci 471893fb6ee3Sopenharmony_ci <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 471993fb6ee3Sopenharmony_ci table</a>".</p> 472093fb6ee3Sopenharmony_ci 472193fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is "br"<dd> 472293fb6ee3Sopenharmony_ci 472393fb6ee3Sopenharmony_ci <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 472493fb6ee3Sopenharmony_ci next entry; i.e. act as if this was a "br" start tag token with no attributes, rather than the 472593fb6ee3Sopenharmony_ci end tag token that it actually is.</p> 472693fb6ee3Sopenharmony_ci 472793fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is one of: "area", "br", "embed", 472893fb6ee3Sopenharmony_ci "img", "keygen", "wbr"<dd> 472993fb6ee3Sopenharmony_ci 473093fb6ee3Sopenharmony_ci <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> 473193fb6ee3Sopenharmony_ci 473293fb6ee3Sopenharmony_ci <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 473393fb6ee3Sopenharmony_ci 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> 473493fb6ee3Sopenharmony_ci 473593fb6ee3Sopenharmony_ci <p><a href=#acknowledge-self-closing-flag id=parsing-main-inbody:acknowledge-self-closing-flag>Acknowledge the token's <i>self-closing 473693fb6ee3Sopenharmony_ci flag</i></a>, if it is set.</p> 473793fb6ee3Sopenharmony_ci 473893fb6ee3Sopenharmony_ci <p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-10>frameset-ok flag</a> to "not ok".</p> 473993fb6ee3Sopenharmony_ci 474093fb6ee3Sopenharmony_ci 474193fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "input"<dd> 474293fb6ee3Sopenharmony_ci 474393fb6ee3Sopenharmony_ci <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> 474493fb6ee3Sopenharmony_ci 474593fb6ee3Sopenharmony_ci <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 474693fb6ee3Sopenharmony_ci 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> 474793fb6ee3Sopenharmony_ci 474893fb6ee3Sopenharmony_ci <p><a href=#acknowledge-self-closing-flag id=parsing-main-inbody:acknowledge-self-closing-flag-2>Acknowledge the token's <i>self-closing 474993fb6ee3Sopenharmony_ci flag</i></a>, if it is set.</p> 475093fb6ee3Sopenharmony_ci 475193fb6ee3Sopenharmony_ci <p>If the token does not have an attribute with the name "type", or if it does, but that 475293fb6ee3Sopenharmony_ci 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> 475393fb6ee3Sopenharmony_ci 475493fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is one of: "menuitem", "param", "source", "track"<dd> 475593fb6ee3Sopenharmony_ci 475693fb6ee3Sopenharmony_ci <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 475793fb6ee3Sopenharmony_ci 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> 475893fb6ee3Sopenharmony_ci 475993fb6ee3Sopenharmony_ci <p><a href=#acknowledge-self-closing-flag id=parsing-main-inbody:acknowledge-self-closing-flag-3>Acknowledge the token's <i>self-closing 476093fb6ee3Sopenharmony_ci flag</i></a>, if it is set.</p> 476193fb6ee3Sopenharmony_ci 476293fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "hr"<dd> 476393fb6ee3Sopenharmony_ci 476493fb6ee3Sopenharmony_ci <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 476593fb6ee3Sopenharmony_ci <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> 476693fb6ee3Sopenharmony_ci element</a>.</p> 476793fb6ee3Sopenharmony_ci 476893fb6ee3Sopenharmony_ci <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 476993fb6ee3Sopenharmony_ci 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> 477093fb6ee3Sopenharmony_ci 477193fb6ee3Sopenharmony_ci <p><a href=#acknowledge-self-closing-flag id=parsing-main-inbody:acknowledge-self-closing-flag-4>Acknowledge the token's <i>self-closing 477293fb6ee3Sopenharmony_ci flag</i></a>, if it is set.</p> 477393fb6ee3Sopenharmony_ci 477493fb6ee3Sopenharmony_ci <p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-12>frameset-ok flag</a> to "not ok".</p> 477593fb6ee3Sopenharmony_ci 477693fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "image"<dd> 477793fb6ee3Sopenharmony_ci 477893fb6ee3Sopenharmony_ci <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 477993fb6ee3Sopenharmony_ci ask.)</p> 478093fb6ee3Sopenharmony_ci <dt id=isindex>A start tag whose tag name is "isindex"<dd> 478193fb6ee3Sopenharmony_ci 478293fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-inbody:parse-error-36>Parse error</a>.</p> 478393fb6ee3Sopenharmony_ci 478493fb6ee3Sopenharmony_ci <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 478593fb6ee3Sopenharmony_ci 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 478693fb6ee3Sopenharmony_ci token.</p> 478793fb6ee3Sopenharmony_ci 478893fb6ee3Sopenharmony_ci <p>Otherwise:</p> 478993fb6ee3Sopenharmony_ci 479093fb6ee3Sopenharmony_ci <p><a href=#acknowledge-self-closing-flag id=parsing-main-inbody:acknowledge-self-closing-flag-5>Acknowledge the token's <i>self-closing 479193fb6ee3Sopenharmony_ci flag</i></a>, if it is set.</p> 479293fb6ee3Sopenharmony_ci 479393fb6ee3Sopenharmony_ci <p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-13>frameset-ok flag</a> to "not ok".</p> 479493fb6ee3Sopenharmony_ci 479593fb6ee3Sopenharmony_ci 479693fb6ee3Sopenharmony_ci <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 479793fb6ee3Sopenharmony_ci <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> 479893fb6ee3Sopenharmony_ci element</a>.</p> 479993fb6ee3Sopenharmony_ci 480093fb6ee3Sopenharmony_ci <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 480193fb6ee3Sopenharmony_ci 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 480293fb6ee3Sopenharmony_ci <a href=#form-element-pointer id=parsing-main-inbody:form-element-pointer-6><code>form</code> element pointer</a> to point to the element 480393fb6ee3Sopenharmony_ci created.</p> 480493fb6ee3Sopenharmony_ci 480593fb6ee3Sopenharmony_ci <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 480693fb6ee3Sopenharmony_ci value of the "action" attribute of the token.</p> 480793fb6ee3Sopenharmony_ci 480893fb6ee3Sopenharmony_ci 480993fb6ee3Sopenharmony_ci <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. 481093fb6ee3Sopenharmony_ci 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> 481193fb6ee3Sopenharmony_ci 481293fb6ee3Sopenharmony_ci 481393fb6ee3Sopenharmony_ci <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> 481493fb6ee3Sopenharmony_ci 481593fb6ee3Sopenharmony_ci <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> 481693fb6ee3Sopenharmony_ci 481793fb6ee3Sopenharmony_ci 481893fb6ee3Sopenharmony_ci <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> 481993fb6ee3Sopenharmony_ci 482093fb6ee3Sopenharmony_ci 482193fb6ee3Sopenharmony_ci <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 482293fb6ee3Sopenharmony_ci from the "isindex" token except "name", "action", and "prompt", and with an attribute named 482393fb6ee3Sopenharmony_ci "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 482493fb6ee3Sopenharmony_ci the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-62>stack of open elements</a>.</p> 482593fb6ee3Sopenharmony_ci 482693fb6ee3Sopenharmony_ci 482793fb6ee3Sopenharmony_ci <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> 482893fb6ee3Sopenharmony_ci 482993fb6ee3Sopenharmony_ci 483093fb6ee3Sopenharmony_ci <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 483193fb6ee3Sopenharmony_ci earlier) off the <a href=#stack-of-open-elements id=parsing-main-inbody:stack-of-open-elements-63>stack of open elements</a>.</p> 483293fb6ee3Sopenharmony_ci 483393fb6ee3Sopenharmony_ci 483493fb6ee3Sopenharmony_ci <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. 483593fb6ee3Sopenharmony_ci 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> 483693fb6ee3Sopenharmony_ci 483793fb6ee3Sopenharmony_ci 483893fb6ee3Sopenharmony_ci <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 483993fb6ee3Sopenharmony_ci 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> 484093fb6ee3Sopenharmony_ci 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> 484193fb6ee3Sopenharmony_ci 484293fb6ee3Sopenharmony_ci 484393fb6ee3Sopenharmony_ci <p><dfn id=attr-isindex-prompt><strong>Prompt</strong></dfn>: If the token has an attribute 484493fb6ee3Sopenharmony_ci with the name "prompt", then the first stream of characters must be the same string as given in 484593fb6ee3Sopenharmony_ci that attribute, and the second stream of characters must be empty. Otherwise, the two streams of 484693fb6ee3Sopenharmony_ci 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 484793fb6ee3Sopenharmony_ci equivalent of "This is a searchable index. Enter search keywords: (input field)" in the user's 484893fb6ee3Sopenharmony_ci preferred language.</p> 484993fb6ee3Sopenharmony_ci 485093fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "textarea"<dd> 485193fb6ee3Sopenharmony_ci 485293fb6ee3Sopenharmony_ci <p>Run these steps:</p> 485393fb6ee3Sopenharmony_ci 485493fb6ee3Sopenharmony_ci <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 485593fb6ee3Sopenharmony_ci 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> 485693fb6ee3Sopenharmony_ci 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 485793fb6ee3Sopenharmony_ci mode</a>.</p> 485893fb6ee3Sopenharmony_ci 485993fb6ee3Sopenharmony_ci <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> 486093fb6ee3Sopenharmony_ci 486193fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "xmp"<dd> 486293fb6ee3Sopenharmony_ci 486393fb6ee3Sopenharmony_ci <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 486493fb6ee3Sopenharmony_ci <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> 486593fb6ee3Sopenharmony_ci element</a>.</p> 486693fb6ee3Sopenharmony_ci 486793fb6ee3Sopenharmony_ci <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> 486893fb6ee3Sopenharmony_ci 486993fb6ee3Sopenharmony_ci <p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-15>frameset-ok flag</a> to "not ok".</p> 487093fb6ee3Sopenharmony_ci 487193fb6ee3Sopenharmony_ci <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> 487293fb6ee3Sopenharmony_ci 487393fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "iframe"<dd> 487493fb6ee3Sopenharmony_ci 487593fb6ee3Sopenharmony_ci <p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-16>frameset-ok flag</a> to "not ok".</p> 487693fb6ee3Sopenharmony_ci 487793fb6ee3Sopenharmony_ci <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> 487893fb6ee3Sopenharmony_ci 487993fb6ee3Sopenharmony_ci <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> 488093fb6ee3Sopenharmony_ci 488193fb6ee3Sopenharmony_ci <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> 488293fb6ee3Sopenharmony_ci 488393fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "select"<dd> 488493fb6ee3Sopenharmony_ci 488593fb6ee3Sopenharmony_ci <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> 488693fb6ee3Sopenharmony_ci 488793fb6ee3Sopenharmony_ci <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> 488893fb6ee3Sopenharmony_ci 488993fb6ee3Sopenharmony_ci <p>Set the <a href=#frameset-ok-flag id=parsing-main-inbody:frameset-ok-flag-17>frameset-ok flag</a> to "not ok".</p> 489093fb6ee3Sopenharmony_ci 489193fb6ee3Sopenharmony_ci <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 489293fb6ee3Sopenharmony_ci 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 489393fb6ee3Sopenharmony_ci <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 489493fb6ee3Sopenharmony_ci 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> 489593fb6ee3Sopenharmony_ci 489693fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is one of: "optgroup", "option"<dd> 489793fb6ee3Sopenharmony_ci 489893fb6ee3Sopenharmony_ci <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 489993fb6ee3Sopenharmony_ci <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> 490093fb6ee3Sopenharmony_ci 490193fb6ee3Sopenharmony_ci <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> 490293fb6ee3Sopenharmony_ci 490393fb6ee3Sopenharmony_ci <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> 490493fb6ee3Sopenharmony_ci 490593fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is one of: "rp", "rt"<dd> 490693fb6ee3Sopenharmony_ci 490793fb6ee3Sopenharmony_ci 490893fb6ee3Sopenharmony_ci 490993fb6ee3Sopenharmony_ci <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 491093fb6ee3Sopenharmony_ci <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 491193fb6ee3Sopenharmony_ci <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 491293fb6ee3Sopenharmony_ci error</a>.</p> 491393fb6ee3Sopenharmony_ci 491493fb6ee3Sopenharmony_ci <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> 491593fb6ee3Sopenharmony_ci 491693fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "math"<dd> 491793fb6ee3Sopenharmony_ci 491893fb6ee3Sopenharmony_ci <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> 491993fb6ee3Sopenharmony_ci 492093fb6ee3Sopenharmony_ci <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 492193fb6ee3Sopenharmony_ci attributes that are not all lowercase.)</p> 492293fb6ee3Sopenharmony_ci 492393fb6ee3Sopenharmony_ci <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 492493fb6ee3Sopenharmony_ci attributes, in particular XLink.)</p> 492593fb6ee3Sopenharmony_ci 492693fb6ee3Sopenharmony_ci <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 492793fb6ee3Sopenharmony_ci namespace</a>.</p> 492893fb6ee3Sopenharmony_ci 492993fb6ee3Sopenharmony_ci 493093fb6ee3Sopenharmony_ci 493193fb6ee3Sopenharmony_ci <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 493293fb6ee3Sopenharmony_ci <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 493393fb6ee3Sopenharmony_ci the token's <i>self-closing flag</i></a>.</p> 493493fb6ee3Sopenharmony_ci 493593fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "svg"<dd> 493693fb6ee3Sopenharmony_ci 493793fb6ee3Sopenharmony_ci <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> 493893fb6ee3Sopenharmony_ci 493993fb6ee3Sopenharmony_ci <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 494093fb6ee3Sopenharmony_ci are not all lowercase.)</p> 494193fb6ee3Sopenharmony_ci 494293fb6ee3Sopenharmony_ci <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 494393fb6ee3Sopenharmony_ci attributes, in particular XLink in SVG.)</p> 494493fb6ee3Sopenharmony_ci 494593fb6ee3Sopenharmony_ci <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> 494693fb6ee3Sopenharmony_ci 494793fb6ee3Sopenharmony_ci 494893fb6ee3Sopenharmony_ci 494993fb6ee3Sopenharmony_ci <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 495093fb6ee3Sopenharmony_ci <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 495193fb6ee3Sopenharmony_ci the token's <i>self-closing flag</i></a>.</p> 495293fb6ee3Sopenharmony_ci 495393fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is one of: "caption", "col", "colgroup", "frame", 495493fb6ee3Sopenharmony_ci "head", "tbody", "td", "tfoot", "th", "thead", "tr"<dd> 495593fb6ee3Sopenharmony_ci 495693fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-inbody:parse-error-38>Parse error</a>. Ignore the token.</p> 495793fb6ee3Sopenharmony_ci 495893fb6ee3Sopenharmony_ci 495993fb6ee3Sopenharmony_ci 496093fb6ee3Sopenharmony_ci <dt>Any other start tag<dd> 496193fb6ee3Sopenharmony_ci 496293fb6ee3Sopenharmony_ci <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> 496393fb6ee3Sopenharmony_ci 496493fb6ee3Sopenharmony_ci <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> 496593fb6ee3Sopenharmony_ci 496693fb6ee3Sopenharmony_ci <p class=note>This element will be an <a href=#ordinary id=parsing-main-inbody:ordinary>ordinary</a> 496793fb6ee3Sopenharmony_ci element.</p> 496893fb6ee3Sopenharmony_ci 496993fb6ee3Sopenharmony_ci <dt>Any other end tag<dd> 497093fb6ee3Sopenharmony_ci 497193fb6ee3Sopenharmony_ci <p>Run these steps:</p> 497293fb6ee3Sopenharmony_ci 497393fb6ee3Sopenharmony_ci <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 497493fb6ee3Sopenharmony_ci 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 497593fb6ee3Sopenharmony_ci element</a> with the same tag name as the token, then:</p> 497693fb6ee3Sopenharmony_ci 497793fb6ee3Sopenharmony_ci <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 497893fb6ee3Sopenharmony_ci 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 497993fb6ee3Sopenharmony_ci <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>, 498093fb6ee3Sopenharmony_ci including <var>node</var>, then stop these steps.</ol> 498193fb6ee3Sopenharmony_ci 498293fb6ee3Sopenharmony_ci <li><p>Otherwise, if <var>node</var> is in the <a href=#special id=parsing-main-inbody:special-3>special</a> category, then 498393fb6ee3Sopenharmony_ci 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 498493fb6ee3Sopenharmony_ci elements</a>.<li><p>Return to the step labeled <i>loop</i>.</ol> 498593fb6ee3Sopenharmony_ci 498693fb6ee3Sopenharmony_ci </dl> 498793fb6ee3Sopenharmony_ci 498893fb6ee3Sopenharmony_ci <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 498993fb6ee3Sopenharmony_ci means that the user agent must run the following steps:</p> 499093fb6ee3Sopenharmony_ci 499193fb6ee3Sopenharmony_ci <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 499293fb6ee3Sopenharmony_ci <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 499393fb6ee3Sopenharmony_ci has been popped from the stack.</ol> 499493fb6ee3Sopenharmony_ci 499593fb6ee3Sopenharmony_ci 499693fb6ee3Sopenharmony_ci <p id=adoptionAgency>The <dfn id=adoption-agency-algorithm>adoption agency algorithm</dfn>, which takes as its only argument 499793fb6ee3Sopenharmony_ci a tag name <var>subject</var> for which the algorithm is being run, consists of the 499893fb6ee3Sopenharmony_ci following steps:</p> 499993fb6ee3Sopenharmony_ci 500093fb6ee3Sopenharmony_ci <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> 500193fb6ee3Sopenharmony_ci 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 500293fb6ee3Sopenharmony_ci <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 500393fb6ee3Sopenharmony_ci <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 500493fb6ee3Sopenharmony_ci eight, then abort these steps.<li><p>Increment <var>outer loop counter</var> by one.<li> 500593fb6ee3Sopenharmony_ci 500693fb6ee3Sopenharmony_ci <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 500793fb6ee3Sopenharmony_ci formatting elements</a> that:</p> 500893fb6ee3Sopenharmony_ci 500993fb6ee3Sopenharmony_ci <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 501093fb6ee3Sopenharmony_ci otherwise, and<li>has the tag name <var>subject</var>.</ul> 501193fb6ee3Sopenharmony_ci 501293fb6ee3Sopenharmony_ci <p>If there is no such element, then abort these steps and instead act as described in the "any 501393fb6ee3Sopenharmony_ci other end tag" entry above.</p> 501493fb6ee3Sopenharmony_ci 501593fb6ee3Sopenharmony_ci <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 501693fb6ee3Sopenharmony_ci 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 501793fb6ee3Sopenharmony_ci 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>, 501893fb6ee3Sopenharmony_ci 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 501993fb6ee3Sopenharmony_ci <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 502093fb6ee3Sopenharmony_ci <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 502193fb6ee3Sopenharmony_ci elements</a> that is lower in the stack than <var>formatting element</var>, and is an 502293fb6ee3Sopenharmony_ci 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 502393fb6ee3Sopenharmony_ci 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 502493fb6ee3Sopenharmony_ci 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 502593fb6ee3Sopenharmony_ci 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 502693fb6ee3Sopenharmony_ci <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 502793fb6ee3Sopenharmony_ci the list.<li> 502893fb6ee3Sopenharmony_ci 502993fb6ee3Sopenharmony_ci <p>Let <var>node</var> and <var>last node</var> be <var>furthest 503093fb6ee3Sopenharmony_ci block</var>. Follow these steps:</p> 503193fb6ee3Sopenharmony_ci 503293fb6ee3Sopenharmony_ci <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> 503393fb6ee3Sopenharmony_ci 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 503493fb6ee3Sopenharmony_ci <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> 503593fb6ee3Sopenharmony_ci was removed.<li><p>If <var>node</var> is <var>formatting element</var>, then go to the 503693fb6ee3Sopenharmony_ci 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 503793fb6ee3Sopenharmony_ci 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 503893fb6ee3Sopenharmony_ci 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 503993fb6ee3Sopenharmony_ci ancestor</var> as the intended parent; replace the entry for <var>node</var> in the 504093fb6ee3Sopenharmony_ci <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 504193fb6ee3Sopenharmony_ci 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 504293fb6ee3Sopenharmony_ci 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 504393fb6ee3Sopenharmony_ci aforementioned bookmark to be immediately after the new <var>node</var> in the 504493fb6ee3Sopenharmony_ci <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 504593fb6ee3Sopenharmony_ci 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> 504693fb6ee3Sopenharmony_ci 504793fb6ee3Sopenharmony_ci <li><p>Insert whatever <var>last node</var> ended up being in the previous step at the 504893fb6ee3Sopenharmony_ci <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 504993fb6ee3Sopenharmony_ci 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 505093fb6ee3Sopenharmony_ci 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 505193fb6ee3Sopenharmony_ci block</var> as the intended parent.<li><p>Take all of the child nodes of <var>furthest block</var> and append them to the 505293fb6ee3Sopenharmony_ci 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 505393fb6ee3Sopenharmony_ci 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 505493fb6ee3Sopenharmony_ci 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 505593fb6ee3Sopenharmony_ci 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> 505693fb6ee3Sopenharmony_ci 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> 505793fb6ee3Sopenharmony_ci 505893fb6ee3Sopenharmony_ci <p class=note>This algorithm's name, the "adoption agency algorithm", comes from the way it 505993fb6ee3Sopenharmony_ci causes elements to change parents, and is in contrast with other possible algorithms for dealing 506093fb6ee3Sopenharmony_ci with misnested content, which included the "incest algorithm", the "secret affair algorithm", and 506193fb6ee3Sopenharmony_ci the "Heisenberg algorithm".</p> 506293fb6ee3Sopenharmony_ci 506393fb6ee3Sopenharmony_ci 506493fb6ee3Sopenharmony_ci 506593fb6ee3Sopenharmony_ci 506693fb6ee3Sopenharmony_ci 506793fb6ee3Sopenharmony_ci <h6 id=parsing-main-incdata>12.2.5.4.8 The "<dfn>text</dfn>" insertion mode</h6> 506893fb6ee3Sopenharmony_ci 506993fb6ee3Sopenharmony_ci <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 507093fb6ee3Sopenharmony_ci follows:</p> 507193fb6ee3Sopenharmony_ci 507293fb6ee3Sopenharmony_ci <dl class=switch><dt>A character token<dd> 507393fb6ee3Sopenharmony_ci 507493fb6ee3Sopenharmony_ci <p><a href=#insert-a-character id=parsing-main-incdata:insert-a-character>Insert the token's character</a>.</p> 507593fb6ee3Sopenharmony_ci 507693fb6ee3Sopenharmony_ci <p class=note>This can never be a U+0000 NULL character; the tokenizer converts those to 507793fb6ee3Sopenharmony_ci U+FFFD REPLACEMENT CHARACTER characters.</p> 507893fb6ee3Sopenharmony_ci 507993fb6ee3Sopenharmony_ci <dt>An end-of-file token<dd> 508093fb6ee3Sopenharmony_ci 508193fb6ee3Sopenharmony_ci 508293fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-incdata:parse-error>Parse error</a>.</p> 508393fb6ee3Sopenharmony_ci 508493fb6ee3Sopenharmony_ci <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 508593fb6ee3Sopenharmony_ci <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> 508693fb6ee3Sopenharmony_ci 508793fb6ee3Sopenharmony_ci <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> 508893fb6ee3Sopenharmony_ci 508993fb6ee3Sopenharmony_ci <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 509093fb6ee3Sopenharmony_ci reprocess the token.</p> 509193fb6ee3Sopenharmony_ci 509293fb6ee3Sopenharmony_ci <dt id=scriptEndTag>An end tag whose tag name is "script"<dd> 509393fb6ee3Sopenharmony_ci 509493fb6ee3Sopenharmony_ci <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> 509593fb6ee3Sopenharmony_ci 509693fb6ee3Sopenharmony_ci <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 509793fb6ee3Sopenharmony_ci <code id=parsing-main-incdata:the-script-element-3><a href=scripting.html#the-script-element>script</a></code> element).</p> 509893fb6ee3Sopenharmony_ci 509993fb6ee3Sopenharmony_ci <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> 510093fb6ee3Sopenharmony_ci 510193fb6ee3Sopenharmony_ci <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> 510293fb6ee3Sopenharmony_ci 510393fb6ee3Sopenharmony_ci <p>Let the <var>old insertion point</var> have the same value as the current 510493fb6ee3Sopenharmony_ci <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 510593fb6ee3Sopenharmony_ci input character</a>.</p> 510693fb6ee3Sopenharmony_ci 510793fb6ee3Sopenharmony_ci <p>Increment the parser's <a href=#script-nesting-level id=parsing-main-incdata:script-nesting-level>script nesting level</a> by one.</p> 510893fb6ee3Sopenharmony_ci 510993fb6ee3Sopenharmony_ci <p><a href=scripting.html#prepare-a-script id=parsing-main-incdata:prepare-a-script>Prepare</a> the <var>script</var>. This might 511093fb6ee3Sopenharmony_ci cause some script to execute, which might cause <a href=webappapis.html#dom-document-write id=parsing-main-incdata:dom-document-write>new characters 511193fb6ee3Sopenharmony_ci to be inserted into the tokenizer</a>, and might cause the tokenizer to output more tokens, 511293fb6ee3Sopenharmony_ci resulting in a <a href=#nestedParsing>reentrant invocation of the parser</a>.</p> 511393fb6ee3Sopenharmony_ci 511493fb6ee3Sopenharmony_ci <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 511593fb6ee3Sopenharmony_ci 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> 511693fb6ee3Sopenharmony_ci 511793fb6ee3Sopenharmony_ci <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 511893fb6ee3Sopenharmony_ci 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. 511993fb6ee3Sopenharmony_ci This value might be the "undefined" value.)</p> 512093fb6ee3Sopenharmony_ci 512193fb6ee3Sopenharmony_ci <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 512293fb6ee3Sopenharmony_ci script</a>, then:</p> 512393fb6ee3Sopenharmony_ci 512493fb6ee3Sopenharmony_ci <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> 512593fb6ee3Sopenharmony_ci 512693fb6ee3Sopenharmony_ci <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 512793fb6ee3Sopenharmony_ci invocations of the tokenizer, yielding control back to the caller. (Tokenization will resume 512893fb6ee3Sopenharmony_ci when the caller returns to the "outer" tree construction stage.)</p> 512993fb6ee3Sopenharmony_ci 513093fb6ee3Sopenharmony_ci <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> 513193fb6ee3Sopenharmony_ci 513293fb6ee3Sopenharmony_ci <dt>Otherwise:<dd> 513393fb6ee3Sopenharmony_ci 513493fb6ee3Sopenharmony_ci <p>Run these steps:</p> 513593fb6ee3Sopenharmony_ci 513693fb6ee3Sopenharmony_ci <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 513793fb6ee3Sopenharmony_ci 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 513893fb6ee3Sopenharmony_ci <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 513993fb6ee3Sopenharmony_ci 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> 514093fb6ee3Sopenharmony_ci 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> 514193fb6ee3Sopenharmony_ci <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 514293fb6ee3Sopenharmony_ci <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> 514393fb6ee3Sopenharmony_ci 514493fb6ee3Sopenharmony_ci <p>If this <a href=#abort-a-parser id=parsing-main-incdata:abort-a-parser>parser has been aborted</a> in the meantime, 514593fb6ee3Sopenharmony_ci abort these steps.</p> 514693fb6ee3Sopenharmony_ci 514793fb6ee3Sopenharmony_ci <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> 514893fb6ee3Sopenharmony_ci 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 514993fb6ee3Sopenharmony_ci <code id=parsing-main-incdata:document-3><a href=dom.html#document>Document</a></code>.</p> 515093fb6ee3Sopenharmony_ci 515193fb6ee3Sopenharmony_ci <li><p>Unblock the <a href=#tokenization id=parsing-main-incdata:tokenization-3>tokenizer</a> for this instance of the 515293fb6ee3Sopenharmony_ci <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 515393fb6ee3Sopenharmony_ci <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 515493fb6ee3Sopenharmony_ci 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 515593fb6ee3Sopenharmony_ci 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 515693fb6ee3Sopenharmony_ci 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 515793fb6ee3Sopenharmony_ci <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 515893fb6ee3Sopenharmony_ci the <a href=#parser-pause-flag id=parsing-main-incdata:parser-pause-flag-3>parser pause flag</a> to false.</p> 515993fb6ee3Sopenharmony_ci 516093fb6ee3Sopenharmony_ci <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 516193fb6ee3Sopenharmony_ci these steps from step 1.</ol> 516293fb6ee3Sopenharmony_ci 516393fb6ee3Sopenharmony_ci </dl> 516493fb6ee3Sopenharmony_ci 516593fb6ee3Sopenharmony_ci <dt>Any other end tag<dd> 516693fb6ee3Sopenharmony_ci 516793fb6ee3Sopenharmony_ci <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> 516893fb6ee3Sopenharmony_ci 516993fb6ee3Sopenharmony_ci <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> 517093fb6ee3Sopenharmony_ci 517193fb6ee3Sopenharmony_ci </dl> 517293fb6ee3Sopenharmony_ci 517393fb6ee3Sopenharmony_ci 517493fb6ee3Sopenharmony_ci <h6 id=parsing-main-intable>12.2.5.4.9 The "<dfn>in table</dfn>" insertion mode</h6> 517593fb6ee3Sopenharmony_ci 517693fb6ee3Sopenharmony_ci <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 517793fb6ee3Sopenharmony_ci 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> 517893fb6ee3Sopenharmony_ci 517993fb6ee3Sopenharmony_ci <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> 518093fb6ee3Sopenharmony_ci 518193fb6ee3Sopenharmony_ci <p>Let the <dfn id=concept-pending-table-char-tokens><var>pending table character 518293fb6ee3Sopenharmony_ci tokens</var></dfn> be an empty list of tokens.</p> 518393fb6ee3Sopenharmony_ci 518493fb6ee3Sopenharmony_ci <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> 518593fb6ee3Sopenharmony_ci 518693fb6ee3Sopenharmony_ci <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 518793fb6ee3Sopenharmony_ci table text</a>" and reprocess the token.</p> 518893fb6ee3Sopenharmony_ci 518993fb6ee3Sopenharmony_ci <dt>A comment token<dd> 519093fb6ee3Sopenharmony_ci <p><a href=#insert-a-comment id=parsing-main-intable:insert-a-comment>Insert a comment</a>.</p> 519193fb6ee3Sopenharmony_ci <dt>A DOCTYPE token<dd> 519293fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-intable:parse-error>Parse error</a>. Ignore the token.</p> 519393fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "caption"<dd> 519493fb6ee3Sopenharmony_ci 519593fb6ee3Sopenharmony_ci <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> 519693fb6ee3Sopenharmony_ci 519793fb6ee3Sopenharmony_ci <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 519893fb6ee3Sopenharmony_ci active formatting elements</a>.</p> 519993fb6ee3Sopenharmony_ci 520093fb6ee3Sopenharmony_ci <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 520193fb6ee3Sopenharmony_ci mode</a> to "<a href=#parsing-main-incaption id=parsing-main-intable:parsing-main-incaption>in caption</a>".</p> 520293fb6ee3Sopenharmony_ci 520393fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "colgroup"<dd> 520493fb6ee3Sopenharmony_ci 520593fb6ee3Sopenharmony_ci <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> 520693fb6ee3Sopenharmony_ci 520793fb6ee3Sopenharmony_ci <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 520893fb6ee3Sopenharmony_ci mode</a> to "<a href=#parsing-main-incolgroup id=parsing-main-intable:parsing-main-incolgroup>in column group</a>".</p> 520993fb6ee3Sopenharmony_ci 521093fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "col"<dd> 521193fb6ee3Sopenharmony_ci 521293fb6ee3Sopenharmony_ci 521393fb6ee3Sopenharmony_ci <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> 521493fb6ee3Sopenharmony_ci 521593fb6ee3Sopenharmony_ci <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 521693fb6ee3Sopenharmony_ci 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 521793fb6ee3Sopenharmony_ci column group</a>".</p> 521893fb6ee3Sopenharmony_ci 521993fb6ee3Sopenharmony_ci 522093fb6ee3Sopenharmony_ci <p>Reprocess the current token.</p> 522193fb6ee3Sopenharmony_ci 522293fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is one of: "tbody", "tfoot", "thead"<dd> 522393fb6ee3Sopenharmony_ci 522493fb6ee3Sopenharmony_ci <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> 522593fb6ee3Sopenharmony_ci 522693fb6ee3Sopenharmony_ci <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 522793fb6ee3Sopenharmony_ci mode</a> to "<a href=#parsing-main-intbody id=parsing-main-intable:parsing-main-intbody>in table body</a>".</p> 522893fb6ee3Sopenharmony_ci 522993fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is one of: "td", "th", "tr"<dd> 523093fb6ee3Sopenharmony_ci 523193fb6ee3Sopenharmony_ci 523293fb6ee3Sopenharmony_ci <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> 523393fb6ee3Sopenharmony_ci 523493fb6ee3Sopenharmony_ci <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 523593fb6ee3Sopenharmony_ci 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 523693fb6ee3Sopenharmony_ci body</a>".</p> 523793fb6ee3Sopenharmony_ci 523893fb6ee3Sopenharmony_ci 523993fb6ee3Sopenharmony_ci <p>Reprocess the current token.</p> 524093fb6ee3Sopenharmony_ci 524193fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "table"<dd> 524293fb6ee3Sopenharmony_ci 524393fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-intable:parse-error-2>Parse error</a>.</p> 524493fb6ee3Sopenharmony_ci 524593fb6ee3Sopenharmony_ci 524693fb6ee3Sopenharmony_ci <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> 524793fb6ee3Sopenharmony_ci 524893fb6ee3Sopenharmony_ci <p>Otherwise:</p> 524993fb6ee3Sopenharmony_ci 525093fb6ee3Sopenharmony_ci <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 525193fb6ee3Sopenharmony_ci stack.</p> 525293fb6ee3Sopenharmony_ci 525393fb6ee3Sopenharmony_ci <p><a href=#reset-the-insertion-mode-appropriately id=parsing-main-intable:reset-the-insertion-mode-appropriately>Reset the insertion mode appropriately</a>.</p> 525493fb6ee3Sopenharmony_ci 525593fb6ee3Sopenharmony_ci 525693fb6ee3Sopenharmony_ci <p>Reprocess the token.</p> 525793fb6ee3Sopenharmony_ci 525893fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is "table"<dd> 525993fb6ee3Sopenharmony_ci 526093fb6ee3Sopenharmony_ci <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 526193fb6ee3Sopenharmony_ci error</a>; ignore the token.</p> 526293fb6ee3Sopenharmony_ci 526393fb6ee3Sopenharmony_ci <p>Otherwise:</p> 526493fb6ee3Sopenharmony_ci 526593fb6ee3Sopenharmony_ci <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 526693fb6ee3Sopenharmony_ci stack.</p> 526793fb6ee3Sopenharmony_ci 526893fb6ee3Sopenharmony_ci <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> 526993fb6ee3Sopenharmony_ci 527093fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is one of: "body", "caption", "col", "colgroup", "html", "tbody", 527193fb6ee3Sopenharmony_ci "td", "tfoot", "th", "thead", "tr"<dd> 527293fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-intable:parse-error-4>Parse error</a>. Ignore the token.</p> 527393fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is one of: "style", "script", "template"<dt>An end tag whose tag name is "template"<dd> 527493fb6ee3Sopenharmony_ci 527593fb6ee3Sopenharmony_ci <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 527693fb6ee3Sopenharmony_ci mode</a>.</p> 527793fb6ee3Sopenharmony_ci 527893fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "input"<dd> 527993fb6ee3Sopenharmony_ci 528093fb6ee3Sopenharmony_ci <p>If the token does not have an attribute with the name "type", or if it does, but that 528193fb6ee3Sopenharmony_ci 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> 528293fb6ee3Sopenharmony_ci 528393fb6ee3Sopenharmony_ci <p>Otherwise:</p> 528493fb6ee3Sopenharmony_ci 528593fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-intable:parse-error-5>Parse error</a>.</p> 528693fb6ee3Sopenharmony_ci 528793fb6ee3Sopenharmony_ci <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> 528893fb6ee3Sopenharmony_ci 528993fb6ee3Sopenharmony_ci <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> 529093fb6ee3Sopenharmony_ci 529193fb6ee3Sopenharmony_ci <p><a href=#acknowledge-self-closing-flag id=parsing-main-intable:acknowledge-self-closing-flag>Acknowledge the token's <i>self-closing 529293fb6ee3Sopenharmony_ci flag</i></a>, if it is set.</p> 529393fb6ee3Sopenharmony_ci 529493fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "form"<dd> 529593fb6ee3Sopenharmony_ci 529693fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-intable:parse-error-6>Parse error</a>.</p> 529793fb6ee3Sopenharmony_ci 529893fb6ee3Sopenharmony_ci <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 529993fb6ee3Sopenharmony_ci the <a href=#form-element-pointer id=parsing-main-intable:form-element-pointer><code>form</code> element pointer</a> is not null, ignore the 530093fb6ee3Sopenharmony_ci token.</p> 530193fb6ee3Sopenharmony_ci 530293fb6ee3Sopenharmony_ci <p>Otherwise:</p> 530393fb6ee3Sopenharmony_ci 530493fb6ee3Sopenharmony_ci <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> 530593fb6ee3Sopenharmony_ci 530693fb6ee3Sopenharmony_ci <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> 530793fb6ee3Sopenharmony_ci 530893fb6ee3Sopenharmony_ci <dt>An end-of-file token<dd> 530993fb6ee3Sopenharmony_ci 531093fb6ee3Sopenharmony_ci <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> 531193fb6ee3Sopenharmony_ci 531293fb6ee3Sopenharmony_ci <dt>Anything else<dd> 531393fb6ee3Sopenharmony_ci 531493fb6ee3Sopenharmony_ci <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 531593fb6ee3Sopenharmony_ci 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 531693fb6ee3Sopenharmony_ci 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 531793fb6ee3Sopenharmony_ci parenting</a>.</p> 531893fb6ee3Sopenharmony_ci 531993fb6ee3Sopenharmony_ci </dl> 532093fb6ee3Sopenharmony_ci 532193fb6ee3Sopenharmony_ci <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 532293fb6ee3Sopenharmony_ci 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>, 532393fb6ee3Sopenharmony_ci <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 532493fb6ee3Sopenharmony_ci elements</a>.</p> 532593fb6ee3Sopenharmony_ci 532693fb6ee3Sopenharmony_ci <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> 532793fb6ee3Sopenharmony_ci 532893fb6ee3Sopenharmony_ci <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 532993fb6ee3Sopenharmony_ci process is a <a href=#fragment-case id=parsing-main-intable:fragment-case>fragment case</a>.</p> 533093fb6ee3Sopenharmony_ci 533193fb6ee3Sopenharmony_ci 533293fb6ee3Sopenharmony_ci 533393fb6ee3Sopenharmony_ci <h6 id=parsing-main-intabletext>12.2.5.4.10 The "<dfn>in table text</dfn>" insertion mode</h6> 533493fb6ee3Sopenharmony_ci 533593fb6ee3Sopenharmony_ci <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 533693fb6ee3Sopenharmony_ci follows:</p> 533793fb6ee3Sopenharmony_ci 533893fb6ee3Sopenharmony_ci <dl class=switch><dt>A character token that is U+0000 NULL<dd> 533993fb6ee3Sopenharmony_ci 534093fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-intabletext:parse-error>Parse error</a>. Ignore the token.</p> 534193fb6ee3Sopenharmony_ci 534293fb6ee3Sopenharmony_ci <dt>Any other character token<dd> 534393fb6ee3Sopenharmony_ci 534493fb6ee3Sopenharmony_ci <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 534593fb6ee3Sopenharmony_ci table character tokens</a></var> list.</p> 534693fb6ee3Sopenharmony_ci 534793fb6ee3Sopenharmony_ci <dt>Anything else<dd> 534893fb6ee3Sopenharmony_ci 534993fb6ee3Sopenharmony_ci 535093fb6ee3Sopenharmony_ci 535193fb6ee3Sopenharmony_ci <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 535293fb6ee3Sopenharmony_ci 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 535393fb6ee3Sopenharmony_ci 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 535493fb6ee3Sopenharmony_ci 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> 535593fb6ee3Sopenharmony_ci 535693fb6ee3Sopenharmony_ci 535793fb6ee3Sopenharmony_ci 535893fb6ee3Sopenharmony_ci <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> 535993fb6ee3Sopenharmony_ci 536093fb6ee3Sopenharmony_ci 536193fb6ee3Sopenharmony_ci 536293fb6ee3Sopenharmony_ci <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 536393fb6ee3Sopenharmony_ci reprocess the token.</p> 536493fb6ee3Sopenharmony_ci 536593fb6ee3Sopenharmony_ci </dl> 536693fb6ee3Sopenharmony_ci 536793fb6ee3Sopenharmony_ci 536893fb6ee3Sopenharmony_ci <h6 id=parsing-main-incaption>12.2.5.4.11 The "<dfn>in caption</dfn>" insertion mode</h6> 536993fb6ee3Sopenharmony_ci 537093fb6ee3Sopenharmony_ci <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 537193fb6ee3Sopenharmony_ci 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> 537293fb6ee3Sopenharmony_ci 537393fb6ee3Sopenharmony_ci <dl class=switch><dt>An end tag whose tag name is "caption"<dd> 537493fb6ee3Sopenharmony_ci 537593fb6ee3Sopenharmony_ci <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 537693fb6ee3Sopenharmony_ci error</a>; ignore the token. (<a href=#fragment-case id=parsing-main-incaption:fragment-case>fragment case</a>)</p> 537793fb6ee3Sopenharmony_ci 537893fb6ee3Sopenharmony_ci <p>Otherwise:</p> 537993fb6ee3Sopenharmony_ci 538093fb6ee3Sopenharmony_ci <p><a href=#generate-implied-end-tags id=parsing-main-incaption:generate-implied-end-tags>Generate implied end tags</a>.</p> 538193fb6ee3Sopenharmony_ci 538293fb6ee3Sopenharmony_ci <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 538393fb6ee3Sopenharmony_ci <a href=#parse-error id=parsing-main-incaption:parse-error-2>parse error</a>.</p> 538493fb6ee3Sopenharmony_ci 538593fb6ee3Sopenharmony_ci <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 538693fb6ee3Sopenharmony_ci stack.</p> 538793fb6ee3Sopenharmony_ci 538893fb6ee3Sopenharmony_ci <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> 538993fb6ee3Sopenharmony_ci 539093fb6ee3Sopenharmony_ci <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 539193fb6ee3Sopenharmony_ci table</a>".</p> 539293fb6ee3Sopenharmony_ci 539393fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is one of: "caption", "col", "colgroup", "tbody", "td", "tfoot", 539493fb6ee3Sopenharmony_ci "th", "thead", "tr"<dt>An end tag whose tag name is "table"<dd> 539593fb6ee3Sopenharmony_ci 539693fb6ee3Sopenharmony_ci <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 539793fb6ee3Sopenharmony_ci error</a>; ignore the token. (<a href=#fragment-case id=parsing-main-incaption:fragment-case-2>fragment case</a>)</p> 539893fb6ee3Sopenharmony_ci 539993fb6ee3Sopenharmony_ci <p>Otherwise:</p> 540093fb6ee3Sopenharmony_ci 540193fb6ee3Sopenharmony_ci 540293fb6ee3Sopenharmony_ci <p><a href=#generate-implied-end-tags id=parsing-main-incaption:generate-implied-end-tags-2>Generate implied end tags</a>.</p> 540393fb6ee3Sopenharmony_ci 540493fb6ee3Sopenharmony_ci <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 540593fb6ee3Sopenharmony_ci <a href=#parse-error id=parsing-main-incaption:parse-error-4>parse error</a>.</p> 540693fb6ee3Sopenharmony_ci 540793fb6ee3Sopenharmony_ci <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 540893fb6ee3Sopenharmony_ci stack.</p> 540993fb6ee3Sopenharmony_ci 541093fb6ee3Sopenharmony_ci <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> 541193fb6ee3Sopenharmony_ci 541293fb6ee3Sopenharmony_ci <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 541393fb6ee3Sopenharmony_ci table</a>".</p> 541493fb6ee3Sopenharmony_ci 541593fb6ee3Sopenharmony_ci 541693fb6ee3Sopenharmony_ci <p>Reprocess the token.</p> 541793fb6ee3Sopenharmony_ci 541893fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is one of: "body", "col", "colgroup", "html", "tbody", "td", 541993fb6ee3Sopenharmony_ci "tfoot", "th", "thead", "tr"<dd> 542093fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-incaption:parse-error-5>Parse error</a>. Ignore the token.</p> 542193fb6ee3Sopenharmony_ci <dt>Anything else<dd> 542293fb6ee3Sopenharmony_ci 542393fb6ee3Sopenharmony_ci <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> 542493fb6ee3Sopenharmony_ci 542593fb6ee3Sopenharmony_ci </dl> 542693fb6ee3Sopenharmony_ci 542793fb6ee3Sopenharmony_ci 542893fb6ee3Sopenharmony_ci <h6 id=parsing-main-incolgroup>12.2.5.4.12 The "<dfn>in column group</dfn>" insertion mode</h6> 542993fb6ee3Sopenharmony_ci 543093fb6ee3Sopenharmony_ci <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 543193fb6ee3Sopenharmony_ci as follows:</p> 543293fb6ee3Sopenharmony_ci 543393fb6ee3Sopenharmony_ci <dl class=switch><dt>A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C 543493fb6ee3Sopenharmony_ci FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dd> 543593fb6ee3Sopenharmony_ci <p><a href=#insert-a-character id=parsing-main-incolgroup:insert-a-character>Insert the character</a>.</p> 543693fb6ee3Sopenharmony_ci <dt>A comment token<dd> 543793fb6ee3Sopenharmony_ci <p><a href=#insert-a-comment id=parsing-main-incolgroup:insert-a-comment>Insert a comment</a>.</p> 543893fb6ee3Sopenharmony_ci <dt>A DOCTYPE token<dd> 543993fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-incolgroup:parse-error>Parse error</a>. Ignore the token.</p> 544093fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "html"<dd> 544193fb6ee3Sopenharmony_ci 544293fb6ee3Sopenharmony_ci <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> 544393fb6ee3Sopenharmony_ci 544493fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "col"<dd> 544593fb6ee3Sopenharmony_ci 544693fb6ee3Sopenharmony_ci <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 544793fb6ee3Sopenharmony_ci node</a> off the <a href=#stack-of-open-elements id=parsing-main-incolgroup:stack-of-open-elements>stack of open elements</a>.</p> 544893fb6ee3Sopenharmony_ci 544993fb6ee3Sopenharmony_ci <p><a href=#acknowledge-self-closing-flag id=parsing-main-incolgroup:acknowledge-self-closing-flag>Acknowledge the token's <i>self-closing 545093fb6ee3Sopenharmony_ci flag</i></a>, if it is set.</p> 545193fb6ee3Sopenharmony_ci 545293fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is "colgroup"<dd> 545393fb6ee3Sopenharmony_ci 545493fb6ee3Sopenharmony_ci <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 545593fb6ee3Sopenharmony_ci <a href=#parse-error id=parsing-main-incolgroup:parse-error-2>parse error</a>; ignore the token.</p> 545693fb6ee3Sopenharmony_ci 545793fb6ee3Sopenharmony_ci <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>. 545893fb6ee3Sopenharmony_ci 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 545993fb6ee3Sopenharmony_ci table</a>".</p> 546093fb6ee3Sopenharmony_ci 546193fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is "col"<dd> 546293fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-incolgroup:parse-error-3>Parse error</a>. Ignore the token.</p> 546393fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "template"<dt>An end tag whose tag name is "template"<dd> 546493fb6ee3Sopenharmony_ci 546593fb6ee3Sopenharmony_ci <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> 546693fb6ee3Sopenharmony_ci 546793fb6ee3Sopenharmony_ci <dt>An end-of-file token<dd> 546893fb6ee3Sopenharmony_ci 546993fb6ee3Sopenharmony_ci <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> 547093fb6ee3Sopenharmony_ci 547193fb6ee3Sopenharmony_ci <dt>Anything else<dd> 547293fb6ee3Sopenharmony_ci 547393fb6ee3Sopenharmony_ci 547493fb6ee3Sopenharmony_ci <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 547593fb6ee3Sopenharmony_ci <a href=#parse-error id=parsing-main-incolgroup:parse-error-4>parse error</a>; ignore the token.</p> 547693fb6ee3Sopenharmony_ci 547793fb6ee3Sopenharmony_ci <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 547893fb6ee3Sopenharmony_ci elements</a>.</p> 547993fb6ee3Sopenharmony_ci 548093fb6ee3Sopenharmony_ci <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 548193fb6ee3Sopenharmony_ci table</a>".</p> 548293fb6ee3Sopenharmony_ci 548393fb6ee3Sopenharmony_ci 548493fb6ee3Sopenharmony_ci <p>Reprocess the token.</p> 548593fb6ee3Sopenharmony_ci 548693fb6ee3Sopenharmony_ci </dl> 548793fb6ee3Sopenharmony_ci 548893fb6ee3Sopenharmony_ci 548993fb6ee3Sopenharmony_ci <h6 id=parsing-main-intbody>12.2.5.4.13 The "<dfn>in table body</dfn>" insertion mode</h6> 549093fb6ee3Sopenharmony_ci 549193fb6ee3Sopenharmony_ci <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 549293fb6ee3Sopenharmony_ci follows:</p> 549393fb6ee3Sopenharmony_ci 549493fb6ee3Sopenharmony_ci <dl class=switch><dt>A start tag whose tag name is "tr"<dd> 549593fb6ee3Sopenharmony_ci 549693fb6ee3Sopenharmony_ci <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> 549793fb6ee3Sopenharmony_ci 549893fb6ee3Sopenharmony_ci <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 549993fb6ee3Sopenharmony_ci mode</a> to "<a href=#parsing-main-intr id=parsing-main-intbody:parsing-main-intr>in row</a>".</p> 550093fb6ee3Sopenharmony_ci 550193fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is one of: "th", "td"<dd> 550293fb6ee3Sopenharmony_ci 550393fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-intbody:parse-error>Parse error</a>.</p> 550493fb6ee3Sopenharmony_ci 550593fb6ee3Sopenharmony_ci 550693fb6ee3Sopenharmony_ci <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> 550793fb6ee3Sopenharmony_ci 550893fb6ee3Sopenharmony_ci <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 550993fb6ee3Sopenharmony_ci 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 551093fb6ee3Sopenharmony_ci row</a>".</p> 551193fb6ee3Sopenharmony_ci 551293fb6ee3Sopenharmony_ci 551393fb6ee3Sopenharmony_ci <p>Reprocess the current token.</p> 551493fb6ee3Sopenharmony_ci 551593fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is one of: "tbody", "tfoot", 551693fb6ee3Sopenharmony_ci "thead"<dd> 551793fb6ee3Sopenharmony_ci 551893fb6ee3Sopenharmony_ci <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 551993fb6ee3Sopenharmony_ci 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>; 552093fb6ee3Sopenharmony_ci ignore the token.</p> 552193fb6ee3Sopenharmony_ci 552293fb6ee3Sopenharmony_ci <p>Otherwise:</p> 552393fb6ee3Sopenharmony_ci 552493fb6ee3Sopenharmony_ci <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> 552593fb6ee3Sopenharmony_ci 552693fb6ee3Sopenharmony_ci <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 552793fb6ee3Sopenharmony_ci <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> 552893fb6ee3Sopenharmony_ci 552993fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is one of: "caption", "col", 553093fb6ee3Sopenharmony_ci "colgroup", "tbody", "tfoot", "thead"<dt>An end tag whose tag name is "table"<dd> 553193fb6ee3Sopenharmony_ci 553293fb6ee3Sopenharmony_ci <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 553393fb6ee3Sopenharmony_ci scope</a>, this is a <a href=#parse-error id=parsing-main-intbody:parse-error-3>parse error</a>; ignore the token.</p> 553493fb6ee3Sopenharmony_ci 553593fb6ee3Sopenharmony_ci <p>Otherwise:</p> 553693fb6ee3Sopenharmony_ci 553793fb6ee3Sopenharmony_ci <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> 553893fb6ee3Sopenharmony_ci 553993fb6ee3Sopenharmony_ci 554093fb6ee3Sopenharmony_ci 554193fb6ee3Sopenharmony_ci <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 554293fb6ee3Sopenharmony_ci <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> 554393fb6ee3Sopenharmony_ci 554493fb6ee3Sopenharmony_ci 554593fb6ee3Sopenharmony_ci 554693fb6ee3Sopenharmony_ci <p>Reprocess the token.</p> 554793fb6ee3Sopenharmony_ci 554893fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is one of: "body", "caption", "col", "colgroup", "html", "td", 554993fb6ee3Sopenharmony_ci "th", "tr"<dd> 555093fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-intbody:parse-error-4>Parse error</a>. Ignore the token.</p> 555193fb6ee3Sopenharmony_ci <dt>Anything else<dd> 555293fb6ee3Sopenharmony_ci <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> 555393fb6ee3Sopenharmony_ci </dl> 555493fb6ee3Sopenharmony_ci 555593fb6ee3Sopenharmony_ci <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>, 555693fb6ee3Sopenharmony_ci 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>, 555793fb6ee3Sopenharmony_ci <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 555893fb6ee3Sopenharmony_ci elements from the <a href=#stack-of-open-elements id=parsing-main-intbody:stack-of-open-elements-5>stack of open elements</a>.</p> 555993fb6ee3Sopenharmony_ci 556093fb6ee3Sopenharmony_ci <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 556193fb6ee3Sopenharmony_ci process is a <a href=#fragment-case id=parsing-main-intbody:fragment-case>fragment case</a>.</p> 556293fb6ee3Sopenharmony_ci 556393fb6ee3Sopenharmony_ci 556493fb6ee3Sopenharmony_ci <h6 id=parsing-main-intr>12.2.5.4.14 The "<dfn>in row</dfn>" insertion mode</h6> 556593fb6ee3Sopenharmony_ci 556693fb6ee3Sopenharmony_ci <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 556793fb6ee3Sopenharmony_ci 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> 556893fb6ee3Sopenharmony_ci 556993fb6ee3Sopenharmony_ci <dl class=switch><dt>A start tag whose tag name is one of: "th", "td"<dd> 557093fb6ee3Sopenharmony_ci 557193fb6ee3Sopenharmony_ci <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> 557293fb6ee3Sopenharmony_ci 557393fb6ee3Sopenharmony_ci <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 557493fb6ee3Sopenharmony_ci mode</a> to "<a href=#parsing-main-intd id=parsing-main-intr:parsing-main-intd>in cell</a>".</p> 557593fb6ee3Sopenharmony_ci 557693fb6ee3Sopenharmony_ci <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 557793fb6ee3Sopenharmony_ci active formatting elements</a>.</p> 557893fb6ee3Sopenharmony_ci 557993fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is "tr"<dd> 558093fb6ee3Sopenharmony_ci 558193fb6ee3Sopenharmony_ci <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>; 558293fb6ee3Sopenharmony_ci ignore the token.</p> 558393fb6ee3Sopenharmony_ci 558493fb6ee3Sopenharmony_ci <p>Otherwise:</p> 558593fb6ee3Sopenharmony_ci 558693fb6ee3Sopenharmony_ci <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> 558793fb6ee3Sopenharmony_ci 558893fb6ee3Sopenharmony_ci <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 558993fb6ee3Sopenharmony_ci <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> 559093fb6ee3Sopenharmony_ci 559193fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is one of: "caption", "col", "colgroup", "tbody", "tfoot", 559293fb6ee3Sopenharmony_ci "thead", "tr"<dt>An end tag whose tag name is "table"<dd> 559393fb6ee3Sopenharmony_ci 559493fb6ee3Sopenharmony_ci 559593fb6ee3Sopenharmony_ci <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>; 559693fb6ee3Sopenharmony_ci ignore the token.</p> 559793fb6ee3Sopenharmony_ci 559893fb6ee3Sopenharmony_ci <p>Otherwise:</p> 559993fb6ee3Sopenharmony_ci 560093fb6ee3Sopenharmony_ci <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> 560193fb6ee3Sopenharmony_ci 560293fb6ee3Sopenharmony_ci <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 560393fb6ee3Sopenharmony_ci <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> 560493fb6ee3Sopenharmony_ci 560593fb6ee3Sopenharmony_ci 560693fb6ee3Sopenharmony_ci <p>Reprocess the token.</p> 560793fb6ee3Sopenharmony_ci 560893fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is one of: "tbody", "tfoot", "thead"<dd> 560993fb6ee3Sopenharmony_ci 561093fb6ee3Sopenharmony_ci <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 561193fb6ee3Sopenharmony_ci 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>; 561293fb6ee3Sopenharmony_ci ignore the token.</p> 561393fb6ee3Sopenharmony_ci 561493fb6ee3Sopenharmony_ci 561593fb6ee3Sopenharmony_ci <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> 561693fb6ee3Sopenharmony_ci 561793fb6ee3Sopenharmony_ci <p>Otherwise:</p> 561893fb6ee3Sopenharmony_ci 561993fb6ee3Sopenharmony_ci <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> 562093fb6ee3Sopenharmony_ci 562193fb6ee3Sopenharmony_ci <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 562293fb6ee3Sopenharmony_ci <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> 562393fb6ee3Sopenharmony_ci 562493fb6ee3Sopenharmony_ci 562593fb6ee3Sopenharmony_ci <p>Reprocess the token.</p> 562693fb6ee3Sopenharmony_ci 562793fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is one of: "body", "caption", "col", "colgroup", "html", "td", 562893fb6ee3Sopenharmony_ci "th"<dd> 562993fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-intr:parse-error-4>Parse error</a>. Ignore the token.</p> 563093fb6ee3Sopenharmony_ci <dt>Anything else<dd> 563193fb6ee3Sopenharmony_ci 563293fb6ee3Sopenharmony_ci <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> 563393fb6ee3Sopenharmony_ci 563493fb6ee3Sopenharmony_ci </dl> 563593fb6ee3Sopenharmony_ci 563693fb6ee3Sopenharmony_ci <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>, 563793fb6ee3Sopenharmony_ci 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>, 563893fb6ee3Sopenharmony_ci <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 563993fb6ee3Sopenharmony_ci elements</a>.</p> 564093fb6ee3Sopenharmony_ci 564193fb6ee3Sopenharmony_ci <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 564293fb6ee3Sopenharmony_ci process is a <a href=#fragment-case id=parsing-main-intr:fragment-case>fragment case</a>.</p> 564393fb6ee3Sopenharmony_ci 564493fb6ee3Sopenharmony_ci 564593fb6ee3Sopenharmony_ci <h6 id=parsing-main-intd>12.2.5.4.15 The "<dfn>in cell</dfn>" insertion mode</h6> 564693fb6ee3Sopenharmony_ci 564793fb6ee3Sopenharmony_ci <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> 564893fb6ee3Sopenharmony_ci 564993fb6ee3Sopenharmony_ci <dl class=switch><dt>An end tag whose tag name is one of: "td", "th"<dd> 565093fb6ee3Sopenharmony_ci 565193fb6ee3Sopenharmony_ci <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 565293fb6ee3Sopenharmony_ci 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 565393fb6ee3Sopenharmony_ci error</a>; ignore the token.</p> 565493fb6ee3Sopenharmony_ci 565593fb6ee3Sopenharmony_ci <p>Otherwise:</p> 565693fb6ee3Sopenharmony_ci 565793fb6ee3Sopenharmony_ci <p><a href=#generate-implied-end-tags id=parsing-main-intd:generate-implied-end-tags>Generate implied end tags</a>.</p> 565893fb6ee3Sopenharmony_ci 565993fb6ee3Sopenharmony_ci <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 566093fb6ee3Sopenharmony_ci 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> 566193fb6ee3Sopenharmony_ci 566293fb6ee3Sopenharmony_ci <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 566393fb6ee3Sopenharmony_ci stack.</p> 566493fb6ee3Sopenharmony_ci 566593fb6ee3Sopenharmony_ci <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> 566693fb6ee3Sopenharmony_ci 566793fb6ee3Sopenharmony_ci <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 566893fb6ee3Sopenharmony_ci row</a>".</p> 566993fb6ee3Sopenharmony_ci 567093fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is one of: "caption", "col", 567193fb6ee3Sopenharmony_ci "colgroup", "tbody", "td", "tfoot", "th", "thead", "tr"<dd> 567293fb6ee3Sopenharmony_ci 567393fb6ee3Sopenharmony_ci <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 567493fb6ee3Sopenharmony_ci 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> 567593fb6ee3Sopenharmony_ci 567693fb6ee3Sopenharmony_ci <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> 567793fb6ee3Sopenharmony_ci 567893fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is one of: "body", "caption", 567993fb6ee3Sopenharmony_ci "col", "colgroup", "html"<dd> 568093fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-intd:parse-error-4>Parse error</a>. Ignore the token.</p> 568193fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is one of: "table", "tbody", 568293fb6ee3Sopenharmony_ci "tfoot", "thead", "tr"<dd> 568393fb6ee3Sopenharmony_ci 568493fb6ee3Sopenharmony_ci <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 568593fb6ee3Sopenharmony_ci 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 568693fb6ee3Sopenharmony_ci error</a>; ignore the token.</p> 568793fb6ee3Sopenharmony_ci 568893fb6ee3Sopenharmony_ci <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> 568993fb6ee3Sopenharmony_ci 569093fb6ee3Sopenharmony_ci <dt>Anything else<dd> 569193fb6ee3Sopenharmony_ci 569293fb6ee3Sopenharmony_ci <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> 569393fb6ee3Sopenharmony_ci 569493fb6ee3Sopenharmony_ci </dl> 569593fb6ee3Sopenharmony_ci 569693fb6ee3Sopenharmony_ci <p>Where the steps above say to <dfn id=close-the-cell>close the cell</dfn>, they mean to run the following 569793fb6ee3Sopenharmony_ci algorithm:</p> 569893fb6ee3Sopenharmony_ci 569993fb6ee3Sopenharmony_ci <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> 570093fb6ee3Sopenharmony_ci 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> 570193fb6ee3Sopenharmony_ci 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 570293fb6ee3Sopenharmony_ci row</a>".</ol> 570393fb6ee3Sopenharmony_ci 570493fb6ee3Sopenharmony_ci <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 570593fb6ee3Sopenharmony_ci <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 570693fb6ee3Sopenharmony_ci 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> 570793fb6ee3Sopenharmony_ci 570893fb6ee3Sopenharmony_ci 570993fb6ee3Sopenharmony_ci <h6 id=parsing-main-inselect>12.2.5.4.16 The "<dfn>in select</dfn>" insertion mode</h6> 571093fb6ee3Sopenharmony_ci 571193fb6ee3Sopenharmony_ci <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 571293fb6ee3Sopenharmony_ci 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> 571393fb6ee3Sopenharmony_ci 571493fb6ee3Sopenharmony_ci <dl class=switch><dt>A character token that is U+0000 NULL<dd> 571593fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-inselect:parse-error>Parse error</a>. Ignore the token.</p> 571693fb6ee3Sopenharmony_ci <dt>Any other character token<dd> 571793fb6ee3Sopenharmony_ci 571893fb6ee3Sopenharmony_ci <p><a href=#insert-a-character id=parsing-main-inselect:insert-a-character>Insert the token's character</a>.</p> 571993fb6ee3Sopenharmony_ci 572093fb6ee3Sopenharmony_ci <dt>A comment token<dd> 572193fb6ee3Sopenharmony_ci <p><a href=#insert-a-comment id=parsing-main-inselect:insert-a-comment>Insert a comment</a>.</p> 572293fb6ee3Sopenharmony_ci <dt>A DOCTYPE token<dd> 572393fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-inselect:parse-error-2>Parse error</a>. Ignore the token.</p> 572493fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "html"<dd> 572593fb6ee3Sopenharmony_ci 572693fb6ee3Sopenharmony_ci <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> 572793fb6ee3Sopenharmony_ci 572893fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "option"<dd> 572993fb6ee3Sopenharmony_ci 573093fb6ee3Sopenharmony_ci 573193fb6ee3Sopenharmony_ci <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 573293fb6ee3Sopenharmony_ci <a href=#stack-of-open-elements id=parsing-main-inselect:stack-of-open-elements>stack of open elements</a>.</p> 573393fb6ee3Sopenharmony_ci 573493fb6ee3Sopenharmony_ci 573593fb6ee3Sopenharmony_ci <p><a href=#insert-an-html-element id=parsing-main-inselect:insert-an-html-element>Insert an HTML element</a> for the token.</p> 573693fb6ee3Sopenharmony_ci 573793fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "optgroup"<dd> 573893fb6ee3Sopenharmony_ci 573993fb6ee3Sopenharmony_ci 574093fb6ee3Sopenharmony_ci <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 574193fb6ee3Sopenharmony_ci <a href=#stack-of-open-elements id=parsing-main-inselect:stack-of-open-elements-2>stack of open elements</a>.</p> 574293fb6ee3Sopenharmony_ci 574393fb6ee3Sopenharmony_ci 574493fb6ee3Sopenharmony_ci 574593fb6ee3Sopenharmony_ci <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 574693fb6ee3Sopenharmony_ci <a href=#stack-of-open-elements id=parsing-main-inselect:stack-of-open-elements-3>stack of open elements</a>.</p> 574793fb6ee3Sopenharmony_ci 574893fb6ee3Sopenharmony_ci 574993fb6ee3Sopenharmony_ci <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> 575093fb6ee3Sopenharmony_ci 575193fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is "optgroup"<dd> 575293fb6ee3Sopenharmony_ci 575393fb6ee3Sopenharmony_ci 575493fb6ee3Sopenharmony_ci <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 575593fb6ee3Sopenharmony_ci 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> 575693fb6ee3Sopenharmony_ci 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 575793fb6ee3Sopenharmony_ci elements</a>.</p> 575893fb6ee3Sopenharmony_ci 575993fb6ee3Sopenharmony_ci 576093fb6ee3Sopenharmony_ci <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 576193fb6ee3Sopenharmony_ci 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 576293fb6ee3Sopenharmony_ci the token.</p> 576393fb6ee3Sopenharmony_ci 576493fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is "option"<dd> 576593fb6ee3Sopenharmony_ci 576693fb6ee3Sopenharmony_ci <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 576793fb6ee3Sopenharmony_ci 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 576893fb6ee3Sopenharmony_ci the token.</p> 576993fb6ee3Sopenharmony_ci 577093fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is "select"<dd> 577193fb6ee3Sopenharmony_ci 577293fb6ee3Sopenharmony_ci <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 577393fb6ee3Sopenharmony_ci error</a>; ignore the token. (<a href=#fragment-case id=parsing-main-inselect:fragment-case>fragment case</a>)</p> 577493fb6ee3Sopenharmony_ci 577593fb6ee3Sopenharmony_ci <p>Otherwise:</p> 577693fb6ee3Sopenharmony_ci 577793fb6ee3Sopenharmony_ci <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 577893fb6ee3Sopenharmony_ci has been popped from the stack.</p> 577993fb6ee3Sopenharmony_ci 578093fb6ee3Sopenharmony_ci <p><a href=#reset-the-insertion-mode-appropriately id=parsing-main-inselect:reset-the-insertion-mode-appropriately>Reset the insertion mode appropriately</a>.</p> 578193fb6ee3Sopenharmony_ci 578293fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "select"<dd> 578393fb6ee3Sopenharmony_ci 578493fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-inselect:parse-error-6>Parse error</a>.</p> 578593fb6ee3Sopenharmony_ci 578693fb6ee3Sopenharmony_ci 578793fb6ee3Sopenharmony_ci <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. 578893fb6ee3Sopenharmony_ci (<a href=#fragment-case id=parsing-main-inselect:fragment-case-2>fragment case</a>)</p> 578993fb6ee3Sopenharmony_ci 579093fb6ee3Sopenharmony_ci <p>Otherwise:</p> 579193fb6ee3Sopenharmony_ci 579293fb6ee3Sopenharmony_ci <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 579393fb6ee3Sopenharmony_ci has been popped from the stack.</p> 579493fb6ee3Sopenharmony_ci 579593fb6ee3Sopenharmony_ci <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> 579693fb6ee3Sopenharmony_ci 579793fb6ee3Sopenharmony_ci 579893fb6ee3Sopenharmony_ci <p class=note>It just gets treated like an end tag.</p> 579993fb6ee3Sopenharmony_ci 580093fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is one of: "input", "keygen", "textarea"<dd> 580193fb6ee3Sopenharmony_ci 580293fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-inselect:parse-error-7>Parse error</a>.</p> 580393fb6ee3Sopenharmony_ci 580493fb6ee3Sopenharmony_ci 580593fb6ee3Sopenharmony_ci <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. 580693fb6ee3Sopenharmony_ci (<a href=#fragment-case id=parsing-main-inselect:fragment-case-3>fragment case</a>)</p> 580793fb6ee3Sopenharmony_ci 580893fb6ee3Sopenharmony_ci <p>Otherwise:</p> 580993fb6ee3Sopenharmony_ci 581093fb6ee3Sopenharmony_ci <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 581193fb6ee3Sopenharmony_ci has been popped from the stack.</p> 581293fb6ee3Sopenharmony_ci 581393fb6ee3Sopenharmony_ci <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> 581493fb6ee3Sopenharmony_ci 581593fb6ee3Sopenharmony_ci 581693fb6ee3Sopenharmony_ci <p>Reprocess the token.</p> 581793fb6ee3Sopenharmony_ci 581893fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is one of: "script", "template"<dt>An end tag whose tag name is "template"<dd> 581993fb6ee3Sopenharmony_ci 582093fb6ee3Sopenharmony_ci <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> 582193fb6ee3Sopenharmony_ci 582293fb6ee3Sopenharmony_ci <dt>An end-of-file token<dd> 582393fb6ee3Sopenharmony_ci 582493fb6ee3Sopenharmony_ci <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> 582593fb6ee3Sopenharmony_ci 582693fb6ee3Sopenharmony_ci <dt>Anything else<dd> 582793fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-inselect:parse-error-8>Parse error</a>. Ignore the token.</p> 582893fb6ee3Sopenharmony_ci </dl> 582993fb6ee3Sopenharmony_ci 583093fb6ee3Sopenharmony_ci 583193fb6ee3Sopenharmony_ci <h6 id=parsing-main-inselectintable>12.2.5.4.17 The "<dfn>in select in table</dfn>" insertion mode</h6> 583293fb6ee3Sopenharmony_ci 583393fb6ee3Sopenharmony_ci <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 583493fb6ee3Sopenharmony_ci token as follows:</p> 583593fb6ee3Sopenharmony_ci 583693fb6ee3Sopenharmony_ci <dl class=switch><dt>A start tag whose tag name is one of: "caption", "table", "tbody", "tfoot", "thead", "tr", 583793fb6ee3Sopenharmony_ci "td", "th"<dd> 583893fb6ee3Sopenharmony_ci 583993fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-inselectintable:parse-error>Parse error</a>.</p> 584093fb6ee3Sopenharmony_ci 584193fb6ee3Sopenharmony_ci 584293fb6ee3Sopenharmony_ci <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 584393fb6ee3Sopenharmony_ci has been popped from the stack.</p> 584493fb6ee3Sopenharmony_ci 584593fb6ee3Sopenharmony_ci <p><a href=#reset-the-insertion-mode-appropriately id=parsing-main-inselectintable:reset-the-insertion-mode-appropriately>Reset the insertion mode appropriately</a>.</p> 584693fb6ee3Sopenharmony_ci 584793fb6ee3Sopenharmony_ci 584893fb6ee3Sopenharmony_ci <p>Reprocess the token.</p> 584993fb6ee3Sopenharmony_ci 585093fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is one of: "caption", "table", "tbody", "tfoot", "thead", "tr", 585193fb6ee3Sopenharmony_ci "td", "th"<dd> 585293fb6ee3Sopenharmony_ci 585393fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-inselectintable:parse-error-2>Parse error</a>.</p> 585493fb6ee3Sopenharmony_ci 585593fb6ee3Sopenharmony_ci <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 585693fb6ee3Sopenharmony_ci element</a> with the same tag name as that of the token, then ignore the token.</p> 585793fb6ee3Sopenharmony_ci 585893fb6ee3Sopenharmony_ci <p>Otherwise:</p> 585993fb6ee3Sopenharmony_ci 586093fb6ee3Sopenharmony_ci 586193fb6ee3Sopenharmony_ci <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 586293fb6ee3Sopenharmony_ci has been popped from the stack.</p> 586393fb6ee3Sopenharmony_ci 586493fb6ee3Sopenharmony_ci <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> 586593fb6ee3Sopenharmony_ci 586693fb6ee3Sopenharmony_ci 586793fb6ee3Sopenharmony_ci <p>Reprocess the token.</p> 586893fb6ee3Sopenharmony_ci 586993fb6ee3Sopenharmony_ci <dt>Anything else<dd> 587093fb6ee3Sopenharmony_ci 587193fb6ee3Sopenharmony_ci <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> 587293fb6ee3Sopenharmony_ci 587393fb6ee3Sopenharmony_ci </dl> 587493fb6ee3Sopenharmony_ci 587593fb6ee3Sopenharmony_ci 587693fb6ee3Sopenharmony_ci 587793fb6ee3Sopenharmony_ci <h6 id=parsing-main-intemplate>12.2.5.4.18 The "<dfn>in template</dfn>" insertion mode</h6> 587893fb6ee3Sopenharmony_ci 587993fb6ee3Sopenharmony_ci <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 588093fb6ee3Sopenharmony_ci 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> 588193fb6ee3Sopenharmony_ci 588293fb6ee3Sopenharmony_ci <dl class=switch><dt>A character token<dt>A comment token<dt>A DOCTYPE token<dd> 588393fb6ee3Sopenharmony_ci 588493fb6ee3Sopenharmony_ci <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> 588593fb6ee3Sopenharmony_ci 588693fb6ee3Sopenharmony_ci <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> 588793fb6ee3Sopenharmony_ci 588893fb6ee3Sopenharmony_ci <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> 588993fb6ee3Sopenharmony_ci 589093fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is one of: "caption", "colgroup", "tbody", "tfoot", "thead"<dd> 589193fb6ee3Sopenharmony_ci 589293fb6ee3Sopenharmony_ci <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 589393fb6ee3Sopenharmony_ci insertion modes</a>.</p> 589493fb6ee3Sopenharmony_ci 589593fb6ee3Sopenharmony_ci <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 589693fb6ee3Sopenharmony_ci 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 589793fb6ee3Sopenharmony_ci mode</a>.</p> 589893fb6ee3Sopenharmony_ci 589993fb6ee3Sopenharmony_ci <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 590093fb6ee3Sopenharmony_ci table</a>", and reprocess the token.</p> 590193fb6ee3Sopenharmony_ci 590293fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "col"<dd> 590393fb6ee3Sopenharmony_ci 590493fb6ee3Sopenharmony_ci <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 590593fb6ee3Sopenharmony_ci insertion modes</a>.</p> 590693fb6ee3Sopenharmony_ci 590793fb6ee3Sopenharmony_ci <p>Push "<a href=#parsing-main-incolgroup id=parsing-main-intemplate:parsing-main-incolgroup>in column group</a>" onto the 590893fb6ee3Sopenharmony_ci <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 590993fb6ee3Sopenharmony_ci insertion mode</a>.</p> 591093fb6ee3Sopenharmony_ci 591193fb6ee3Sopenharmony_ci <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 591293fb6ee3Sopenharmony_ci column group</a>", and reprocess the token.</p> 591393fb6ee3Sopenharmony_ci 591493fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "tr"<dd> 591593fb6ee3Sopenharmony_ci 591693fb6ee3Sopenharmony_ci <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 591793fb6ee3Sopenharmony_ci insertion modes</a>.</p> 591893fb6ee3Sopenharmony_ci 591993fb6ee3Sopenharmony_ci <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 592093fb6ee3Sopenharmony_ci 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 592193fb6ee3Sopenharmony_ci mode</a>.</p> 592293fb6ee3Sopenharmony_ci 592393fb6ee3Sopenharmony_ci <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 592493fb6ee3Sopenharmony_ci table body</a>", and reprocess the token.</p> 592593fb6ee3Sopenharmony_ci 592693fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is one of: "td", "th"<dd> 592793fb6ee3Sopenharmony_ci 592893fb6ee3Sopenharmony_ci <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 592993fb6ee3Sopenharmony_ci insertion modes</a>.</p> 593093fb6ee3Sopenharmony_ci 593193fb6ee3Sopenharmony_ci <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 593293fb6ee3Sopenharmony_ci 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> 593393fb6ee3Sopenharmony_ci 593493fb6ee3Sopenharmony_ci <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 593593fb6ee3Sopenharmony_ci row</a>", and reprocess the token.</p> 593693fb6ee3Sopenharmony_ci 593793fb6ee3Sopenharmony_ci <dt>Any other start tag<dd> 593893fb6ee3Sopenharmony_ci 593993fb6ee3Sopenharmony_ci <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 594093fb6ee3Sopenharmony_ci insertion modes</a>.</p> 594193fb6ee3Sopenharmony_ci 594293fb6ee3Sopenharmony_ci <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 594393fb6ee3Sopenharmony_ci 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> 594493fb6ee3Sopenharmony_ci 594593fb6ee3Sopenharmony_ci <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 594693fb6ee3Sopenharmony_ci body</a>", and reprocess the token.</p> 594793fb6ee3Sopenharmony_ci 594893fb6ee3Sopenharmony_ci <dt>Any other end tag<dd> 594993fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-intemplate:parse-error>Parse error</a>. Ignore the token.</p> 595093fb6ee3Sopenharmony_ci <dt>An end-of-file token<dd> 595193fb6ee3Sopenharmony_ci 595293fb6ee3Sopenharmony_ci <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 595393fb6ee3Sopenharmony_ci <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> 595493fb6ee3Sopenharmony_ci 595593fb6ee3Sopenharmony_ci <p>Otherwise, this is a <a href=#parse-error id=parsing-main-intemplate:parse-error-2>parse error</a>.</p> 595693fb6ee3Sopenharmony_ci 595793fb6ee3Sopenharmony_ci 595893fb6ee3Sopenharmony_ci <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> 595993fb6ee3Sopenharmony_ci element has been popped from the stack.</p> 596093fb6ee3Sopenharmony_ci 596193fb6ee3Sopenharmony_ci <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> 596293fb6ee3Sopenharmony_ci 596393fb6ee3Sopenharmony_ci <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 596493fb6ee3Sopenharmony_ci insertion modes</a>.</p> 596593fb6ee3Sopenharmony_ci 596693fb6ee3Sopenharmony_ci <p><a href=#reset-the-insertion-mode-appropriately id=parsing-main-intemplate:reset-the-insertion-mode-appropriately>Reset the insertion mode appropriately</a>.</p> 596793fb6ee3Sopenharmony_ci 596893fb6ee3Sopenharmony_ci 596993fb6ee3Sopenharmony_ci <p>Reprocess the token.</p> 597093fb6ee3Sopenharmony_ci 597193fb6ee3Sopenharmony_ci </dl> 597293fb6ee3Sopenharmony_ci 597393fb6ee3Sopenharmony_ci 597493fb6ee3Sopenharmony_ci <h6 id=parsing-main-afterbody>12.2.5.4.19 The "<dfn>after body</dfn>" insertion mode</h6> 597593fb6ee3Sopenharmony_ci 597693fb6ee3Sopenharmony_ci <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> 597793fb6ee3Sopenharmony_ci 597893fb6ee3Sopenharmony_ci <dl class=switch><dt>A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C 597993fb6ee3Sopenharmony_ci FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dd> 598093fb6ee3Sopenharmony_ci 598193fb6ee3Sopenharmony_ci <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> 598293fb6ee3Sopenharmony_ci 598393fb6ee3Sopenharmony_ci <dt>A comment token<dd> 598493fb6ee3Sopenharmony_ci 598593fb6ee3Sopenharmony_ci <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 598693fb6ee3Sopenharmony_ci open elements</a> (the <code id=parsing-main-afterbody:the-html-element><a href=semantics.html#the-html-element>html</a></code> element).</p> 598793fb6ee3Sopenharmony_ci 598893fb6ee3Sopenharmony_ci <dt>A DOCTYPE token<dd> 598993fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-afterbody:parse-error>Parse error</a>. Ignore the token.</p> 599093fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "html"<dd> 599193fb6ee3Sopenharmony_ci 599293fb6ee3Sopenharmony_ci <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> 599393fb6ee3Sopenharmony_ci 599493fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is "html"<dd> 599593fb6ee3Sopenharmony_ci 599693fb6ee3Sopenharmony_ci <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 599793fb6ee3Sopenharmony_ci 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 599893fb6ee3Sopenharmony_ci case</a>)</p> 599993fb6ee3Sopenharmony_ci 600093fb6ee3Sopenharmony_ci <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> 600193fb6ee3Sopenharmony_ci 600293fb6ee3Sopenharmony_ci <dt>An end-of-file token<dd> 600393fb6ee3Sopenharmony_ci <p><a href=#stop-parsing id=parsing-main-afterbody:stop-parsing>Stop parsing</a>.</p> 600493fb6ee3Sopenharmony_ci <dt>Anything else<dd> 600593fb6ee3Sopenharmony_ci 600693fb6ee3Sopenharmony_ci <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> 600793fb6ee3Sopenharmony_ci 600893fb6ee3Sopenharmony_ci </dl> 600993fb6ee3Sopenharmony_ci 601093fb6ee3Sopenharmony_ci 601193fb6ee3Sopenharmony_ci <h6 id=parsing-main-inframeset>12.2.5.4.20 The "<dfn>in frameset</dfn>" insertion mode</h6> 601293fb6ee3Sopenharmony_ci 601393fb6ee3Sopenharmony_ci <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 601493fb6ee3Sopenharmony_ci 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> 601593fb6ee3Sopenharmony_ci 601693fb6ee3Sopenharmony_ci <dl class=switch><dt>A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C 601793fb6ee3Sopenharmony_ci FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dd> 601893fb6ee3Sopenharmony_ci <p><a href=#insert-a-character id=parsing-main-inframeset:insert-a-character>Insert the character</a>.</p> 601993fb6ee3Sopenharmony_ci <dt>A comment token<dd> 602093fb6ee3Sopenharmony_ci <p><a href=#insert-a-comment id=parsing-main-inframeset:insert-a-comment>Insert a comment</a>.</p> 602193fb6ee3Sopenharmony_ci <dt>A DOCTYPE token<dd> 602293fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-inframeset:parse-error>Parse error</a>. Ignore the token.</p> 602393fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "html"<dd> 602493fb6ee3Sopenharmony_ci 602593fb6ee3Sopenharmony_ci <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> 602693fb6ee3Sopenharmony_ci 602793fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "frameset"<dd> 602893fb6ee3Sopenharmony_ci <p><a href=#insert-an-html-element id=parsing-main-inframeset:insert-an-html-element>Insert an HTML element</a> for the token.</p> 602993fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is "frameset"<dd> 603093fb6ee3Sopenharmony_ci 603193fb6ee3Sopenharmony_ci <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 603293fb6ee3Sopenharmony_ci <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> 603393fb6ee3Sopenharmony_ci 603493fb6ee3Sopenharmony_ci <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 603593fb6ee3Sopenharmony_ci elements</a>.</p> 603693fb6ee3Sopenharmony_ci 603793fb6ee3Sopenharmony_ci <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 603893fb6ee3Sopenharmony_ci 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 603993fb6ee3Sopenharmony_ci <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> 604093fb6ee3Sopenharmony_ci 604193fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "frame"<dd> 604293fb6ee3Sopenharmony_ci 604393fb6ee3Sopenharmony_ci <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 604493fb6ee3Sopenharmony_ci 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> 604593fb6ee3Sopenharmony_ci 604693fb6ee3Sopenharmony_ci <p><a href=#acknowledge-self-closing-flag id=parsing-main-inframeset:acknowledge-self-closing-flag>Acknowledge the token's <i>self-closing 604793fb6ee3Sopenharmony_ci flag</i></a>, if it is set.</p> 604893fb6ee3Sopenharmony_ci 604993fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "noframes"<dd> 605093fb6ee3Sopenharmony_ci 605193fb6ee3Sopenharmony_ci <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> 605293fb6ee3Sopenharmony_ci 605393fb6ee3Sopenharmony_ci <dt>An end-of-file token<dd> 605493fb6ee3Sopenharmony_ci 605593fb6ee3Sopenharmony_ci <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 605693fb6ee3Sopenharmony_ci <a href=#parse-error id=parsing-main-inframeset:parse-error-3>parse error</a>.</p> 605793fb6ee3Sopenharmony_ci 605893fb6ee3Sopenharmony_ci <p class=note>The <a href=#current-node id=parsing-main-inframeset:current-node-6>current node</a> can only be the root 605993fb6ee3Sopenharmony_ci <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> 606093fb6ee3Sopenharmony_ci 606193fb6ee3Sopenharmony_ci <p><a href=#stop-parsing id=parsing-main-inframeset:stop-parsing>Stop parsing</a>.</p> 606293fb6ee3Sopenharmony_ci 606393fb6ee3Sopenharmony_ci <dt>Anything else<dd> 606493fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-inframeset:parse-error-4>Parse error</a>. Ignore the token.</p> 606593fb6ee3Sopenharmony_ci </dl> 606693fb6ee3Sopenharmony_ci 606793fb6ee3Sopenharmony_ci 606893fb6ee3Sopenharmony_ci <h6 id=parsing-main-afterframeset>12.2.5.4.21 The "<dfn>after frameset</dfn>" insertion mode</h6> 606993fb6ee3Sopenharmony_ci 607093fb6ee3Sopenharmony_ci <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 607193fb6ee3Sopenharmony_ci as follows:</p> 607293fb6ee3Sopenharmony_ci 607393fb6ee3Sopenharmony_ci 607493fb6ee3Sopenharmony_ci <dl class=switch><dt>A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C 607593fb6ee3Sopenharmony_ci FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dd> 607693fb6ee3Sopenharmony_ci <p><a href=#insert-a-character id=parsing-main-afterframeset:insert-a-character>Insert the character</a>.</p> 607793fb6ee3Sopenharmony_ci <dt>A comment token<dd> 607893fb6ee3Sopenharmony_ci <p><a href=#insert-a-comment id=parsing-main-afterframeset:insert-a-comment>Insert a comment</a>.</p> 607993fb6ee3Sopenharmony_ci <dt>A DOCTYPE token<dd> 608093fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-afterframeset:parse-error>Parse error</a>. Ignore the token.</p> 608193fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "html"<dd> 608293fb6ee3Sopenharmony_ci 608393fb6ee3Sopenharmony_ci <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> 608493fb6ee3Sopenharmony_ci 608593fb6ee3Sopenharmony_ci <dt>An end tag whose tag name is "html"<dd> 608693fb6ee3Sopenharmony_ci 608793fb6ee3Sopenharmony_ci <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> 608893fb6ee3Sopenharmony_ci 608993fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "noframes"<dd> 609093fb6ee3Sopenharmony_ci 609193fb6ee3Sopenharmony_ci <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> 609293fb6ee3Sopenharmony_ci 609393fb6ee3Sopenharmony_ci <dt>An end-of-file token<dd> 609493fb6ee3Sopenharmony_ci <p><a href=#stop-parsing id=parsing-main-afterframeset:stop-parsing>Stop parsing</a>.</p> 609593fb6ee3Sopenharmony_ci <dt>Anything else<dd> 609693fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-afterframeset:parse-error-2>Parse error</a>. Ignore the token.</p> 609793fb6ee3Sopenharmony_ci </dl> 609893fb6ee3Sopenharmony_ci 609993fb6ee3Sopenharmony_ci 610093fb6ee3Sopenharmony_ci <h6 id=the-after-after-body-insertion-mode>12.2.5.4.22 The "<dfn>after after body</dfn>" insertion mode</h6> 610193fb6ee3Sopenharmony_ci 610293fb6ee3Sopenharmony_ci <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 610393fb6ee3Sopenharmony_ci as follows:</p> 610493fb6ee3Sopenharmony_ci 610593fb6ee3Sopenharmony_ci <dl class=switch><dt>A comment token<dd> 610693fb6ee3Sopenharmony_ci <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> 610793fb6ee3Sopenharmony_ci <dt>A DOCTYPE token<dt>A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C 610893fb6ee3Sopenharmony_ci FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dt>A start tag whose tag name is "html"<dd> 610993fb6ee3Sopenharmony_ci 611093fb6ee3Sopenharmony_ci <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> 611193fb6ee3Sopenharmony_ci 611293fb6ee3Sopenharmony_ci <dt>An end-of-file token<dd> 611393fb6ee3Sopenharmony_ci <p><a href=#stop-parsing id=the-after-after-body-insertion-mode:stop-parsing>Stop parsing</a>.</p> 611493fb6ee3Sopenharmony_ci <dt>Anything else<dd> 611593fb6ee3Sopenharmony_ci 611693fb6ee3Sopenharmony_ci <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> 611793fb6ee3Sopenharmony_ci 611893fb6ee3Sopenharmony_ci </dl> 611993fb6ee3Sopenharmony_ci 612093fb6ee3Sopenharmony_ci 612193fb6ee3Sopenharmony_ci <h6 id=the-after-after-frameset-insertion-mode>12.2.5.4.23 The "<dfn>after after frameset</dfn>" insertion mode</h6> 612293fb6ee3Sopenharmony_ci 612393fb6ee3Sopenharmony_ci <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 612493fb6ee3Sopenharmony_ci token as follows:</p> 612593fb6ee3Sopenharmony_ci 612693fb6ee3Sopenharmony_ci <dl class=switch><dt>A comment token<dd> 612793fb6ee3Sopenharmony_ci <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> 612893fb6ee3Sopenharmony_ci <dt>A DOCTYPE token<dt>A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C 612993fb6ee3Sopenharmony_ci FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dt>A start tag whose tag name is "html"<dd> 613093fb6ee3Sopenharmony_ci 613193fb6ee3Sopenharmony_ci <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> 613293fb6ee3Sopenharmony_ci 613393fb6ee3Sopenharmony_ci <dt>An end-of-file token<dd> 613493fb6ee3Sopenharmony_ci <p><a href=#stop-parsing id=the-after-after-frameset-insertion-mode:stop-parsing>Stop parsing</a>.</p> 613593fb6ee3Sopenharmony_ci <dt>A start tag whose tag name is "noframes"<dd> 613693fb6ee3Sopenharmony_ci 613793fb6ee3Sopenharmony_ci <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> 613893fb6ee3Sopenharmony_ci 613993fb6ee3Sopenharmony_ci <dt>Anything else<dd> 614093fb6ee3Sopenharmony_ci <p><a href=#parse-error id=the-after-after-frameset-insertion-mode:parse-error>Parse error</a>. Ignore the token.</p> 614193fb6ee3Sopenharmony_ci </dl> 614293fb6ee3Sopenharmony_ci 614393fb6ee3Sopenharmony_ci 614493fb6ee3Sopenharmony_ci 614593fb6ee3Sopenharmony_ci <h5 id=parsing-main-inforeign>12.2.5.5 The rules for parsing tokens <dfn>in foreign content</dfn></h5> 614693fb6ee3Sopenharmony_ci 614793fb6ee3Sopenharmony_ci <p>When the user agent is to apply the rules for parsing tokens in foreign content, the user agent 614893fb6ee3Sopenharmony_ci must handle the token as follows:</p> 614993fb6ee3Sopenharmony_ci 615093fb6ee3Sopenharmony_ci <dl class=switch><dt>A character token that is U+0000 NULL<dd> 615193fb6ee3Sopenharmony_ci 615293fb6ee3Sopenharmony_ci <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 615393fb6ee3Sopenharmony_ci CHARACTER character</a>.</p> 615493fb6ee3Sopenharmony_ci 615593fb6ee3Sopenharmony_ci <dt>A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C 615693fb6ee3Sopenharmony_ci FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE<dd> 615793fb6ee3Sopenharmony_ci 615893fb6ee3Sopenharmony_ci <p><a href=#insert-a-character id=parsing-main-inforeign:insert-a-character-2>Insert the token's character</a>.</p> 615993fb6ee3Sopenharmony_ci 616093fb6ee3Sopenharmony_ci <dt>Any other character token<dd> 616193fb6ee3Sopenharmony_ci 616293fb6ee3Sopenharmony_ci <p><a href=#insert-a-character id=parsing-main-inforeign:insert-a-character-3>Insert the token's character</a>.</p> 616393fb6ee3Sopenharmony_ci 616493fb6ee3Sopenharmony_ci <p>Set the <a href=#frameset-ok-flag id=parsing-main-inforeign:frameset-ok-flag>frameset-ok flag</a> to "not ok".</p> 616593fb6ee3Sopenharmony_ci 616693fb6ee3Sopenharmony_ci <dt>A comment token<dd> 616793fb6ee3Sopenharmony_ci 616893fb6ee3Sopenharmony_ci <p><a href=#insert-a-comment id=parsing-main-inforeign:insert-a-comment>Insert a comment</a>.</p> 616993fb6ee3Sopenharmony_ci 617093fb6ee3Sopenharmony_ci <dt>A DOCTYPE token<dd> 617193fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-inforeign:parse-error-2>Parse error</a>. Ignore the token.</p> 617293fb6ee3Sopenharmony_ci <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", 617393fb6ee3Sopenharmony_ci "li", "listing", 617493fb6ee3Sopenharmony_ci "menu", "meta", "nobr", "ol", "p", "pre", "ruby", "s", "small", "span", "strong", "strike", "sub", 617593fb6ee3Sopenharmony_ci "sup", "table", "tt", "u", "ul", "var"<dt>A start tag whose tag name is "font", if the token has any attributes named "color", "face", 617693fb6ee3Sopenharmony_ci or "size"<dd> 617793fb6ee3Sopenharmony_ci 617893fb6ee3Sopenharmony_ci <p><a href=#parse-error id=parsing-main-inforeign:parse-error-3>Parse error</a>.</p> 617993fb6ee3Sopenharmony_ci 618093fb6ee3Sopenharmony_ci 618193fb6ee3Sopenharmony_ci 618293fb6ee3Sopenharmony_ci <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>, 618393fb6ee3Sopenharmony_ci 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> 618493fb6ee3Sopenharmony_ci 618593fb6ee3Sopenharmony_ci <p>Otherwise:</p> 618693fb6ee3Sopenharmony_ci 618793fb6ee3Sopenharmony_ci <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 618893fb6ee3Sopenharmony_ci 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 618993fb6ee3Sopenharmony_ci <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 619093fb6ee3Sopenharmony_ci element in the <a id=parsing-main-inforeign:html-namespace-2 href=infrastructure.html#html-namespace-2>HTML namespace</a>.</p> 619193fb6ee3Sopenharmony_ci 619293fb6ee3Sopenharmony_ci <p>Then, reprocess the token.</p> 619393fb6ee3Sopenharmony_ci 619493fb6ee3Sopenharmony_ci <dt>Any other start tag<dd> 619593fb6ee3Sopenharmony_ci 619693fb6ee3Sopenharmony_ci <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>, 619793fb6ee3Sopenharmony_ci <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 619893fb6ee3Sopenharmony_ci that are not all lowercase.)</p> 619993fb6ee3Sopenharmony_ci 620093fb6ee3Sopenharmony_ci <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 620193fb6ee3Sopenharmony_ci token's tag name is one of the ones in the first column of the following table, change the tag 620293fb6ee3Sopenharmony_ci name to the name given in the corresponding cell in the second column. (This fixes the case of 620393fb6ee3Sopenharmony_ci SVG elements that are not all lowercase.)</p> 620493fb6ee3Sopenharmony_ci 620593fb6ee3Sopenharmony_ci <table><thead><tr><th> Tag name <th> Element name 620693fb6ee3Sopenharmony_ci <tbody><tr><td> <code>altglyph</code> <td> <code>altGlyph</code> 620793fb6ee3Sopenharmony_ci <tr><td> <code>altglyphdef</code> <td> <code>altGlyphDef</code> 620893fb6ee3Sopenharmony_ci <tr><td> <code>altglyphitem</code> <td> <code>altGlyphItem</code> 620993fb6ee3Sopenharmony_ci <tr><td> <code>animatecolor</code> <td> <code>animateColor</code> 621093fb6ee3Sopenharmony_ci <tr><td> <code>animatemotion</code> <td> <code>animateMotion</code> 621193fb6ee3Sopenharmony_ci <tr><td> <code>animatetransform</code> <td> <code>animateTransform</code> 621293fb6ee3Sopenharmony_ci <tr><td> <code>clippath</code> <td> <code>clipPath</code> 621393fb6ee3Sopenharmony_ci <tr><td> <code>feblend</code> <td> <code>feBlend</code> 621493fb6ee3Sopenharmony_ci <tr><td> <code>fecolormatrix</code> <td> <code>feColorMatrix</code> 621593fb6ee3Sopenharmony_ci <tr><td> <code>fecomponenttransfer</code> <td> <code>feComponentTransfer</code> 621693fb6ee3Sopenharmony_ci <tr><td> <code>fecomposite</code> <td> <code>feComposite</code> 621793fb6ee3Sopenharmony_ci <tr><td> <code>feconvolvematrix</code> <td> <code>feConvolveMatrix</code> 621893fb6ee3Sopenharmony_ci <tr><td> <code>fediffuselighting</code> <td> <code>feDiffuseLighting</code> 621993fb6ee3Sopenharmony_ci <tr><td> <code>fedisplacementmap</code> <td> <code>feDisplacementMap</code> 622093fb6ee3Sopenharmony_ci <tr><td> <code>fedistantlight</code> <td> <code>feDistantLight</code> 622193fb6ee3Sopenharmony_ci <tr><td> <code>fedropshadow</code> <td> <code>feDropShadow</code> 622293fb6ee3Sopenharmony_ci <tr><td> <code>feflood</code> <td> <code>feFlood</code> 622393fb6ee3Sopenharmony_ci <tr><td> <code>fefunca</code> <td> <code>feFuncA</code> 622493fb6ee3Sopenharmony_ci <tr><td> <code>fefuncb</code> <td> <code>feFuncB</code> 622593fb6ee3Sopenharmony_ci <tr><td> <code>fefuncg</code> <td> <code>feFuncG</code> 622693fb6ee3Sopenharmony_ci <tr><td> <code>fefuncr</code> <td> <code>feFuncR</code> 622793fb6ee3Sopenharmony_ci <tr><td> <code>fegaussianblur</code> <td> <code>feGaussianBlur</code> 622893fb6ee3Sopenharmony_ci <tr><td> <code>feimage</code> <td> <code>feImage</code> 622993fb6ee3Sopenharmony_ci <tr><td> <code>femerge</code> <td> <code>feMerge</code> 623093fb6ee3Sopenharmony_ci <tr><td> <code>femergenode</code> <td> <code>feMergeNode</code> 623193fb6ee3Sopenharmony_ci <tr><td> <code>femorphology</code> <td> <code>feMorphology</code> 623293fb6ee3Sopenharmony_ci <tr><td> <code>feoffset</code> <td> <code>feOffset</code> 623393fb6ee3Sopenharmony_ci <tr><td> <code>fepointlight</code> <td> <code>fePointLight</code> 623493fb6ee3Sopenharmony_ci <tr><td> <code>fespecularlighting</code> <td> <code>feSpecularLighting</code> 623593fb6ee3Sopenharmony_ci <tr><td> <code>fespotlight</code> <td> <code>feSpotLight</code> 623693fb6ee3Sopenharmony_ci <tr><td> <code>fetile</code> <td> <code>feTile</code> 623793fb6ee3Sopenharmony_ci <tr><td> <code>feturbulence</code> <td> <code>feTurbulence</code> 623893fb6ee3Sopenharmony_ci <tr><td> <code>foreignobject</code> <td> <code>foreignObject</code> 623993fb6ee3Sopenharmony_ci <tr><td> <code>glyphref</code> <td> <code>glyphRef</code> 624093fb6ee3Sopenharmony_ci <tr><td> <code>lineargradient</code> <td> <code>linearGradient</code> 624193fb6ee3Sopenharmony_ci <tr><td> <code>radialgradient</code> <td> <code>radialGradient</code> 624293fb6ee3Sopenharmony_ci 624393fb6ee3Sopenharmony_ci <tr><td> <code>textpath</code> <td> <code>textPath</code> 624493fb6ee3Sopenharmony_ci </table> 624593fb6ee3Sopenharmony_ci 624693fb6ee3Sopenharmony_ci <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>, 624793fb6ee3Sopenharmony_ci <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 624893fb6ee3Sopenharmony_ci are not all lowercase.)</p> 624993fb6ee3Sopenharmony_ci 625093fb6ee3Sopenharmony_ci <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 625193fb6ee3Sopenharmony_ci attributes, in particular XLink in SVG.)</p> 625293fb6ee3Sopenharmony_ci 625393fb6ee3Sopenharmony_ci <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 625493fb6ee3Sopenharmony_ci <a href=#adjusted-current-node id=parsing-main-inforeign:adjusted-current-node-4>adjusted current node</a>.</p> 625593fb6ee3Sopenharmony_ci 625693fb6ee3Sopenharmony_ci <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 625793fb6ee3Sopenharmony_ci following list:</p> 625893fb6ee3Sopenharmony_ci 625993fb6ee3Sopenharmony_ci <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> 626093fb6ee3Sopenharmony_ci 626193fb6ee3Sopenharmony_ci <p><a href=#acknowledge-self-closing-flag id=parsing-main-inforeign:acknowledge-self-closing-flag>Acknowledge the token's <i>self-closing 626293fb6ee3Sopenharmony_ci flag</i></a>, and then act as described in the steps for a "script" end tag below.</p> 626393fb6ee3Sopenharmony_ci 626493fb6ee3Sopenharmony_ci <dt>Otherwise<dd> 626593fb6ee3Sopenharmony_ci 626693fb6ee3Sopenharmony_ci <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 626793fb6ee3Sopenharmony_ci flag</i></a>.</p> 626893fb6ee3Sopenharmony_ci 626993fb6ee3Sopenharmony_ci </dl> 627093fb6ee3Sopenharmony_ci 627193fb6ee3Sopenharmony_ci <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> 627293fb6ee3Sopenharmony_ci 627393fb6ee3Sopenharmony_ci <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> 627493fb6ee3Sopenharmony_ci 627593fb6ee3Sopenharmony_ci <p>Let the <var>old insertion point</var> have the same value as the current 627693fb6ee3Sopenharmony_ci <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 627793fb6ee3Sopenharmony_ci input character</a>.</p> 627893fb6ee3Sopenharmony_ci 627993fb6ee3Sopenharmony_ci <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 628093fb6ee3Sopenharmony_ci flag</a> to true.</p> 628193fb6ee3Sopenharmony_ci 628293fb6ee3Sopenharmony_ci <p><a href=http://www.w3.org/TR/SVGMobile12/script.html#ScriptContentProcessing>Process the 628393fb6ee3Sopenharmony_ci <code>script</code> element</a> according to the SVG rules, if the user agent supports 628493fb6ee3Sopenharmony_ci SVG. <a href=references.html#refsSVG>[SVG]</a></p> 628593fb6ee3Sopenharmony_ci 628693fb6ee3Sopenharmony_ci <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 628793fb6ee3Sopenharmony_ci inserted into the tokenizer</a>, the parser will not be executed reentrantly, since the 628893fb6ee3Sopenharmony_ci <a href=#parser-pause-flag id=parsing-main-inforeign:parser-pause-flag-2>parser pause flag</a> is true.</p> 628993fb6ee3Sopenharmony_ci 629093fb6ee3Sopenharmony_ci <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 629193fb6ee3Sopenharmony_ci 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> 629293fb6ee3Sopenharmony_ci 629393fb6ee3Sopenharmony_ci <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 629493fb6ee3Sopenharmony_ci 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. 629593fb6ee3Sopenharmony_ci This value might be the "undefined" value.)</p> 629693fb6ee3Sopenharmony_ci 629793fb6ee3Sopenharmony_ci <dt>Any other end tag<dd> 629893fb6ee3Sopenharmony_ci 629993fb6ee3Sopenharmony_ci <p>Run these steps:</p> 630093fb6ee3Sopenharmony_ci 630193fb6ee3Sopenharmony_ci <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 630293fb6ee3Sopenharmony_ci 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 630393fb6ee3Sopenharmony_ci 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 630493fb6ee3Sopenharmony_ci 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 630593fb6ee3Sopenharmony_ci 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 630693fb6ee3Sopenharmony_ci elements</a> until <var>node</var> has been popped from the stack, and then abort 630793fb6ee3Sopenharmony_ci 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 630893fb6ee3Sopenharmony_ci 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 630993fb6ee3Sopenharmony_ci to the step labeled <i>loop</i>.<li><p>Otherwise, process the token according to the rules given in the section corresponding 631093fb6ee3Sopenharmony_ci to the current <a href=#insertion-mode id=parsing-main-inforeign:insertion-mode>insertion mode</a> in HTML content.</ol> 631193fb6ee3Sopenharmony_ci 631293fb6ee3Sopenharmony_ci </dl> 631393fb6ee3Sopenharmony_ci 631493fb6ee3Sopenharmony_ci 631593fb6ee3Sopenharmony_ci 631693fb6ee3Sopenharmony_ci 631793fb6ee3Sopenharmony_ci 631893fb6ee3Sopenharmony_ci 631993fb6ee3Sopenharmony_ci <h4 id=the-end>12.2.6 The end</h4> 632093fb6ee3Sopenharmony_ci 632193fb6ee3Sopenharmony_ci <p>Once the user agent <dfn id=stop-parsing>stops parsing</dfn> the document, the user agent 632293fb6ee3Sopenharmony_ci 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> 632393fb6ee3Sopenharmony_ci 632493fb6ee3Sopenharmony_ci <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>" 632593fb6ee3Sopenharmony_ci and the <a href=#insertion-point id=the-end:insertion-point>insertion point</a> to 632693fb6ee3Sopenharmony_ci 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 632793fb6ee3Sopenharmony_ci parsing</a> is not empty, run these substeps:</p> 632893fb6ee3Sopenharmony_ci 632993fb6ee3Sopenharmony_ci <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 633093fb6ee3Sopenharmony_ci 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 633193fb6ee3Sopenharmony_ci 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> 633293fb6ee3Sopenharmony_ci <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 633393fb6ee3Sopenharmony_ci 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 633493fb6ee3Sopenharmony_ci 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 633593fb6ee3Sopenharmony_ci execute when the document has finished parsing</a> (i.e. shift out the first entry in the 633693fb6ee3Sopenharmony_ci 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 633793fb6ee3Sopenharmony_ci parsing</a> is still not empty, repeat these substeps again from substep 1.</p> 633893fb6ee3Sopenharmony_ci 633993fb6ee3Sopenharmony_ci </ol> 634093fb6ee3Sopenharmony_ci 634193fb6ee3Sopenharmony_ci <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 634293fb6ee3Sopenharmony_ci 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 634393fb6ee3Sopenharmony_ci 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> 634493fb6ee3Sopenharmony_ci 634593fb6ee3Sopenharmony_ci <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> 634693fb6ee3Sopenharmony_ci 634793fb6ee3Sopenharmony_ci <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>, 634893fb6ee3Sopenharmony_ci <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 634993fb6ee3Sopenharmony_ci <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> 635093fb6ee3Sopenharmony_ci object.</ol> 635193fb6ee3Sopenharmony_ci 635293fb6ee3Sopenharmony_ci <li> 635393fb6ee3Sopenharmony_ci 635493fb6ee3Sopenharmony_ci <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 635593fb6ee3Sopenharmony_ci task</a> to run the following substeps:</p> 635693fb6ee3Sopenharmony_ci 635793fb6ee3Sopenharmony_ci <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 635893fb6ee3Sopenharmony_ci 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 635993fb6ee3Sopenharmony_ci <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> 636093fb6ee3Sopenharmony_ci object, 636193fb6ee3Sopenharmony_ci 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 636293fb6ee3Sopenharmony_ci event must not bubble, must not be cancelable, and has no default action.</ol> 636393fb6ee3Sopenharmony_ci 636493fb6ee3Sopenharmony_ci <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 636593fb6ee3Sopenharmony_ci 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 636693fb6ee3Sopenharmony_ci 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 636793fb6ee3Sopenharmony_ci 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 636893fb6ee3Sopenharmony_ci <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 636993fb6ee3Sopenharmony_ci loaded</dfn>.</ol> 637093fb6ee3Sopenharmony_ci 637193fb6ee3Sopenharmony_ci <p>When the user agent is to <dfn id=abort-a-parser>abort a parser</dfn>, it must run the following steps:</p> 637293fb6ee3Sopenharmony_ci 637393fb6ee3Sopenharmony_ci <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 637493fb6ee3Sopenharmony_ci 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> 637593fb6ee3Sopenharmony_ci 637693fb6ee3Sopenharmony_ci <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 637793fb6ee3Sopenharmony_ci source</a>.</p> 637893fb6ee3Sopenharmony_ci 637993fb6ee3Sopenharmony_ci 638093fb6ee3Sopenharmony_ci 638193fb6ee3Sopenharmony_ci 638293fb6ee3Sopenharmony_ci 638393fb6ee3Sopenharmony_ci 638493fb6ee3Sopenharmony_ci <h4 id=coercing-an-html-dom-into-an-infoset>12.2.7 Coercing an HTML DOM into an infoset</h4> 638593fb6ee3Sopenharmony_ci 638693fb6ee3Sopenharmony_ci <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 638793fb6ee3Sopenharmony_ci possible that the constructed DOM is not compatible with the XML tool chain in certain subtle 638893fb6ee3Sopenharmony_ci 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 638993fb6ee3Sopenharmony_ci 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 639093fb6ee3Sopenharmony_ci section specifies some rules for handling these issues.</p> 639193fb6ee3Sopenharmony_ci 639293fb6ee3Sopenharmony_ci <p>If the XML API being used doesn't support DOCTYPEs, the tool may drop DOCTYPEs altogether.</p> 639393fb6ee3Sopenharmony_ci 639493fb6ee3Sopenharmony_ci <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 639593fb6ee3Sopenharmony_ci 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> 639693fb6ee3Sopenharmony_ci 639793fb6ee3Sopenharmony_ci <p>The tool may annotate the output with any namespace declarations required for proper 639893fb6ee3Sopenharmony_ci operation.</p> 639993fb6ee3Sopenharmony_ci 640093fb6ee3Sopenharmony_ci <p>If the XML API being used restricts the allowable characters in the local names of elements and 640193fb6ee3Sopenharmony_ci attributes, then the tool may map all element and attribute local names that the API wouldn't 640293fb6ee3Sopenharmony_ci support to a set of names that <em>are</em> allowed, by replacing any character that isn't 640393fb6ee3Sopenharmony_ci supported with the uppercase letter U and the six digits of the character's Unicode code point 640493fb6ee3Sopenharmony_ci when expressed in hexadecimal, using digits 0-9 and capital letters A-F as the symbols, in 640593fb6ee3Sopenharmony_ci increasing numeric order.</p> 640693fb6ee3Sopenharmony_ci 640793fb6ee3Sopenharmony_ci <p class=example>For example, the element name <code>foo<bar</code>, which can be 640893fb6ee3Sopenharmony_ci 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 640993fb6ee3Sopenharmony_ci well-formed XML element name, would be converted into <code>fooU00003Cbar</code>, which 641093fb6ee3Sopenharmony_ci <em>is</em> a well-formed XML element name (though it's still not legal in HTML by any means).</p> 641193fb6ee3Sopenharmony_ci 641293fb6ee3Sopenharmony_ci <p class=example>As another example, consider the attribute <code>xlink:href</code>. 641393fb6ee3Sopenharmony_ci 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 641493fb6ee3Sopenharmony_ci name "<code>href</code>". However, used on an HTML element, it becomes an attribute with 641593fb6ee3Sopenharmony_ci no prefix and the local name "<code>xlink:href</code>", which is not a valid NCName, and 641693fb6ee3Sopenharmony_ci thus might not be accepted by an XML API. It could thus get converted, becoming "<code>xlinkU00003Ahref</code>".</p> 641793fb6ee3Sopenharmony_ci 641893fb6ee3Sopenharmony_ci <p class=note>The resulting names from this conversion conveniently can't clash with any 641993fb6ee3Sopenharmony_ci 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 642093fb6ee3Sopenharmony_ci 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> 642193fb6ee3Sopenharmony_ci 642293fb6ee3Sopenharmony_ci <p>If the XML API restricts comments from having two consecutive U+002D HYPHEN-MINUS characters 642393fb6ee3Sopenharmony_ci (--), the tool may insert a single U+0020 SPACE character between any such offending 642493fb6ee3Sopenharmony_ci characters.</p> 642593fb6ee3Sopenharmony_ci 642693fb6ee3Sopenharmony_ci <p>If the XML API restricts comments from ending in a U+002D HYPHEN-MINUS character (-), the tool 642793fb6ee3Sopenharmony_ci may insert a single U+0020 SPACE character at the end of such comments.</p> 642893fb6ee3Sopenharmony_ci 642993fb6ee3Sopenharmony_ci <p>If the XML API restricts allowed characters in character data, attribute values, or comments, 643093fb6ee3Sopenharmony_ci the tool may replace any U+000C FORM FEED (FF) character with a U+0020 SPACE character, and any 643193fb6ee3Sopenharmony_ci other literal non-XML character with a U+FFFD REPLACEMENT CHARACTER.</p> 643293fb6ee3Sopenharmony_ci 643393fb6ee3Sopenharmony_ci <p>If the tool has no way to convey out-of-band information, then the tool may drop the following 643493fb6ee3Sopenharmony_ci information:</p> 643593fb6ee3Sopenharmony_ci 643693fb6ee3Sopenharmony_ci <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 643793fb6ee3Sopenharmony_ci <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> 643893fb6ee3Sopenharmony_ci 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> 643993fb6ee3Sopenharmony_ci 644093fb6ee3Sopenharmony_ci <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 644193fb6ee3Sopenharmony_ci parser</a>'s rules have been applied. For example, a <code><a::></code> start tag 644293fb6ee3Sopenharmony_ci will be closed by a <code></a::></code> end tag, and never by a <code></aU00003AU00003A></code> end tag, even if the user agent is using the rules above to 644393fb6ee3Sopenharmony_ci then generate an actual element in the DOM with the name <code>aU00003AU00003A</code> for 644493fb6ee3Sopenharmony_ci that start tag.</p> 644593fb6ee3Sopenharmony_ci 644693fb6ee3Sopenharmony_ci 644793fb6ee3Sopenharmony_ci 644893fb6ee3Sopenharmony_ci 644993fb6ee3Sopenharmony_ci 645093fb6ee3Sopenharmony_ci 645193fb6ee3Sopenharmony_ci <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> 645293fb6ee3Sopenharmony_ci 645393fb6ee3Sopenharmony_ci <p><i>This section is non-normative.</i></p> 645493fb6ee3Sopenharmony_ci 645593fb6ee3Sopenharmony_ci <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> 645693fb6ee3Sopenharmony_ci handles these cases.</p> 645793fb6ee3Sopenharmony_ci 645893fb6ee3Sopenharmony_ci 645993fb6ee3Sopenharmony_ci <h5 id=misnested-tags:-b-i-/b-/i>12.2.8.1 Misnested tags: <b><i></b></i></h5> 646093fb6ee3Sopenharmony_ci 646193fb6ee3Sopenharmony_ci <p><i>This section is non-normative.</i></p> 646293fb6ee3Sopenharmony_ci 646393fb6ee3Sopenharmony_ci <p>The most-often discussed example of erroneous markup is as follows:</p> 646493fb6ee3Sopenharmony_ci 646593fb6ee3Sopenharmony_ci <pre><p>1<b>2<i>3</b>4</i>5</p></pre> 646693fb6ee3Sopenharmony_ci 646793fb6ee3Sopenharmony_ci <p>The parsing of this markup is straightforward up to the "3". At this point, the DOM looks like 646893fb6ee3Sopenharmony_ci this:</p> 646993fb6ee3Sopenharmony_ci 647093fb6ee3Sopenharmony_ci <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> 647193fb6ee3Sopenharmony_ci 647293fb6ee3Sopenharmony_ci <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>, 647393fb6ee3Sopenharmony_ci <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 647493fb6ee3Sopenharmony_ci 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 647593fb6ee3Sopenharmony_ci mode</a> is "<a href=#parsing-main-inbody id=misnested-tags:-b-i-/b-/i:parsing-main-inbody>in body</a>".</p> 647693fb6ee3Sopenharmony_ci 647793fb6ee3Sopenharmony_ci <p>Upon receiving the end tag token with the tag name "b", the "<a href=#adoptionAgency>adoption 647893fb6ee3Sopenharmony_ci agency algorithm</a>" is invoked. This is a simple case, in that the <var>formatting 647993fb6ee3Sopenharmony_ci 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>. 648093fb6ee3Sopenharmony_ci 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>, 648193fb6ee3Sopenharmony_ci <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> 648293fb6ee3Sopenharmony_ci 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> 648393fb6ee3Sopenharmony_ci 648493fb6ee3Sopenharmony_ci <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 648593fb6ee3Sopenharmony_ci 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" 648693fb6ee3Sopenharmony_ci <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" 648793fb6ee3Sopenharmony_ci <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> 648893fb6ee3Sopenharmony_ci 648993fb6ee3Sopenharmony_ci <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> 649093fb6ee3Sopenharmony_ci 649193fb6ee3Sopenharmony_ci 649293fb6ee3Sopenharmony_ci <h5 id=misnested-tags:-b-p-/b-/p>12.2.8.2 Misnested tags: <b><p></b></p></h5> 649393fb6ee3Sopenharmony_ci 649493fb6ee3Sopenharmony_ci <p><i>This section is non-normative.</i></p> 649593fb6ee3Sopenharmony_ci 649693fb6ee3Sopenharmony_ci <p>A case similar to the previous one is the following:</p> 649793fb6ee3Sopenharmony_ci 649893fb6ee3Sopenharmony_ci <pre><b>1<p>2</b>3</p></pre> 649993fb6ee3Sopenharmony_ci 650093fb6ee3Sopenharmony_ci <p>Up to the "2" the parsing here is straightforward:</p> 650193fb6ee3Sopenharmony_ci 650293fb6ee3Sopenharmony_ci <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> 650393fb6ee3Sopenharmony_ci 650493fb6ee3Sopenharmony_ci <p>The interesting part is when the end tag token with the tag name "b" is parsed.</p> 650593fb6ee3Sopenharmony_ci 650693fb6ee3Sopenharmony_ci <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: 650793fb6ee3Sopenharmony_ci <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 650893fb6ee3Sopenharmony_ci 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 650993fb6ee3Sopenharmony_ci "<a href=#parsing-main-inbody id=misnested-tags:-b-p-/b-/p:parsing-main-inbody>in body</a>".</p> 651093fb6ee3Sopenharmony_ci 651193fb6ee3Sopenharmony_ci <p>Upon receiving the end tag token with the tag name "b", the "<a href=#adoptionAgency>adoption 651293fb6ee3Sopenharmony_ci agency algorithm</a>" is invoked, as in the previous example. However, in this case, there 651393fb6ee3Sopenharmony_ci <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 651493fb6ee3Sopenharmony_ci time the adoption agency algorithm isn't skipped over.</p> 651593fb6ee3Sopenharmony_ci 651693fb6ee3Sopenharmony_ci <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 651793fb6ee3Sopenharmony_ci "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 651893fb6ee3Sopenharmony_ci elements</a>, but since that list has only one element in it, the bookmark won't have much 651993fb6ee3Sopenharmony_ci effect.</p> 652093fb6ee3Sopenharmony_ci 652193fb6ee3Sopenharmony_ci <p>As the algorithm progresses, <var>node</var> ends up set to the formatting element 652293fb6ee3Sopenharmony_ci (<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 652393fb6ee3Sopenharmony_ci 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> 652493fb6ee3Sopenharmony_ci 652593fb6ee3Sopenharmony_ci <p>The <var>last node</var> gets appended (moved) to the <var>common 652693fb6ee3Sopenharmony_ci ancestor</var>, so that the DOM looks like:</p> 652793fb6ee3Sopenharmony_ci 652893fb6ee3Sopenharmony_ci <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> 652993fb6ee3Sopenharmony_ci 653093fb6ee3Sopenharmony_ci <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 653193fb6ee3Sopenharmony_ci moved to it:</p> 653293fb6ee3Sopenharmony_ci 653393fb6ee3Sopenharmony_ci <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> 653493fb6ee3Sopenharmony_ci <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> 653593fb6ee3Sopenharmony_ci 653693fb6ee3Sopenharmony_ci <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 653793fb6ee3Sopenharmony_ci DOM looks like:</p> 653893fb6ee3Sopenharmony_ci 653993fb6ee3Sopenharmony_ci <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> 654093fb6ee3Sopenharmony_ci 654193fb6ee3Sopenharmony_ci <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> 654293fb6ee3Sopenharmony_ci 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 654393fb6ee3Sopenharmony_ci <code id=misnested-tags:-b-p-/b-/p:the-p-element-10><a href=semantics.html#the-p-element>p</a></code> element:</p> 654493fb6ee3Sopenharmony_ci 654593fb6ee3Sopenharmony_ci <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> 654693fb6ee3Sopenharmony_ci 654793fb6ee3Sopenharmony_ci 654893fb6ee3Sopenharmony_ci <h5 id=unexpected-markup-in-tables>12.2.8.3 Unexpected markup in tables</h5> 654993fb6ee3Sopenharmony_ci 655093fb6ee3Sopenharmony_ci <p><i>This section is non-normative.</i></p> 655193fb6ee3Sopenharmony_ci 655293fb6ee3Sopenharmony_ci <p>Error handling in tables is, for historical reasons, especially strange. For example, consider 655393fb6ee3Sopenharmony_ci the following markup:</p> 655493fb6ee3Sopenharmony_ci 655593fb6ee3Sopenharmony_ci <pre><table><strong><b></strong><tr><td>aaa</td></tr><strong>bbb</strong></table>ccc</pre> 655693fb6ee3Sopenharmony_ci 655793fb6ee3Sopenharmony_ci <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 655893fb6ee3Sopenharmony_ci that, and the parser handles this case by placing the element <em>before</em> the table. (This is 655993fb6ee3Sopenharmony_ci 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 656093fb6ee3Sopenharmony_ci 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> 656193fb6ee3Sopenharmony_ci 656293fb6ee3Sopenharmony_ci <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> 656393fb6ee3Sopenharmony_ci 656493fb6ee3Sopenharmony_ci <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> 656593fb6ee3Sopenharmony_ci 656693fb6ee3Sopenharmony_ci <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> 656793fb6ee3Sopenharmony_ci 656893fb6ee3Sopenharmony_ci <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 656993fb6ee3Sopenharmony_ci <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, 657093fb6ee3Sopenharmony_ci 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 657193fb6ee3Sopenharmony_ci <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> 657293fb6ee3Sopenharmony_ci 657393fb6ee3Sopenharmony_ci <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 657493fb6ee3Sopenharmony_ci 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 657593fb6ee3Sopenharmony_ci 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> 657693fb6ee3Sopenharmony_ci 657793fb6ee3Sopenharmony_ci <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> 657893fb6ee3Sopenharmony_ci 657993fb6ee3Sopenharmony_ci <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>, 658093fb6ee3Sopenharmony_ci <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 658193fb6ee3Sopenharmony_ci 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 658293fb6ee3Sopenharmony_ci <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> 658393fb6ee3Sopenharmony_ci 658493fb6ee3Sopenharmony_ci <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 658593fb6ee3Sopenharmony_ci 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 658693fb6ee3Sopenharmony_ci formatting elements</a> (it also switches to the "<a href=#parsing-main-intd id=unexpected-markup-in-tables:parsing-main-intd>in 658793fb6ee3Sopenharmony_ci cell</a>" <a href=#insertion-mode id=unexpected-markup-in-tables:insertion-mode-3>insertion mode</a>).</p> 658893fb6ee3Sopenharmony_ci 658993fb6ee3Sopenharmony_ci <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> 659093fb6ee3Sopenharmony_ci 659193fb6ee3Sopenharmony_ci <p>The <a href=#concept-parser-marker id=unexpected-markup-in-tables:concept-parser-marker-2>marker</a> means that when the "aaa" character 659293fb6ee3Sopenharmony_ci 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> 659393fb6ee3Sopenharmony_ci node:</p> 659493fb6ee3Sopenharmony_ci 659593fb6ee3Sopenharmony_ci <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> 659693fb6ee3Sopenharmony_ci 659793fb6ee3Sopenharmony_ci <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 659893fb6ee3Sopenharmony_ci 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>, 659993fb6ee3Sopenharmony_ci <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> 660093fb6ee3Sopenharmony_ci 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> 660193fb6ee3Sopenharmony_ci 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> 660293fb6ee3Sopenharmony_ci 660393fb6ee3Sopenharmony_ci <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 660493fb6ee3Sopenharmony_ci insertion mode</a> set to "<a href=#parsing-main-intbody id=unexpected-markup-in-tables:parsing-main-intbody-3>in table body</a>"). 660593fb6ee3Sopenharmony_ci 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 660693fb6ee3Sopenharmony_ci tag) is seen, they are processed as a group. Since they are not all spaces, they are handled as 660793fb6ee3Sopenharmony_ci per the "anything else" rules in the "<a href=#parsing-main-intable id=unexpected-markup-in-tables:parsing-main-intable-2>in table</a>" 660893fb6ee3Sopenharmony_ci insertion mode, which defer to the "<a href=#parsing-main-inbody id=unexpected-markup-in-tables:parsing-main-inbody>in body</a>" 660993fb6ee3Sopenharmony_ci insertion mode but with <a href=#foster-parent id=unexpected-markup-in-tables:foster-parent-2>foster parenting</a>.</p> 661093fb6ee3Sopenharmony_ci 661193fb6ee3Sopenharmony_ci <p>When <a href=#reconstruct-the-active-formatting-elements id=unexpected-markup-in-tables:reconstruct-the-active-formatting-elements>the active formatting elements 661293fb6ee3Sopenharmony_ci 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> 661393fb6ee3Sopenharmony_ci 661493fb6ee3Sopenharmony_ci <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> 661593fb6ee3Sopenharmony_ci 661693fb6ee3Sopenharmony_ci <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>, 661793fb6ee3Sopenharmony_ci <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 661893fb6ee3Sopenharmony_ci 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> 661993fb6ee3Sopenharmony_ci 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> 662093fb6ee3Sopenharmony_ci 662193fb6ee3Sopenharmony_ci <p>Had the character tokens been only <a href=infrastructure.html#space-character id=unexpected-markup-in-tables:space-character>space characters</a> 662293fb6ee3Sopenharmony_ci 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 662393fb6ee3Sopenharmony_ci 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> 662493fb6ee3Sopenharmony_ci 662593fb6ee3Sopenharmony_ci <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 662693fb6ee3Sopenharmony_ci 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 662793fb6ee3Sopenharmony_ci 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 662893fb6ee3Sopenharmony_ci 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 662993fb6ee3Sopenharmony_ci table:</p> 663093fb6ee3Sopenharmony_ci 663193fb6ee3Sopenharmony_ci <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> 663293fb6ee3Sopenharmony_ci 663393fb6ee3Sopenharmony_ci 663493fb6ee3Sopenharmony_ci <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> 663593fb6ee3Sopenharmony_ci 663693fb6ee3Sopenharmony_ci <p><i>This section is non-normative.</i></p> 663793fb6ee3Sopenharmony_ci 663893fb6ee3Sopenharmony_ci <p>Consider the following markup, which for this example we will assume is the document with 663993fb6ee3Sopenharmony_ci <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 664093fb6ee3Sopenharmony_ci 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> 664193fb6ee3Sopenharmony_ci 664293fb6ee3Sopenharmony_ci <pre><div id=a> 664393fb6ee3Sopenharmony_ci <script> 664493fb6ee3Sopenharmony_ci var div = document.getElementById('a'); 664593fb6ee3Sopenharmony_ci parent.document.body.appendChild(div); 664693fb6ee3Sopenharmony_ci </script> 664793fb6ee3Sopenharmony_ci <script> 664893fb6ee3Sopenharmony_ci alert(document.URL); 664993fb6ee3Sopenharmony_ci </script> 665093fb6ee3Sopenharmony_ci</div> 665193fb6ee3Sopenharmony_ci<script> 665293fb6ee3Sopenharmony_ci alert(document.URL); 665393fb6ee3Sopenharmony_ci</script></pre> 665493fb6ee3Sopenharmony_ci 665593fb6ee3Sopenharmony_ci <p>Up to the first "script" end tag, before the script is parsed, the result is relatively 665693fb6ee3Sopenharmony_ci straightforward:</p> 665793fb6ee3Sopenharmony_ci 665893fb6ee3Sopenharmony_ci <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> 665993fb6ee3Sopenharmony_ci </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> 666093fb6ee3Sopenharmony_ci 666193fb6ee3Sopenharmony_ci <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 666293fb6ee3Sopenharmony_ci <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> 666393fb6ee3Sopenharmony_ci 666493fb6ee3Sopenharmony_ci <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> 666593fb6ee3Sopenharmony_ci 666693fb6ee3Sopenharmony_ci <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 666793fb6ee3Sopenharmony_ci <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 666893fb6ee3Sopenharmony_ci 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> 666993fb6ee3Sopenharmony_ci 667093fb6ee3Sopenharmony_ci <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 667193fb6ee3Sopenharmony_ci <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> 667293fb6ee3Sopenharmony_ci 667393fb6ee3Sopenharmony_ci <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 667493fb6ee3Sopenharmony_ci not execute, so the first alert does not show.</p> 667593fb6ee3Sopenharmony_ci 667693fb6ee3Sopenharmony_ci <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 667793fb6ee3Sopenharmony_ci 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 667893fb6ee3Sopenharmony_ci <code id=scripts-that-modify-the-page-as-it-is-being-parsed:document-4><a href=dom.html#document>Document</a></code>:</p> 667993fb6ee3Sopenharmony_ci 668093fb6ee3Sopenharmony_ci <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> 668193fb6ee3Sopenharmony_ci 668293fb6ee3Sopenharmony_ci <p>This script does execute, resulting in an alert that says "http://example.com/inner".</p> 668393fb6ee3Sopenharmony_ci 668493fb6ee3Sopenharmony_ci 668593fb6ee3Sopenharmony_ci <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> 668693fb6ee3Sopenharmony_ci 668793fb6ee3Sopenharmony_ci <p><i>This section is non-normative.</i></p> 668893fb6ee3Sopenharmony_ci 668993fb6ee3Sopenharmony_ci <p>Elaborating on the example in the previous section, consider the case where the second 669093fb6ee3Sopenharmony_ci <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 669193fb6ee3Sopenharmony_ci <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> 669293fb6ee3Sopenharmony_ci 669393fb6ee3Sopenharmony_ci <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> 669493fb6ee3Sopenharmony_ci 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 669593fb6ee3Sopenharmony_ci script is being downloaded, the element is moved to another document, the script continues to 669693fb6ee3Sopenharmony_ci download, but does not execute.</p> 669793fb6ee3Sopenharmony_ci 669893fb6ee3Sopenharmony_ci <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 669993fb6ee3Sopenharmony_ci considered a bad practice.</p> 670093fb6ee3Sopenharmony_ci 670193fb6ee3Sopenharmony_ci 670293fb6ee3Sopenharmony_ci 670393fb6ee3Sopenharmony_ci <h5 id=unclosed-formatting-elements>12.2.8.6 Unclosed formatting elements</h5> 670493fb6ee3Sopenharmony_ci 670593fb6ee3Sopenharmony_ci <p><i>This section is non-normative.</i></p> 670693fb6ee3Sopenharmony_ci 670793fb6ee3Sopenharmony_ci <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 670893fb6ee3Sopenharmony_ci collected and continue to be applied even as the elements they are contained in are closed, but 670993fb6ee3Sopenharmony_ci that excessive duplicates are thrown away.</p> 671093fb6ee3Sopenharmony_ci 671193fb6ee3Sopenharmony_ci <pre><!DOCTYPE html> 671293fb6ee3Sopenharmony_ci<p><b class=x><b class=x><b><b class=x><b class=x><b>X 671393fb6ee3Sopenharmony_ci<p>X 671493fb6ee3Sopenharmony_ci<p><b><b class=x><b>X 671593fb6ee3Sopenharmony_ci<p></b></b></b></b></b></b>X</pre> 671693fb6ee3Sopenharmony_ci 671793fb6ee3Sopenharmony_ci <p>The resulting DOM tree is as follows:</p> 671893fb6ee3Sopenharmony_ci 671993fb6ee3Sopenharmony_ci <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> 672093fb6ee3Sopenharmony_ci 672193fb6ee3Sopenharmony_ci <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> 672293fb6ee3Sopenharmony_ci elements, but in the resulting DOM, up to three of each kind of formatting element (in this case 672393fb6ee3Sopenharmony_ci 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) 672493fb6ee3Sopenharmony_ci get reconstructed before the element's "X".</p> 672593fb6ee3Sopenharmony_ci 672693fb6ee3Sopenharmony_ci <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 672793fb6ee3Sopenharmony_ci 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 672893fb6ee3Sopenharmony_ci <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> 672993fb6ee3Sopenharmony_ci 673093fb6ee3Sopenharmony_ci 673193fb6ee3Sopenharmony_ci 673293fb6ee3Sopenharmony_ci 673393fb6ee3Sopenharmony_ci 673493fb6ee3Sopenharmony_ci <h3 id=serialising-html-fragments>12.3 Serialising HTML fragments</h3> 673593fb6ee3Sopenharmony_ci 673693fb6ee3Sopenharmony_ci <p>The following steps form the <dfn id=html-fragment-serialisation-algorithm>HTML fragment serialisation algorithm</dfn>. The algorithm 673793fb6ee3Sopenharmony_ci 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> 673893fb6ee3Sopenharmony_ci referred to as <var>the node</var>, and either returns a string or throws an 673993fb6ee3Sopenharmony_ci exception.</p> 674093fb6ee3Sopenharmony_ci 674193fb6ee3Sopenharmony_ci <p class=note>This algorithm serialises the <em>children</em> of the node being serialised, not 674293fb6ee3Sopenharmony_ci the node itself.</p> 674393fb6ee3Sopenharmony_ci 674493fb6ee3Sopenharmony_ci <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 674593fb6ee3Sopenharmony_ci contents</a> (a <code id=serialising-html-fragments:documentfragment-2><a href=infrastructure.html#documentfragment>DocumentFragment</a></code> node).<li> 674693fb6ee3Sopenharmony_ci 674793fb6ee3Sopenharmony_ci <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 674893fb6ee3Sopenharmony_ci following steps: 674993fb6ee3Sopenharmony_ci 675093fb6ee3Sopenharmony_ci <ol><li><p>Let <var>current node</var> be the child node being processed.<li> 675193fb6ee3Sopenharmony_ci 675293fb6ee3Sopenharmony_ci <p>Append the appropriate string from the following list to <var>s</var>:</p> 675393fb6ee3Sopenharmony_ci 675493fb6ee3Sopenharmony_ci <dl class=switch><dt>If <var>current node</var> is an <code>Element</code><dd> 675593fb6ee3Sopenharmony_ci 675693fb6ee3Sopenharmony_ci <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 675793fb6ee3Sopenharmony_ci <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> 675893fb6ee3Sopenharmony_ci 675993fb6ee3Sopenharmony_ci <p>Append a U+003C LESS-THAN SIGN character (<), followed by <var>tagname</var>.</p> 676093fb6ee3Sopenharmony_ci 676193fb6ee3Sopenharmony_ci <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 676293fb6ee3Sopenharmony_ci <code>Document.createElement()</code>, <var>tagname</var> will be 676393fb6ee3Sopenharmony_ci lowercase.</p> 676493fb6ee3Sopenharmony_ci 676593fb6ee3Sopenharmony_ci <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 676693fb6ee3Sopenharmony_ci U+003D EQUALS SIGN character (=), a U+0022 QUOTATION MARK character ("), the 676793fb6ee3Sopenharmony_ci attribute's value, <a href=#escapingString id=serialising-html-fragments:escapingString>escaped as described below</a> in 676893fb6ee3Sopenharmony_ci <i>attribute mode</i>, and a second U+0022 QUOTATION MARK character (").</p> 676993fb6ee3Sopenharmony_ci 677093fb6ee3Sopenharmony_ci <p>An <dfn id="attribute's-serialised-name">attribute's serialised name</dfn> for the purposes of the previous paragraph must 677193fb6ee3Sopenharmony_ci be determined as follows:</p> 677293fb6ee3Sopenharmony_ci 677393fb6ee3Sopenharmony_ci <dl class=switch><dt>If the attribute has no namespace<dd> 677493fb6ee3Sopenharmony_ci 677593fb6ee3Sopenharmony_ci <p>The attribute's serialised name is the attribute's local name.</p> 677693fb6ee3Sopenharmony_ci 677793fb6ee3Sopenharmony_ci <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 677893fb6ee3Sopenharmony_ci parser</a> or by <code>Element.setAttribute()</code>, the local name will be 677993fb6ee3Sopenharmony_ci lowercase.</p> 678093fb6ee3Sopenharmony_ci 678193fb6ee3Sopenharmony_ci <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 678293fb6ee3Sopenharmony_ci 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 678393fb6ee3Sopenharmony_ci 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 678493fb6ee3Sopenharmony_ci is not <code>xmlns</code><dd><p>The attribute's serialised name is the string "<code>xmlns:</code>" 678593fb6ee3Sopenharmony_ci 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>" 678693fb6ee3Sopenharmony_ci 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> 678793fb6ee3Sopenharmony_ci 678893fb6ee3Sopenharmony_ci <p>While the exact order of attributes is UA-defined, and may depend on factors such as the 678993fb6ee3Sopenharmony_ci order that the attributes were given in the original markup, the sort order must be stable, 679093fb6ee3Sopenharmony_ci such that consecutive invocations of this algorithm serialise an element's attributes in the 679193fb6ee3Sopenharmony_ci same order.</p> 679293fb6ee3Sopenharmony_ci 679393fb6ee3Sopenharmony_ci <p>Append a U+003E GREATER-THAN SIGN character (>).</p> 679493fb6ee3Sopenharmony_ci 679593fb6ee3Sopenharmony_ci <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>, 679693fb6ee3Sopenharmony_ci <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>, 679793fb6ee3Sopenharmony_ci <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>, 679893fb6ee3Sopenharmony_ci <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>, 679993fb6ee3Sopenharmony_ci <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 680093fb6ee3Sopenharmony_ci <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> 680193fb6ee3Sopenharmony_ci 680293fb6ee3Sopenharmony_ci 680393fb6ee3Sopenharmony_ci 680493fb6ee3Sopenharmony_ci <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 680593fb6ee3Sopenharmony_ci <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 680693fb6ee3Sopenharmony_ci <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 680793fb6ee3Sopenharmony_ci (LF) character, then append a U+000A LINE FEED (LF) character.</p> 680893fb6ee3Sopenharmony_ci 680993fb6ee3Sopenharmony_ci <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 681093fb6ee3Sopenharmony_ci <var>current node</var> element (thus recursing into this algorithm for that 681193fb6ee3Sopenharmony_ci element), followed by a U+003C LESS-THAN SIGN character (<), a U+002F SOLIDUS character 681293fb6ee3Sopenharmony_ci (/), <var>tagname</var> again, and finally a U+003E GREATER-THAN SIGN character 681393fb6ee3Sopenharmony_ci (>).</p> 681493fb6ee3Sopenharmony_ci 681593fb6ee3Sopenharmony_ci <dt>If <var>current node</var> is a <code>Text</code> node<dd> 681693fb6ee3Sopenharmony_ci 681793fb6ee3Sopenharmony_ci <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>, 681893fb6ee3Sopenharmony_ci <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>, 681993fb6ee3Sopenharmony_ci <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 682093fb6ee3Sopenharmony_ci <var>current node</var>'s <code>data</code> IDL attribute literally.</p> 682193fb6ee3Sopenharmony_ci 682293fb6ee3Sopenharmony_ci <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 682393fb6ee3Sopenharmony_ci below</a>.</p> 682493fb6ee3Sopenharmony_ci 682593fb6ee3Sopenharmony_ci <dt>If <var>current node</var> is a <code>Comment</code><dd> 682693fb6ee3Sopenharmony_ci 682793fb6ee3Sopenharmony_ci <p>Append the literal string "<code><!--</code>" (U+003C LESS-THAN SIGN, U+0021 682893fb6ee3Sopenharmony_ci 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 682993fb6ee3Sopenharmony_ci literal string "<code>--></code>" (U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS, 683093fb6ee3Sopenharmony_ci U+003E GREATER-THAN SIGN).</p> 683193fb6ee3Sopenharmony_ci 683293fb6ee3Sopenharmony_ci <dt>If <var>current node</var> is a <code>ProcessingInstruction</code><dd> 683393fb6ee3Sopenharmony_ci 683493fb6ee3Sopenharmony_ci <p>Append the literal string "<code><?</code>" (U+003C LESS-THAN SIGN, U+003F 683593fb6ee3Sopenharmony_ci 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 683693fb6ee3Sopenharmony_ci by the value of <var>current node</var>'s <code>data</code> IDL 683793fb6ee3Sopenharmony_ci attribute, followed by a single U+003E GREATER-THAN SIGN character (>).</p> 683893fb6ee3Sopenharmony_ci 683993fb6ee3Sopenharmony_ci <dt>If <var>current node</var> is a <code>DocumentType</code><dd> 684093fb6ee3Sopenharmony_ci 684193fb6ee3Sopenharmony_ci <p>Append the literal string "<code><!DOCTYPE</code>" (U+003C LESS-THAN SIGN, U+0021 684293fb6ee3Sopenharmony_ci EXCLAMATION MARK, U+0044 LATIN CAPITAL LETTER D, U+004F LATIN CAPITAL LETTER O, U+0043 LATIN 684393fb6ee3Sopenharmony_ci CAPITAL LETTER C, U+0054 LATIN CAPITAL LETTER T, U+0059 LATIN CAPITAL LETTER Y, U+0050 LATIN 684493fb6ee3Sopenharmony_ci CAPITAL LETTER P, U+0045 LATIN CAPITAL LETTER E), followed by a space (U+0020 SPACE), 684593fb6ee3Sopenharmony_ci followed by the value of <var>current node</var>'s <code>name</code> IDL 684693fb6ee3Sopenharmony_ci attribute, followed by the literal string "<code>></code>" (U+003E GREATER-THAN SIGN).</p> 684793fb6ee3Sopenharmony_ci 684893fb6ee3Sopenharmony_ci </dl> 684993fb6ee3Sopenharmony_ci 685093fb6ee3Sopenharmony_ci 685193fb6ee3Sopenharmony_ci 685293fb6ee3Sopenharmony_ci </ol> 685393fb6ee3Sopenharmony_ci 685493fb6ee3Sopenharmony_ci <li><p>The result of the algorithm is the string <var>s</var>.</ol> 685593fb6ee3Sopenharmony_ci 685693fb6ee3Sopenharmony_ci <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 685793fb6ee3Sopenharmony_ci parser</a>, will not return the original tree structure.</p> 685893fb6ee3Sopenharmony_ci 685993fb6ee3Sopenharmony_ci <div class=example> 686093fb6ee3Sopenharmony_ci 686193fb6ee3Sopenharmony_ci <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 686293fb6ee3Sopenharmony_ci has been appended is serialised and the output is then reparsed, the comment will end up being 686393fb6ee3Sopenharmony_ci displayed in the text field. Similarly, if, as a result of DOM manipulation, an element contains 686493fb6ee3Sopenharmony_ci a comment that contains the literal string "<code>--></code>", then when the result 686593fb6ee3Sopenharmony_ci of serialising the element is parsed, the comment will be truncated at that point and the rest of 686693fb6ee3Sopenharmony_ci 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> 686793fb6ee3Sopenharmony_ci element contain a <code id=serialising-html-fragments:text-2><a href=infrastructure.html#text>Text</a></code> node with the text string "<code></script></code>", or 686893fb6ee3Sopenharmony_ci 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> 686993fb6ee3Sopenharmony_ci element's <a href=#syntax-start-tag id=serialising-html-fragments:syntax-start-tag>start tag</a> would imply the end tag for the 687093fb6ee3Sopenharmony_ci <code id=serialising-html-fragments:the-p-element-2><a href=semantics.html#the-p-element>p</a></code>).</p> 687193fb6ee3Sopenharmony_ci 687293fb6ee3Sopenharmony_ci <p>This can enable cross-site scripting attacks. An example of this would be a page that lets the 687393fb6ee3Sopenharmony_ci 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 687493fb6ee3Sopenharmony_ci 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 687593fb6ee3Sopenharmony_ci 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 687693fb6ee3Sopenharmony_ci "<code></style><script>attack</script></code>" as a font family name, <code id=serialising-html-fragments:dom-innerhtml-2><a href=infrastructure.html#dom-innerhtml>innerHTML</a></code> will return markup that, if parsed in a different context, 687793fb6ee3Sopenharmony_ci 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 687893fb6ee3Sopenharmony_ci original DOM.</p> 687993fb6ee3Sopenharmony_ci 688093fb6ee3Sopenharmony_ci </div> 688193fb6ee3Sopenharmony_ci 688293fb6ee3Sopenharmony_ci <p><dfn id=escapingString>Escaping a string</dfn> (for the purposes of the algorithm above) 688393fb6ee3Sopenharmony_ci consists of running the following steps:</p> 688493fb6ee3Sopenharmony_ci 688593fb6ee3Sopenharmony_ci <ol><li><p>Replace any occurrence of the "<code>&</code>" character by the string "<code>&amp;</code>".<li><p>Replace any occurrences of the U+00A0 NO-BREAK SPACE character by the string "<code>&nbsp;</code>".<li><p>If the algorithm was invoked in the <i>attribute mode</i>, replace any occurrences of the 688693fb6ee3Sopenharmony_ci "<code>"</code>" character by the string "<code>&quot;</code>".<li><p>If the algorithm was <em>not</em> invoked in the <i>attribute mode</i>, replace any 688793fb6ee3Sopenharmony_ci occurrences of the "<code><</code>" character by the string "<code>&lt;</code>", and any occurrences of the "<code>></code>" character by 688893fb6ee3Sopenharmony_ci the string "<code>&gt;</code>".</ol> 688993fb6ee3Sopenharmony_ci 689093fb6ee3Sopenharmony_ci 689193fb6ee3Sopenharmony_ci <h3 id=parsing-html-fragments>12.4 Parsing HTML fragments</h3> 689293fb6ee3Sopenharmony_ci 689393fb6ee3Sopenharmony_ci <p>The following steps form the <dfn id=html-fragment-parsing-algorithm>HTML fragment parsing algorithm</dfn>. The algorithm 689493fb6ee3Sopenharmony_ci 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 689593fb6ee3Sopenharmony_ci the parser, as well as <var>input</var>, a string to parse, and returns a list of zero or 689693fb6ee3Sopenharmony_ci more nodes.</p> 689793fb6ee3Sopenharmony_ci 689893fb6ee3Sopenharmony_ci <p class=note>Parts marked <dfn id=fragment-case>fragment case</dfn> in algorithms in the parser section are 689993fb6ee3Sopenharmony_ci parts that only occur if the parser was created for the purposes of this algorithm (and with a 690093fb6ee3Sopenharmony_ci <var id=parsing-html-fragments:concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></var> element). The algorithms have been annotated 690193fb6ee3Sopenharmony_ci with such markings for informational purposes only; such markings have no normative weight. If it 690293fb6ee3Sopenharmony_ci 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 690393fb6ee3Sopenharmony_ci parser wasn't created for the purposes of handling this algorithm, then that is an error in the 690493fb6ee3Sopenharmony_ci specification.</p> 690593fb6ee3Sopenharmony_ci 690693fb6ee3Sopenharmony_ci <ol><li> 690793fb6ee3Sopenharmony_ci 690893fb6ee3Sopenharmony_ci <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> 690993fb6ee3Sopenharmony_ci 691093fb6ee3Sopenharmony_ci <li> 691193fb6ee3Sopenharmony_ci 691293fb6ee3Sopenharmony_ci <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 691393fb6ee3Sopenharmony_ci <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 691493fb6ee3Sopenharmony_ci <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>. 691593fb6ee3Sopenharmony_ci 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 691693fb6ee3Sopenharmony_ci <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 691793fb6ee3Sopenharmony_ci <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 691893fb6ee3Sopenharmony_ci 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> 691993fb6ee3Sopenharmony_ci 692093fb6ee3Sopenharmony_ci <li> 692193fb6ee3Sopenharmony_ci 692293fb6ee3Sopenharmony_ci <p>Create a new <a href=#html-parser id=parsing-html-fragments:html-parser>HTML parser</a>, and associate it with the just created 692393fb6ee3Sopenharmony_ci <code id=parsing-html-fragments:document-5><a href=dom.html#document>Document</a></code> node.</p> 692493fb6ee3Sopenharmony_ci 692593fb6ee3Sopenharmony_ci <li> 692693fb6ee3Sopenharmony_ci 692793fb6ee3Sopenharmony_ci <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 692893fb6ee3Sopenharmony_ci substeps:</p> 692993fb6ee3Sopenharmony_ci 693093fb6ee3Sopenharmony_ci <ol><li> 693193fb6ee3Sopenharmony_ci 693293fb6ee3Sopenharmony_ci <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 693393fb6ee3Sopenharmony_ci follows:</p> 693493fb6ee3Sopenharmony_ci 693593fb6ee3Sopenharmony_ci <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>, 693693fb6ee3Sopenharmony_ci <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 693793fb6ee3Sopenharmony_ci 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> 693893fb6ee3Sopenharmony_ci 693993fb6ee3Sopenharmony_ci <p class=note>For performance reasons, an implementation that does not report errors and 694093fb6ee3Sopenharmony_ci that uses the actual state machine described in this specification directly could use the 694193fb6ee3Sopenharmony_ci PLAINTEXT state instead of the RAWTEXT and script data states where those are mentioned in the 694293fb6ee3Sopenharmony_ci list above. Except for rules regarding parse errors, they are equivalent, since there is no 694393fb6ee3Sopenharmony_ci <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 694493fb6ee3Sopenharmony_ci transitions.</p> 694593fb6ee3Sopenharmony_ci 694693fb6ee3Sopenharmony_ci <li> 694793fb6ee3Sopenharmony_ci 694893fb6ee3Sopenharmony_ci <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> 694993fb6ee3Sopenharmony_ci 695093fb6ee3Sopenharmony_ci <li> 695193fb6ee3Sopenharmony_ci 695293fb6ee3Sopenharmony_ci <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 695393fb6ee3Sopenharmony_ci above.</p> 695493fb6ee3Sopenharmony_ci 695593fb6ee3Sopenharmony_ci <li> 695693fb6ee3Sopenharmony_ci 695793fb6ee3Sopenharmony_ci <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 695893fb6ee3Sopenharmony_ci element <var>root</var>.</p> 695993fb6ee3Sopenharmony_ci 696093fb6ee3Sopenharmony_ci <li> 696193fb6ee3Sopenharmony_ci 696293fb6ee3Sopenharmony_ci <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 696393fb6ee3Sopenharmony_ci <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 696493fb6ee3Sopenharmony_ci 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 696593fb6ee3Sopenharmony_ci <a href=#current-template-insertion-mode id=parsing-html-fragments:current-template-insertion-mode>current template insertion mode</a>.</p> 696693fb6ee3Sopenharmony_ci 696793fb6ee3Sopenharmony_ci <li> 696893fb6ee3Sopenharmony_ci 696993fb6ee3Sopenharmony_ci <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 697093fb6ee3Sopenharmony_ci <var id=parsing-html-fragments:concept-frag-parse-context-9><a href=#concept-frag-parse-context>context</a></var>.</p> 697193fb6ee3Sopenharmony_ci 697293fb6ee3Sopenharmony_ci <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 697393fb6ee3Sopenharmony_ci if it is an <a href=#html-integration-point id=parsing-html-fragments:html-integration-point>HTML integration point</a>.</p> 697493fb6ee3Sopenharmony_ci 697593fb6ee3Sopenharmony_ci <li> 697693fb6ee3Sopenharmony_ci 697793fb6ee3Sopenharmony_ci <p><a href=#reset-the-insertion-mode-appropriately id=parsing-html-fragments:reset-the-insertion-mode-appropriately>Reset the parser's insertion mode 697893fb6ee3Sopenharmony_ci appropriately</a>.</p> 697993fb6ee3Sopenharmony_ci 698093fb6ee3Sopenharmony_ci <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> 698193fb6ee3Sopenharmony_ci 698293fb6ee3Sopenharmony_ci <li> 698393fb6ee3Sopenharmony_ci 698493fb6ee3Sopenharmony_ci <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 698593fb6ee3Sopenharmony_ci <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> 698693fb6ee3Sopenharmony_ci element (going straight up the ancestor chain, and including the element itself, if it is a 698793fb6ee3Sopenharmony_ci <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 698893fb6ee3Sopenharmony_ci <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> 698993fb6ee3Sopenharmony_ci 699093fb6ee3Sopenharmony_ci </ol> 699193fb6ee3Sopenharmony_ci 699293fb6ee3Sopenharmony_ci <li> 699393fb6ee3Sopenharmony_ci 699493fb6ee3Sopenharmony_ci <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 699593fb6ee3Sopenharmony_ci 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> 699693fb6ee3Sopenharmony_ci 699793fb6ee3Sopenharmony_ci <li> 699893fb6ee3Sopenharmony_ci 699993fb6ee3Sopenharmony_ci <p>Start the parser and let it run until it has consumed all the characters just inserted into 700093fb6ee3Sopenharmony_ci the input stream.</p> 700193fb6ee3Sopenharmony_ci 700293fb6ee3Sopenharmony_ci <li> 700393fb6ee3Sopenharmony_ci 700493fb6ee3Sopenharmony_ci <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 700593fb6ee3Sopenharmony_ci nodes of <var>root</var>, in <a id=parsing-html-fragments:tree-order href=infrastructure.html#tree-order>tree order</a>.</p> 700693fb6ee3Sopenharmony_ci 700793fb6ee3Sopenharmony_ci <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 700893fb6ee3Sopenharmony_ci order</a>.</p> 700993fb6ee3Sopenharmony_ci 701093fb6ee3Sopenharmony_ci </ol> 701193fb6ee3Sopenharmony_ci 701293fb6ee3Sopenharmony_ci 701393fb6ee3Sopenharmony_ci 701493fb6ee3Sopenharmony_ci 701593fb6ee3Sopenharmony_ci 701693fb6ee3Sopenharmony_ci <h3 id=named-character-references>12.5 <dfn>Named character references</dfn></h3> 701793fb6ee3Sopenharmony_ci 701893fb6ee3Sopenharmony_ci <p>This table lists the character reference names that are supported by HTML, and the code points 701993fb6ee3Sopenharmony_ci to which they refer. It is referenced by the previous sections.</p> 702093fb6ee3Sopenharmony_ci 702193fb6ee3Sopenharmony_ci <div id=named-character-references-table> 702293fb6ee3Sopenharmony_ci <table><thead><tr><th> Name <th> Character(s) <th> Glyph <tbody><tr id=entity-Aacute><td> <code>Aacute;</code> <td> U+000C1 <td> <span class=glyph>Á</span> <tr id=entity-Aacute-legacy class=impl><td> <code>Aacute</code> <td> U+000C1 <td> <span>Á</span> <tr id=entity-aacute><td> <code>aacute;</code> <td> U+000E1 <td> <span class=glyph>á</span> <tr id=entity-aacute-legacy class=impl><td> <code>aacute</code> <td> U+000E1 <td> <span>á</span> <tr id=entity-Abreve><td> <code>Abreve;</code> <td> U+00102 <td> <span class=glyph>Ă</span> <tr id=entity-abreve><td> <code>abreve;</code> <td> U+00103 <td> <span class=glyph>ă</span> <tr id=entity-ac><td> <code>ac;</code> <td> U+0223E <td> <span class=glyph>∾</span> <tr id=entity-acd><td> <code>acd;</code> <td> U+0223F <td> <span class=glyph>∿</span> <tr id=entity-acE><td> <code>acE;</code> <td> U+0223E U+00333 <td> <span class="glyph compound">∾̳</span> <tr id=entity-Acirc><td> <code>Acirc;</code> <td> U+000C2 <td> <span class=glyph>Â</span> <tr id=entity-Acirc-legacy class=impl><td> <code>Acirc</code> <td> U+000C2 <td> <span>Â</span> <tr id=entity-acirc><td> <code>acirc;</code> <td> U+000E2 <td> <span class=glyph>â</span> <tr id=entity-acirc-legacy class=impl><td> <code>acirc</code> <td> U+000E2 <td> <span>â</span> <tr id=entity-acute><td> <code>acute;</code> <td> U+000B4 <td> <span class=glyph>´</span> <tr id=entity-acute-legacy class=impl><td> <code>acute</code> <td> U+000B4 <td> <span>´</span> <tr id=entity-Acy><td> <code>Acy;</code> <td> U+00410 <td> <span class=glyph>А</span> <tr id=entity-acy><td> <code>acy;</code> <td> U+00430 <td> <span class=glyph>а</span> <tr id=entity-AElig><td> <code>AElig;</code> <td> U+000C6 <td> <span class=glyph>Æ</span> <tr id=entity-AElig-legacy class=impl><td> <code>AElig</code> <td> U+000C6 <td> <span>Æ</span> <tr id=entity-aelig><td> <code>aelig;</code> <td> U+000E6 <td> <span class=glyph>æ</span> <tr id=entity-aelig-legacy class=impl><td> <code>aelig</code> <td> U+000E6 <td> <span>æ</span> <tr id=entity-af><td> <code>af;</code> <td> U+02061 <td> <span class=glyph></span> <tr id=entity-Afr><td> <code>Afr;</code> <td> U+1D504 <td> <span class=glyph></span> <tr id=entity-afr><td> <code>afr;</code> <td> U+1D51E <td> <span class=glyph></span> <tr id=entity-Agrave><td> <code>Agrave;</code> <td> U+000C0 <td> <span class=glyph>À</span> <tr id=entity-Agrave-legacy class=impl><td> <code>Agrave</code> <td> U+000C0 <td> <span>À</span> <tr id=entity-agrave><td> <code>agrave;</code> <td> U+000E0 <td> <span class=glyph>à</span> <tr id=entity-agrave-legacy class=impl><td> <code>agrave</code> <td> U+000E0 <td> <span>à</span> <tr id=entity-alefsym><td> <code>alefsym;</code> <td> U+02135 <td> <span class=glyph>ℵ</span> <tr id=entity-aleph><td> <code>aleph;</code> <td> U+02135 <td> <span class=glyph>ℵ</span> <tr id=entity-Alpha><td> <code>Alpha;</code> <td> U+00391 <td> <span class=glyph>Α</span> <tr id=entity-alpha><td> <code>alpha;</code> <td> U+003B1 <td> <span class=glyph>α</span> <tr id=entity-Amacr><td> <code>Amacr;</code> <td> U+00100 <td> <span class=glyph>Ā</span> <tr id=entity-amacr><td> <code>amacr;</code> <td> U+00101 <td> <span class=glyph>ā</span> <tr id=entity-amalg><td> <code>amalg;</code> <td> U+02A3F <td> <span class=glyph>⨿</span> <tr id=entity-AMP><td> <code>AMP;</code> <td> U+00026 <td> <span class=glyph>&</span> <tr id=entity-AMP-legacy class=impl><td> <code>AMP</code> <td> U+00026 <td> <span>&</span> <tr id=entity-amp><td> <code>amp;</code> <td> U+00026 <td> <span class=glyph>&</span> <tr id=entity-amp-legacy class=impl><td> <code>amp</code> <td> U+00026 <td> <span>&</span> <tr id=entity-And><td> <code>And;</code> <td> U+02A53 <td> <span class=glyph>⩓</span> <tr id=entity-and><td> <code>and;</code> <td> U+02227 <td> <span class=glyph>∧</span> <tr id=entity-andand><td> <code>andand;</code> <td> U+02A55 <td> <span class=glyph>⩕</span> <tr id=entity-andd><td> <code>andd;</code> <td> U+02A5C <td> <span class=glyph>⩜</span> <tr id=entity-andslope><td> <code>andslope;</code> <td> U+02A58 <td> <span class=glyph>⩘</span> <tr id=entity-andv><td> <code>andv;</code> <td> U+02A5A <td> <span class=glyph>⩚</span> <tr id=entity-ang><td> <code>ang;</code> <td> U+02220 <td> <span class=glyph>∠</span> <tr id=entity-ange><td> <code>ange;</code> <td> U+029A4 <td> <span class=glyph>⦤</span> <tr id=entity-angle><td> <code>angle;</code> <td> U+02220 <td> <span class=glyph>∠</span> <tr id=entity-angmsd><td> <code>angmsd;</code> <td> U+02221 <td> <span class=glyph>∡</span> <tr id=entity-angmsdaa><td> <code>angmsdaa;</code> <td> U+029A8 <td> <span class=glyph>⦨</span> <tr id=entity-angmsdab><td> <code>angmsdab;</code> <td> U+029A9 <td> <span class=glyph>⦩</span> <tr id=entity-angmsdac><td> <code>angmsdac;</code> <td> U+029AA <td> <span class=glyph>⦪</span> <tr id=entity-angmsdad><td> <code>angmsdad;</code> <td> U+029AB <td> <span class=glyph>⦫</span> <tr id=entity-angmsdae><td> <code>angmsdae;</code> <td> U+029AC <td> <span class=glyph>⦬</span> <tr id=entity-angmsdaf><td> <code>angmsdaf;</code> <td> U+029AD <td> <span class=glyph>⦭</span> <tr id=entity-angmsdag><td> <code>angmsdag;</code> <td> U+029AE <td> <span class=glyph>⦮</span> <tr id=entity-angmsdah><td> <code>angmsdah;</code> <td> U+029AF <td> <span class=glyph>⦯</span> <tr id=entity-angrt><td> <code>angrt;</code> <td> U+0221F <td> <span class=glyph>∟</span> <tr id=entity-angrtvb><td> <code>angrtvb;</code> <td> U+022BE <td> <span class=glyph>⊾</span> <tr id=entity-angrtvbd><td> <code>angrtvbd;</code> <td> U+0299D <td> <span class=glyph>⦝</span> <tr id=entity-angsph><td> <code>angsph;</code> <td> U+02222 <td> <span class=glyph>∢</span> <tr id=entity-angst><td> <code>angst;</code> <td> U+000C5 <td> <span class=glyph>Å</span> <tr id=entity-angzarr><td> <code>angzarr;</code> <td> U+0237C <td> <span class=glyph>⍼</span> <tr id=entity-Aogon><td> <code>Aogon;</code> <td> U+00104 <td> <span class=glyph>Ą</span> <tr id=entity-aogon><td> <code>aogon;</code> <td> U+00105 <td> <span class=glyph>ą</span> <tr id=entity-Aopf><td> <code>Aopf;</code> <td> U+1D538 <td> <span class=glyph></span> <tr id=entity-aopf><td> <code>aopf;</code> <td> U+1D552 <td> <span class=glyph></span> <tr id=entity-ap><td> <code>ap;</code> <td> U+02248 <td> <span class=glyph>≈</span> <tr id=entity-apacir><td> <code>apacir;</code> <td> U+02A6F <td> <span class=glyph>⩯</span> <tr id=entity-apE><td> <code>apE;</code> <td> U+02A70 <td> <span class=glyph>⩰</span> <tr id=entity-ape><td> <code>ape;</code> <td> U+0224A <td> <span class=glyph>≊</span> <tr id=entity-apid><td> <code>apid;</code> <td> U+0224B <td> <span class=glyph>≋</span> <tr id=entity-apos><td> <code>apos;</code> <td> U+00027 <td> <span class=glyph>'</span> <tr id=entity-ApplyFunction><td> <code>ApplyFunction;</code> <td> U+02061 <td> <span class=glyph></span> <tr id=entity-approx><td> <code>approx;</code> <td> U+02248 <td> <span class=glyph>≈</span> <tr id=entity-approxeq><td> <code>approxeq;</code> <td> U+0224A <td> <span class=glyph>≊</span> <tr id=entity-Aring><td> <code>Aring;</code> <td> U+000C5 <td> <span class=glyph>Å</span> <tr id=entity-Aring-legacy class=impl><td> <code>Aring</code> <td> U+000C5 <td> <span>Å</span> <tr id=entity-aring><td> <code>aring;</code> <td> U+000E5 <td> <span class=glyph>å</span> <tr id=entity-aring-legacy class=impl><td> <code>aring</code> <td> U+000E5 <td> <span>å</span> <tr id=entity-Ascr><td> <code>Ascr;</code> <td> U+1D49C <td> <span class=glyph></span> <tr id=entity-ascr><td> <code>ascr;</code> <td> U+1D4B6 <td> <span class=glyph></span> <tr id=entity-Assign><td> <code>Assign;</code> <td> U+02254 <td> <span class=glyph>≔</span> <tr id=entity-ast><td> <code>ast;</code> <td> U+0002A <td> <span class=glyph>*</span> <tr id=entity-asymp><td> <code>asymp;</code> <td> U+02248 <td> <span class=glyph>≈</span> <tr id=entity-asympeq><td> <code>asympeq;</code> <td> U+0224D <td> <span class=glyph>≍</span> <tr id=entity-Atilde><td> <code>Atilde;</code> <td> U+000C3 <td> <span class=glyph>Ã</span> <tr id=entity-Atilde-legacy class=impl><td> <code>Atilde</code> <td> U+000C3 <td> <span>Ã</span> <tr id=entity-atilde><td> <code>atilde;</code> <td> U+000E3 <td> <span class=glyph>ã</span> <tr id=entity-atilde-legacy class=impl><td> <code>atilde</code> <td> U+000E3 <td> <span>ã</span> <tr id=entity-Auml><td> <code>Auml;</code> <td> U+000C4 <td> <span class=glyph>Ä</span> <tr id=entity-Auml-legacy class=impl><td> <code>Auml</code> <td> U+000C4 <td> <span>Ä</span> <tr id=entity-auml><td> <code>auml;</code> <td> U+000E4 <td> <span class=glyph>ä</span> <tr id=entity-auml-legacy class=impl><td> <code>auml</code> <td> U+000E4 <td> <span>ä</span> <tr id=entity-awconint><td> <code>awconint;</code> <td> U+02233 <td> <span class=glyph>∳</span> <tr id=entity-awint><td> <code>awint;</code> <td> U+02A11 <td> <span class=glyph>⨑</span> <tr id=entity-backcong><td> <code>backcong;</code> <td> U+0224C <td> <span class=glyph>≌</span> <tr id=entity-backepsilon><td> <code>backepsilon;</code> <td> U+003F6 <td> <span class=glyph>϶</span> <tr id=entity-backprime><td> <code>backprime;</code> <td> U+02035 <td> <span class=glyph>‵</span> <tr id=entity-backsim><td> <code>backsim;</code> <td> U+0223D <td> <span class=glyph>∽</span> <tr id=entity-backsimeq><td> <code>backsimeq;</code> <td> U+022CD <td> <span class=glyph>⋍</span> <tr id=entity-Backslash><td> <code>Backslash;</code> <td> U+02216 <td> <span class=glyph>∖</span> <tr id=entity-Barv><td> <code>Barv;</code> <td> U+02AE7 <td> <span class=glyph>⫧</span> <tr id=entity-barvee><td> <code>barvee;</code> <td> U+022BD <td> <span class=glyph>⊽</span> <tr id=entity-Barwed><td> <code>Barwed;</code> <td> U+02306 <td> <span class=glyph>⌆</span> <tr id=entity-barwed><td> <code>barwed;</code> <td> U+02305 <td> <span class=glyph>⌅</span> <tr id=entity-barwedge><td> <code>barwedge;</code> <td> U+02305 <td> <span class=glyph>⌅</span> <tr id=entity-bbrk><td> <code>bbrk;</code> <td> U+023B5 <td> <span class=glyph>⎵</span> <tr id=entity-bbrktbrk><td> <code>bbrktbrk;</code> <td> U+023B6 <td> <span class=glyph>⎶</span> <tr id=entity-bcong><td> <code>bcong;</code> <td> U+0224C <td> <span class=glyph>≌</span> <tr id=entity-Bcy><td> <code>Bcy;</code> <td> U+00411 <td> <span class=glyph>Б</span> <tr id=entity-bcy><td> <code>bcy;</code> <td> U+00431 <td> <span class=glyph>б</span> <tr id=entity-bdquo><td> <code>bdquo;</code> <td> U+0201E <td> <span class=glyph>„</span> <tr id=entity-becaus><td> <code>becaus;</code> <td> U+02235 <td> <span class=glyph>∵</span> <tr id=entity-Because><td> <code>Because;</code> <td> U+02235 <td> <span class=glyph>∵</span> <tr id=entity-because><td> <code>because;</code> <td> U+02235 <td> <span class=glyph>∵</span> <tr id=entity-bemptyv><td> <code>bemptyv;</code> <td> U+029B0 <td> <span class=glyph>⦰</span> <tr id=entity-bepsi><td> <code>bepsi;</code> <td> U+003F6 <td> <span class=glyph>϶</span> <tr id=entity-bernou><td> <code>bernou;</code> <td> U+0212C <td> <span class=glyph>ℬ</span> <tr id=entity-Bernoullis><td> <code>Bernoullis;</code> <td> U+0212C <td> <span class=glyph>ℬ</span> <tr id=entity-Beta><td> <code>Beta;</code> <td> U+00392 <td> <span class=glyph>Β</span> <tr id=entity-beta><td> <code>beta;</code> <td> U+003B2 <td> <span class=glyph>β</span> <tr id=entity-beth><td> <code>beth;</code> <td> U+02136 <td> <span class=glyph>ℶ</span> <tr id=entity-between><td> <code>between;</code> <td> U+0226C <td> <span class=glyph>≬</span> <tr id=entity-Bfr><td> <code>Bfr;</code> <td> U+1D505 <td> <span class=glyph></span> <tr id=entity-bfr><td> <code>bfr;</code> <td> U+1D51F <td> <span class=glyph></span> <tr id=entity-bigcap><td> <code>bigcap;</code> <td> U+022C2 <td> <span class=glyph>⋂</span> <tr id=entity-bigcirc><td> <code>bigcirc;</code> <td> U+025EF <td> <span class=glyph>◯</span> <tr id=entity-bigcup><td> <code>bigcup;</code> <td> U+022C3 <td> <span class=glyph>⋃</span> <tr id=entity-bigodot><td> <code>bigodot;</code> <td> U+02A00 <td> <span class=glyph>⨀</span> <tr id=entity-bigoplus><td> <code>bigoplus;</code> <td> U+02A01 <td> <span class=glyph>⨁</span> <tr id=entity-bigotimes><td> <code>bigotimes;</code> <td> U+02A02 <td> <span class=glyph>⨂</span> <tr id=entity-bigsqcup><td> <code>bigsqcup;</code> <td> U+02A06 <td> <span class=glyph>⨆</span> <tr id=entity-bigstar><td> <code>bigstar;</code> <td> U+02605 <td> <span class=glyph>★</span> <tr id=entity-bigtriangledown><td> <code>bigtriangledown;</code> <td> U+025BD <td> <span class=glyph>▽</span> <tr id=entity-bigtriangleup><td> <code>bigtriangleup;</code> <td> U+025B3 <td> <span class=glyph>△</span> <tr id=entity-biguplus><td> <code>biguplus;</code> <td> U+02A04 <td> <span class=glyph>⨄</span> <tr id=entity-bigvee><td> <code>bigvee;</code> <td> U+022C1 <td> <span class=glyph>⋁</span> <tr id=entity-bigwedge><td> <code>bigwedge;</code> <td> U+022C0 <td> <span class=glyph>⋀</span> <tr id=entity-bkarow><td> <code>bkarow;</code> <td> U+0290D <td> <span class=glyph>⤍</span> <tr id=entity-blacklozenge><td> <code>blacklozenge;</code> <td> U+029EB <td> <span class=glyph>⧫</span> <tr id=entity-blacksquare><td> <code>blacksquare;</code> <td> U+025AA <td> <span class=glyph>▪</span> <tr id=entity-blacktriangle><td> <code>blacktriangle;</code> <td> U+025B4 <td> <span class=glyph>▴</span> <tr id=entity-blacktriangledown><td> <code>blacktriangledown;</code> <td> U+025BE <td> <span class=glyph>▾</span> <tr id=entity-blacktriangleleft><td> <code>blacktriangleleft;</code> <td> U+025C2 <td> <span class=glyph>◂</span> <tr id=entity-blacktriangleright><td> <code>blacktriangleright;</code> <td> U+025B8 <td> <span class=glyph>▸</span> <tr id=entity-blank><td> <code>blank;</code> <td> U+02423 <td> <span class=glyph>␣</span> <tr id=entity-blk12><td> <code>blk12;</code> <td> U+02592 <td> <span class=glyph>▒</span> <tr id=entity-blk14><td> <code>blk14;</code> <td> U+02591 <td> <span class=glyph>░</span> <tr id=entity-blk34><td> <code>blk34;</code> <td> U+02593 <td> <span class=glyph>▓</span> <tr id=entity-block><td> <code>block;</code> <td> U+02588 <td> <span class=glyph>█</span> <tr id=entity-bne><td> <code>bne;</code> <td> U+0003D U+020E5 <td> <span class="glyph compound">=⃥</span> <tr id=entity-bnequiv><td> <code>bnequiv;</code> <td> U+02261 U+020E5 <td> <span class="glyph compound">≡⃥</span> <tr id=entity-bNot><td> <code>bNot;</code> <td> U+02AED <td> <span class=glyph>⫭</span> <tr id=entity-bnot><td> <code>bnot;</code> <td> U+02310 <td> <span class=glyph>⌐</span> <tr id=entity-Bopf><td> <code>Bopf;</code> <td> U+1D539 <td> <span class=glyph></span> <tr id=entity-bopf><td> <code>bopf;</code> <td> U+1D553 <td> <span class=glyph></span> <tr id=entity-bot><td> <code>bot;</code> <td> U+022A5 <td> <span class=glyph>⊥</span> <tr id=entity-bottom><td> <code>bottom;</code> <td> U+022A5 <td> <span class=glyph>⊥</span> <tr id=entity-bowtie><td> <code>bowtie;</code> <td> U+022C8 <td> <span class=glyph>⋈</span> <tr id=entity-boxbox><td> <code>boxbox;</code> <td> U+029C9 <td> <span class=glyph>⧉</span> <tr id=entity-boxDL><td> <code>boxDL;</code> <td> U+02557 <td> <span class=glyph>╗</span> <tr id=entity-boxDl><td> <code>boxDl;</code> <td> U+02556 <td> <span class=glyph>╖</span> <tr id=entity-boxdL><td> <code>boxdL;</code> <td> U+02555 <td> <span class=glyph>╕</span> <tr id=entity-boxdl><td> <code>boxdl;</code> <td> U+02510 <td> <span class=glyph>┐</span> <tr id=entity-boxDR><td> <code>boxDR;</code> <td> U+02554 <td> <span class=glyph>╔</span> <tr id=entity-boxDr><td> <code>boxDr;</code> <td> U+02553 <td> <span class=glyph>╓</span> <tr id=entity-boxdR><td> <code>boxdR;</code> <td> U+02552 <td> <span class=glyph>╒</span> <tr id=entity-boxdr><td> <code>boxdr;</code> <td> U+0250C <td> <span class=glyph>┌</span> <tr id=entity-boxH><td> <code>boxH;</code> <td> U+02550 <td> <span class=glyph>═</span> <tr id=entity-boxh><td> <code>boxh;</code> <td> U+02500 <td> <span class=glyph>─</span> <tr id=entity-boxHD><td> <code>boxHD;</code> <td> U+02566 <td> <span class=glyph>╦</span> <tr id=entity-boxHd><td> <code>boxHd;</code> <td> U+02564 <td> <span class=glyph>╤</span> <tr id=entity-boxhD><td> <code>boxhD;</code> <td> U+02565 <td> <span class=glyph>╥</span> <tr id=entity-boxhd><td> <code>boxhd;</code> <td> U+0252C <td> <span class=glyph>┬</span> <tr id=entity-boxHU><td> <code>boxHU;</code> <td> U+02569 <td> <span class=glyph>╩</span> <tr id=entity-boxHu><td> <code>boxHu;</code> <td> U+02567 <td> <span class=glyph>╧</span> <tr id=entity-boxhU><td> <code>boxhU;</code> <td> U+02568 <td> <span class=glyph>╨</span> <tr id=entity-boxhu><td> <code>boxhu;</code> <td> U+02534 <td> <span class=glyph>┴</span> <tr id=entity-boxminus><td> <code>boxminus;</code> <td> U+0229F <td> <span class=glyph>⊟</span> <tr id=entity-boxplus><td> <code>boxplus;</code> <td> U+0229E <td> <span class=glyph>⊞</span> <tr id=entity-boxtimes><td> <code>boxtimes;</code> <td> U+022A0 <td> <span class=glyph>⊠</span> <tr id=entity-boxUL><td> <code>boxUL;</code> <td> U+0255D <td> <span class=glyph>╝</span> <tr id=entity-boxUl><td> <code>boxUl;</code> <td> U+0255C <td> <span class=glyph>╜</span> <tr id=entity-boxuL><td> <code>boxuL;</code> <td> U+0255B <td> <span class=glyph>╛</span> <tr id=entity-boxul><td> <code>boxul;</code> <td> U+02518 <td> <span class=glyph>┘</span> <tr id=entity-boxUR><td> <code>boxUR;</code> <td> U+0255A <td> <span class=glyph>╚</span> <tr id=entity-boxUr><td> <code>boxUr;</code> <td> U+02559 <td> <span class=glyph>╙</span> <tr id=entity-boxuR><td> <code>boxuR;</code> <td> U+02558 <td> <span class=glyph>╘</span> <tr id=entity-boxur><td> <code>boxur;</code> <td> U+02514 <td> <span class=glyph>└</span> <tr id=entity-boxV><td> <code>boxV;</code> <td> U+02551 <td> <span class=glyph>║</span> <tr id=entity-boxv><td> <code>boxv;</code> <td> U+02502 <td> <span class=glyph>│</span> <tr id=entity-boxVH><td> <code>boxVH;</code> <td> U+0256C <td> <span class=glyph>╬</span> <tr id=entity-boxVh><td> <code>boxVh;</code> <td> U+0256B <td> <span class=glyph>╫</span> <tr id=entity-boxvH><td> <code>boxvH;</code> <td> U+0256A <td> <span class=glyph>╪</span> <tr id=entity-boxvh><td> <code>boxvh;</code> <td> U+0253C <td> <span class=glyph>┼</span> <tr id=entity-boxVL><td> <code>boxVL;</code> <td> U+02563 <td> <span class=glyph>╣</span> <tr id=entity-boxVl><td> <code>boxVl;</code> <td> U+02562 <td> <span class=glyph>╢</span> <tr id=entity-boxvL><td> <code>boxvL;</code> <td> U+02561 <td> <span class=glyph>╡</span> <tr id=entity-boxvl><td> <code>boxvl;</code> <td> U+02524 <td> <span class=glyph>┤</span> <tr id=entity-boxVR><td> <code>boxVR;</code> <td> U+02560 <td> <span class=glyph>╠</span> <tr id=entity-boxVr><td> <code>boxVr;</code> <td> U+0255F <td> <span class=glyph>╟</span> <tr id=entity-boxvR><td> <code>boxvR;</code> <td> U+0255E <td> <span class=glyph>╞</span> <tr id=entity-boxvr><td> <code>boxvr;</code> <td> U+0251C <td> <span class=glyph>├</span> <tr id=entity-bprime><td> <code>bprime;</code> <td> U+02035 <td> <span class=glyph>‵</span> <tr id=entity-Breve><td> <code>Breve;</code> <td> U+002D8 <td> <span class=glyph>˘</span> <tr id=entity-breve><td> <code>breve;</code> <td> U+002D8 <td> <span class=glyph>˘</span> <tr id=entity-brvbar><td> <code>brvbar;</code> <td> U+000A6 <td> <span class=glyph>¦</span> <tr id=entity-brvbar-legacy class=impl><td> <code>brvbar</code> <td> U+000A6 <td> <span>¦</span> <tr id=entity-Bscr><td> <code>Bscr;</code> <td> U+0212C <td> <span class=glyph>ℬ</span> <tr id=entity-bscr><td> <code>bscr;</code> <td> U+1D4B7 <td> <span class=glyph></span> <tr id=entity-bsemi><td> <code>bsemi;</code> <td> U+0204F <td> <span class=glyph>⁏</span> <tr id=entity-bsim><td> <code>bsim;</code> <td> U+0223D <td> <span class=glyph>∽</span> <tr id=entity-bsime><td> <code>bsime;</code> <td> U+022CD <td> <span class=glyph>⋍</span> <tr id=entity-bsol><td> <code>bsol;</code> <td> U+0005C <td> <span class=glyph>\</span> <tr id=entity-bsolb><td> <code>bsolb;</code> <td> U+029C5 <td> <span class=glyph>⧅</span> <tr id=entity-bsolhsub><td> <code>bsolhsub;</code> <td> U+027C8 <td> <span class=glyph>⟈</span> <tr id=entity-bull><td> <code>bull;</code> <td> U+02022 <td> <span class=glyph>•</span> <tr id=entity-bullet><td> <code>bullet;</code> <td> U+02022 <td> <span class=glyph>•</span> <tr id=entity-bump><td> <code>bump;</code> <td> U+0224E <td> <span class=glyph>≎</span> <tr id=entity-bumpE><td> <code>bumpE;</code> <td> U+02AAE <td> <span class=glyph>⪮</span> <tr id=entity-bumpe><td> <code>bumpe;</code> <td> U+0224F <td> <span class=glyph>≏</span> <tr id=entity-Bumpeq><td> <code>Bumpeq;</code> <td> U+0224E <td> <span class=glyph>≎</span> <tr id=entity-bumpeq><td> <code>bumpeq;</code> <td> U+0224F <td> <span class=glyph>≏</span> <tr id=entity-Cacute><td> <code>Cacute;</code> <td> U+00106 <td> <span class=glyph>Ć</span> <tr id=entity-cacute><td> <code>cacute;</code> <td> U+00107 <td> <span class=glyph>ć</span> <tr id=entity-Cap><td> <code>Cap;</code> <td> U+022D2 <td> <span class=glyph>⋒</span> <tr id=entity-cap><td> <code>cap;</code> <td> U+02229 <td> <span class=glyph>∩</span> <tr id=entity-capand><td> <code>capand;</code> <td> U+02A44 <td> <span class=glyph>⩄</span> <tr id=entity-capbrcup><td> <code>capbrcup;</code> <td> U+02A49 <td> <span class=glyph>⩉</span> <tr id=entity-capcap><td> <code>capcap;</code> <td> U+02A4B <td> <span class=glyph>⩋</span> <tr id=entity-capcup><td> <code>capcup;</code> <td> U+02A47 <td> <span class=glyph>⩇</span> <tr id=entity-capdot><td> <code>capdot;</code> <td> U+02A40 <td> <span class=glyph>⩀</span> <tr id=entity-CapitalDifferentialD><td> <code>CapitalDifferentialD;</code> <td> U+02145 <td> <span class=glyph>ⅅ</span> <tr id=entity-caps><td> <code>caps;</code> <td> U+02229 U+0FE00 <td> <span class="glyph compound">∩︀</span> <tr id=entity-caret><td> <code>caret;</code> <td> U+02041 <td> <span class=glyph>⁁</span> <tr id=entity-caron><td> <code>caron;</code> <td> U+002C7 <td> <span class=glyph>ˇ</span> <tr id=entity-Cayleys><td> <code>Cayleys;</code> <td> U+0212D <td> <span class=glyph>ℭ</span> <tr id=entity-ccaps><td> <code>ccaps;</code> <td> U+02A4D <td> <span class=glyph>⩍</span> <tr id=entity-Ccaron><td> <code>Ccaron;</code> <td> U+0010C <td> <span class=glyph>Č</span> <tr id=entity-ccaron><td> <code>ccaron;</code> <td> U+0010D <td> <span class=glyph>č</span> <tr id=entity-Ccedil><td> <code>Ccedil;</code> <td> U+000C7 <td> <span class=glyph>Ç</span> <tr id=entity-Ccedil-legacy class=impl><td> <code>Ccedil</code> <td> U+000C7 <td> <span>Ç</span> <tr id=entity-ccedil><td> <code>ccedil;</code> <td> U+000E7 <td> <span class=glyph>ç</span> <tr id=entity-ccedil-legacy class=impl><td> <code>ccedil</code> <td> U+000E7 <td> <span>ç</span> <tr id=entity-Ccirc><td> <code>Ccirc;</code> <td> U+00108 <td> <span class=glyph>Ĉ</span> <tr id=entity-ccirc><td> <code>ccirc;</code> <td> U+00109 <td> <span class=glyph>ĉ</span> <tr id=entity-Cconint><td> <code>Cconint;</code> <td> U+02230 <td> <span class=glyph>∰</span> <tr id=entity-ccups><td> <code>ccups;</code> <td> U+02A4C <td> <span class=glyph>⩌</span> <tr id=entity-ccupssm><td> <code>ccupssm;</code> <td> U+02A50 <td> <span class=glyph>⩐</span> <tr id=entity-Cdot><td> <code>Cdot;</code> <td> U+0010A <td> <span class=glyph>Ċ</span> <tr id=entity-cdot><td> <code>cdot;</code> <td> U+0010B <td> <span class=glyph>ċ</span> <tr id=entity-cedil><td> <code>cedil;</code> <td> U+000B8 <td> <span class=glyph>¸</span> <tr id=entity-cedil-legacy class=impl><td> <code>cedil</code> <td> U+000B8 <td> <span>¸</span> <tr id=entity-Cedilla><td> <code>Cedilla;</code> <td> U+000B8 <td> <span class=glyph>¸</span> <tr id=entity-cemptyv><td> <code>cemptyv;</code> <td> U+029B2 <td> <span class=glyph>⦲</span> <tr id=entity-cent><td> <code>cent;</code> <td> U+000A2 <td> <span class=glyph>¢</span> <tr id=entity-cent-legacy class=impl><td> <code>cent</code> <td> U+000A2 <td> <span>¢</span> <tr id=entity-CenterDot><td> <code>CenterDot;</code> <td> U+000B7 <td> <span class=glyph>·</span> <tr id=entity-centerdot><td> <code>centerdot;</code> <td> U+000B7 <td> <span class=glyph>·</span> <tr id=entity-Cfr><td> <code>Cfr;</code> <td> U+0212D <td> <span class=glyph>ℭ</span> <tr id=entity-cfr><td> <code>cfr;</code> <td> U+1D520 <td> <span class=glyph></span> <tr id=entity-CHcy><td> <code>CHcy;</code> <td> U+00427 <td> <span class=glyph>Ч</span> <tr id=entity-chcy><td> <code>chcy;</code> <td> U+00447 <td> <span class=glyph>ч</span> <tr id=entity-check><td> <code>check;</code> <td> U+02713 <td> <span class=glyph>✓</span> <tr id=entity-checkmark><td> <code>checkmark;</code> <td> U+02713 <td> <span class=glyph>✓</span> <tr id=entity-Chi><td> <code>Chi;</code> <td> U+003A7 <td> <span class=glyph>Χ</span> <tr id=entity-chi><td> <code>chi;</code> <td> U+003C7 <td> <span class=glyph>χ</span> <tr id=entity-cir><td> <code>cir;</code> <td> U+025CB <td> <span class=glyph>○</span> <tr id=entity-circ><td> <code>circ;</code> <td> U+002C6 <td> <span class=glyph>ˆ</span> <tr id=entity-circeq><td> <code>circeq;</code> <td> U+02257 <td> <span class=glyph>≗</span> <tr id=entity-circlearrowleft><td> <code>circlearrowleft;</code> <td> U+021BA <td> <span class=glyph>↺</span> <tr id=entity-circlearrowright><td> <code>circlearrowright;</code> <td> U+021BB <td> <span class=glyph>↻</span> <tr id=entity-circledast><td> <code>circledast;</code> <td> U+0229B <td> <span class=glyph>⊛</span> <tr id=entity-circledcirc><td> <code>circledcirc;</code> <td> U+0229A <td> <span class=glyph>⊚</span> <tr id=entity-circleddash><td> <code>circleddash;</code> <td> U+0229D <td> <span class=glyph>⊝</span> <tr id=entity-CircleDot><td> <code>CircleDot;</code> <td> U+02299 <td> <span class=glyph>⊙</span> <tr id=entity-circledR><td> <code>circledR;</code> <td> U+000AE <td> <span class=glyph>®</span> <tr id=entity-circledS><td> <code>circledS;</code> <td> U+024C8 <td> <span class=glyph>Ⓢ</span> <tr id=entity-CircleMinus><td> <code>CircleMinus;</code> <td> U+02296 <td> <span class=glyph>⊖</span> <tr id=entity-CirclePlus><td> <code>CirclePlus;</code> <td> U+02295 <td> <span class=glyph>⊕</span> <tr id=entity-CircleTimes><td> <code>CircleTimes;</code> <td> U+02297 <td> <span class=glyph>⊗</span> <tr id=entity-cirE><td> <code>cirE;</code> <td> U+029C3 <td> <span class=glyph>⧃</span> <tr id=entity-cire><td> <code>cire;</code> <td> U+02257 <td> <span class=glyph>≗</span> <tr id=entity-cirfnint><td> <code>cirfnint;</code> <td> U+02A10 <td> <span class=glyph>⨐</span> <tr id=entity-cirmid><td> <code>cirmid;</code> <td> U+02AEF <td> <span class=glyph>⫯</span> <tr id=entity-cirscir><td> <code>cirscir;</code> <td> U+029C2 <td> <span class=glyph>⧂</span> <tr id=entity-ClockwiseContourIntegral><td> <code>ClockwiseContourIntegral;</code> <td> U+02232 <td> <span class=glyph>∲</span> <tr id=entity-CloseCurlyDoubleQuote><td> <code>CloseCurlyDoubleQuote;</code> <td> U+0201D <td> <span class=glyph>”</span> <tr id=entity-CloseCurlyQuote><td> <code>CloseCurlyQuote;</code> <td> U+02019 <td> <span class=glyph>’</span> <tr id=entity-clubs><td> <code>clubs;</code> <td> U+02663 <td> <span class=glyph>♣</span> <tr id=entity-clubsuit><td> <code>clubsuit;</code> <td> U+02663 <td> <span class=glyph>♣</span> <tr id=entity-Colon><td> <code>Colon;</code> <td> U+02237 <td> <span class=glyph>∷</span> <tr id=entity-colon><td> <code>colon;</code> <td> U+0003A <td> <span class=glyph>:</span> <tr id=entity-Colone><td> <code>Colone;</code> <td> U+02A74 <td> <span class=glyph>⩴</span> <tr id=entity-colone><td> <code>colone;</code> <td> U+02254 <td> <span class=glyph>≔</span> <tr id=entity-coloneq><td> <code>coloneq;</code> <td> U+02254 <td> <span class=glyph>≔</span> <tr id=entity-comma><td> <code>comma;</code> <td> U+0002C <td> <span class=glyph>,</span> <tr id=entity-commat><td> <code>commat;</code> <td> U+00040 <td> <span class=glyph>@</span> <tr id=entity-comp><td> <code>comp;</code> <td> U+02201 <td> <span class=glyph>∁</span> <tr id=entity-compfn><td> <code>compfn;</code> <td> U+02218 <td> <span class=glyph>∘</span> <tr id=entity-complement><td> <code>complement;</code> <td> U+02201 <td> <span class=glyph>∁</span> <tr id=entity-complexes><td> <code>complexes;</code> <td> U+02102 <td> <span class=glyph>ℂ</span> <tr id=entity-cong><td> <code>cong;</code> <td> U+02245 <td> <span class=glyph>≅</span> <tr id=entity-congdot><td> <code>congdot;</code> <td> U+02A6D <td> <span class=glyph>⩭</span> <tr id=entity-Congruent><td> <code>Congruent;</code> <td> U+02261 <td> <span class=glyph>≡</span> <tr id=entity-Conint><td> <code>Conint;</code> <td> U+0222F <td> <span class=glyph>∯</span> <tr id=entity-conint><td> <code>conint;</code> <td> U+0222E <td> <span class=glyph>∮</span> <tr id=entity-ContourIntegral><td> <code>ContourIntegral;</code> <td> U+0222E <td> <span class=glyph>∮</span> <tr id=entity-Copf><td> <code>Copf;</code> <td> U+02102 <td> <span class=glyph>ℂ</span> <tr id=entity-copf><td> <code>copf;</code> <td> U+1D554 <td> <span class=glyph></span> <tr id=entity-coprod><td> <code>coprod;</code> <td> U+02210 <td> <span class=glyph>∐</span> <tr id=entity-Coproduct><td> <code>Coproduct;</code> <td> U+02210 <td> <span class=glyph>∐</span> <tr id=entity-COPY><td> <code>COPY;</code> <td> U+000A9 <td> <span class=glyph>©</span> <tr id=entity-COPY-legacy class=impl><td> <code>COPY</code> <td> U+000A9 <td> <span>©</span> <tr id=entity-copy><td> <code>copy;</code> <td> U+000A9 <td> <span class=glyph>©</span> <tr id=entity-copy-legacy class=impl><td> <code>copy</code> <td> U+000A9 <td> <span>©</span> <tr id=entity-copysr><td> <code>copysr;</code> <td> U+02117 <td> <span class=glyph>℗</span> <tr id=entity-CounterClockwiseContourIntegral><td> <code>CounterClockwiseContourIntegral;</code> <td> U+02233 <td> <span class=glyph>∳</span> <tr id=entity-crarr><td> <code>crarr;</code> <td> U+021B5 <td> <span class=glyph>↵</span> <tr id=entity-Cross><td> <code>Cross;</code> <td> U+02A2F <td> <span class=glyph>⨯</span> <tr id=entity-cross><td> <code>cross;</code> <td> U+02717 <td> <span class=glyph>✗</span> <tr id=entity-Cscr><td> <code>Cscr;</code> <td> U+1D49E <td> <span class=glyph></span> <tr id=entity-cscr><td> <code>cscr;</code> <td> U+1D4B8 <td> <span class=glyph></span> <tr id=entity-csub><td> <code>csub;</code> <td> U+02ACF <td> <span class=glyph>⫏</span> <tr id=entity-csube><td> <code>csube;</code> <td> U+02AD1 <td> <span class=glyph>⫑</span> <tr id=entity-csup><td> <code>csup;</code> <td> U+02AD0 <td> <span class=glyph>⫐</span> <tr id=entity-csupe><td> <code>csupe;</code> <td> U+02AD2 <td> <span class=glyph>⫒</span> <tr id=entity-ctdot><td> <code>ctdot;</code> <td> U+022EF <td> <span class=glyph>⋯</span> <tr id=entity-cudarrl><td> <code>cudarrl;</code> <td> U+02938 <td> <span class=glyph>⤸</span> <tr id=entity-cudarrr><td> <code>cudarrr;</code> <td> U+02935 <td> <span class=glyph>⤵</span> <tr id=entity-cuepr><td> <code>cuepr;</code> <td> U+022DE <td> <span class=glyph>⋞</span> <tr id=entity-cuesc><td> <code>cuesc;</code> <td> U+022DF <td> <span class=glyph>⋟</span> <tr id=entity-cularr><td> <code>cularr;</code> <td> U+021B6 <td> <span class=glyph>↶</span> <tr id=entity-cularrp><td> <code>cularrp;</code> <td> U+0293D <td> <span class=glyph>⤽</span> <tr id=entity-Cup><td> <code>Cup;</code> <td> U+022D3 <td> <span class=glyph>⋓</span> <tr id=entity-cup><td> <code>cup;</code> <td> U+0222A <td> <span class=glyph>∪</span> <tr id=entity-cupbrcap><td> <code>cupbrcap;</code> <td> U+02A48 <td> <span class=glyph>⩈</span> <tr id=entity-CupCap><td> <code>CupCap;</code> <td> U+0224D <td> <span class=glyph>≍</span> <tr id=entity-cupcap><td> <code>cupcap;</code> <td> U+02A46 <td> <span class=glyph>⩆</span> <tr id=entity-cupcup><td> <code>cupcup;</code> <td> U+02A4A <td> <span class=glyph>⩊</span> <tr id=entity-cupdot><td> <code>cupdot;</code> <td> U+0228D <td> <span class=glyph>⊍</span> <tr id=entity-cupor><td> <code>cupor;</code> <td> U+02A45 <td> <span class=glyph>⩅</span> <tr id=entity-cups><td> <code>cups;</code> <td> U+0222A U+0FE00 <td> <span class="glyph compound">∪︀</span> <tr id=entity-curarr><td> <code>curarr;</code> <td> U+021B7 <td> <span class=glyph>↷</span> <tr id=entity-curarrm><td> <code>curarrm;</code> <td> U+0293C <td> <span class=glyph>⤼</span> <tr id=entity-curlyeqprec><td> <code>curlyeqprec;</code> <td> U+022DE <td> <span class=glyph>⋞</span> <tr id=entity-curlyeqsucc><td> <code>curlyeqsucc;</code> <td> U+022DF <td> <span class=glyph>⋟</span> <tr id=entity-curlyvee><td> <code>curlyvee;</code> <td> U+022CE <td> <span class=glyph>⋎</span> <tr id=entity-curlywedge><td> <code>curlywedge;</code> <td> U+022CF <td> <span class=glyph>⋏</span> <tr id=entity-curren><td> <code>curren;</code> <td> U+000A4 <td> <span class=glyph>¤</span> <tr id=entity-curren-legacy class=impl><td> <code>curren</code> <td> U+000A4 <td> <span>¤</span> <tr id=entity-curvearrowleft><td> <code>curvearrowleft;</code> <td> U+021B6 <td> <span class=glyph>↶</span> <tr id=entity-curvearrowright><td> <code>curvearrowright;</code> <td> U+021B7 <td> <span class=glyph>↷</span> <tr id=entity-cuvee><td> <code>cuvee;</code> <td> U+022CE <td> <span class=glyph>⋎</span> <tr id=entity-cuwed><td> <code>cuwed;</code> <td> U+022CF <td> <span class=glyph>⋏</span> <tr id=entity-cwconint><td> <code>cwconint;</code> <td> U+02232 <td> <span class=glyph>∲</span> <tr id=entity-cwint><td> <code>cwint;</code> <td> U+02231 <td> <span class=glyph>∱</span> <tr id=entity-cylcty><td> <code>cylcty;</code> <td> U+0232D <td> <span class=glyph>⌭</span> <tr id=entity-Dagger><td> <code>Dagger;</code> <td> U+02021 <td> <span class=glyph>‡</span> <tr id=entity-dagger><td> <code>dagger;</code> <td> U+02020 <td> <span class=glyph>†</span> <tr id=entity-daleth><td> <code>daleth;</code> <td> U+02138 <td> <span class=glyph>ℸ</span> <tr id=entity-Darr><td> <code>Darr;</code> <td> U+021A1 <td> <span class=glyph>↡</span> <tr id=entity-dArr><td> <code>dArr;</code> <td> U+021D3 <td> <span class=glyph>⇓</span> <tr id=entity-darr><td> <code>darr;</code> <td> U+02193 <td> <span class=glyph>↓</span> <tr id=entity-dash><td> <code>dash;</code> <td> U+02010 <td> <span class=glyph>‐</span> <tr id=entity-Dashv><td> <code>Dashv;</code> <td> U+02AE4 <td> <span class=glyph>⫤</span> <tr id=entity-dashv><td> <code>dashv;</code> <td> U+022A3 <td> <span class=glyph>⊣</span> <tr id=entity-dbkarow><td> <code>dbkarow;</code> <td> U+0290F <td> <span class=glyph>⤏</span> <tr id=entity-dblac><td> <code>dblac;</code> <td> U+002DD <td> <span class=glyph>˝</span> <tr id=entity-Dcaron><td> <code>Dcaron;</code> <td> U+0010E <td> <span class=glyph>Ď</span> <tr id=entity-dcaron><td> <code>dcaron;</code> <td> U+0010F <td> <span class=glyph>ď</span> <tr id=entity-Dcy><td> <code>Dcy;</code> <td> U+00414 <td> <span class=glyph>Д</span> <tr id=entity-dcy><td> <code>dcy;</code> <td> U+00434 <td> <span class=glyph>д</span> <tr id=entity-DD><td> <code>DD;</code> <td> U+02145 <td> <span class=glyph>ⅅ</span> <tr id=entity-dd><td> <code>dd;</code> <td> U+02146 <td> <span class=glyph>ⅆ</span> <tr id=entity-ddagger><td> <code>ddagger;</code> <td> U+02021 <td> <span class=glyph>‡</span> <tr id=entity-ddarr><td> <code>ddarr;</code> <td> U+021CA <td> <span class=glyph>⇊</span> <tr id=entity-DDotrahd><td> <code>DDotrahd;</code> <td> U+02911 <td> <span class=glyph>⤑</span> <tr id=entity-ddotseq><td> <code>ddotseq;</code> <td> U+02A77 <td> <span class=glyph>⩷</span> <tr id=entity-deg><td> <code>deg;</code> <td> U+000B0 <td> <span class=glyph>°</span> <tr id=entity-deg-legacy class=impl><td> <code>deg</code> <td> U+000B0 <td> <span>°</span> <tr id=entity-Del><td> <code>Del;</code> <td> U+02207 <td> <span class=glyph>∇</span> <tr id=entity-Delta><td> <code>Delta;</code> <td> U+00394 <td> <span class=glyph>Δ</span> <tr id=entity-delta><td> <code>delta;</code> <td> U+003B4 <td> <span class=glyph>δ</span> <tr id=entity-demptyv><td> <code>demptyv;</code> <td> U+029B1 <td> <span class=glyph>⦱</span> <tr id=entity-dfisht><td> <code>dfisht;</code> <td> U+0297F <td> <span class=glyph>⥿</span> <tr id=entity-Dfr><td> <code>Dfr;</code> <td> U+1D507 <td> <span class=glyph></span> <tr id=entity-dfr><td> <code>dfr;</code> <td> U+1D521 <td> <span class=glyph></span> <tr id=entity-dHar><td> <code>dHar;</code> <td> U+02965 <td> <span class=glyph>⥥</span> <tr id=entity-dharl><td> <code>dharl;</code> <td> U+021C3 <td> <span class=glyph>⇃</span> <tr id=entity-dharr><td> <code>dharr;</code> <td> U+021C2 <td> <span class=glyph>⇂</span> <tr id=entity-DiacriticalAcute><td> <code>DiacriticalAcute;</code> <td> U+000B4 <td> <span class=glyph>´</span> <tr id=entity-DiacriticalDot><td> <code>DiacriticalDot;</code> <td> U+002D9 <td> <span class=glyph>˙</span> <tr id=entity-DiacriticalDoubleAcute><td> <code>DiacriticalDoubleAcute;</code> <td> U+002DD <td> <span class=glyph>˝</span> <tr id=entity-DiacriticalGrave><td> <code>DiacriticalGrave;</code> <td> U+00060 <td> <span class=glyph>`</span> <tr id=entity-DiacriticalTilde><td> <code>DiacriticalTilde;</code> <td> U+002DC <td> <span class=glyph>˜</span> <tr id=entity-diam><td> <code>diam;</code> <td> U+022C4 <td> <span class=glyph>⋄</span> <tr id=entity-Diamond><td> <code>Diamond;</code> <td> U+022C4 <td> <span class=glyph>⋄</span> <tr id=entity-diamond><td> <code>diamond;</code> <td> U+022C4 <td> <span class=glyph>⋄</span> <tr id=entity-diamondsuit><td> <code>diamondsuit;</code> <td> U+02666 <td> <span class=glyph>♦</span> <tr id=entity-diams><td> <code>diams;</code> <td> U+02666 <td> <span class=glyph>♦</span> <tr id=entity-die><td> <code>die;</code> <td> U+000A8 <td> <span class=glyph>¨</span> <tr id=entity-DifferentialD><td> <code>DifferentialD;</code> <td> U+02146 <td> <span class=glyph>ⅆ</span> <tr id=entity-digamma><td> <code>digamma;</code> <td> U+003DD <td> <span class=glyph>ϝ</span> <tr id=entity-disin><td> <code>disin;</code> <td> U+022F2 <td> <span class=glyph>⋲</span> <tr id=entity-div><td> <code>div;</code> <td> U+000F7 <td> <span class=glyph>÷</span> <tr id=entity-divide><td> <code>divide;</code> <td> U+000F7 <td> <span class=glyph>÷</span> <tr id=entity-divide-legacy class=impl><td> <code>divide</code> <td> U+000F7 <td> <span>÷</span> <tr id=entity-divideontimes><td> <code>divideontimes;</code> <td> U+022C7 <td> <span class=glyph>⋇</span> <tr id=entity-divonx><td> <code>divonx;</code> <td> U+022C7 <td> <span class=glyph>⋇</span> <tr id=entity-DJcy><td> <code>DJcy;</code> <td> U+00402 <td> <span class=glyph>Ђ</span> <tr id=entity-djcy><td> <code>djcy;</code> <td> U+00452 <td> <span class=glyph>ђ</span> <tr id=entity-dlcorn><td> <code>dlcorn;</code> <td> U+0231E <td> <span class=glyph>⌞</span> <tr id=entity-dlcrop><td> <code>dlcrop;</code> <td> U+0230D <td> <span class=glyph>⌍</span> <tr id=entity-dollar><td> <code>dollar;</code> <td> U+00024 <td> <span class=glyph>$</span> <tr id=entity-Dopf><td> <code>Dopf;</code> <td> U+1D53B <td> <span class=glyph></span> <tr id=entity-dopf><td> <code>dopf;</code> <td> U+1D555 <td> <span class=glyph></span> <tr id=entity-Dot><td> <code>Dot;</code> <td> U+000A8 <td> <span class=glyph>¨</span> <tr id=entity-dot><td> <code>dot;</code> <td> U+002D9 <td> <span class=glyph>˙</span> <tr id=entity-DotDot><td> <code>DotDot;</code> <td> U+020DC <td> <span class="glyph composition">◌⃜</span> <tr id=entity-doteq><td> <code>doteq;</code> <td> U+02250 <td> <span class=glyph>≐</span> <tr id=entity-doteqdot><td> <code>doteqdot;</code> <td> U+02251 <td> <span class=glyph>≑</span> <tr id=entity-DotEqual><td> <code>DotEqual;</code> <td> U+02250 <td> <span class=glyph>≐</span> <tr id=entity-dotminus><td> <code>dotminus;</code> <td> U+02238 <td> <span class=glyph>∸</span> <tr id=entity-dotplus><td> <code>dotplus;</code> <td> U+02214 <td> <span class=glyph>∔</span> <tr id=entity-dotsquare><td> <code>dotsquare;</code> <td> U+022A1 <td> <span class=glyph>⊡</span> <tr id=entity-doublebarwedge><td> <code>doublebarwedge;</code> <td> U+02306 <td> <span class=glyph>⌆</span> <tr id=entity-DoubleContourIntegral><td> <code>DoubleContourIntegral;</code> <td> U+0222F <td> <span class=glyph>∯</span> <tr id=entity-DoubleDot><td> <code>DoubleDot;</code> <td> U+000A8 <td> <span class=glyph>¨</span> <tr id=entity-DoubleDownArrow><td> <code>DoubleDownArrow;</code> <td> U+021D3 <td> <span class=glyph>⇓</span> <tr id=entity-DoubleLeftArrow><td> <code>DoubleLeftArrow;</code> <td> U+021D0 <td> <span class=glyph>⇐</span> <tr id=entity-DoubleLeftRightArrow><td> <code>DoubleLeftRightArrow;</code> <td> U+021D4 <td> <span class=glyph>⇔</span> <tr id=entity-DoubleLeftTee><td> <code>DoubleLeftTee;</code> <td> U+02AE4 <td> <span class=glyph>⫤</span> <tr id=entity-DoubleLongLeftArrow><td> <code>DoubleLongLeftArrow;</code> <td> U+027F8 <td> <span class=glyph>⟸</span> <tr id=entity-DoubleLongLeftRightArrow><td> <code>DoubleLongLeftRightArrow;</code> <td> U+027FA <td> <span class=glyph>⟺</span> <tr id=entity-DoubleLongRightArrow><td> <code>DoubleLongRightArrow;</code> <td> U+027F9 <td> <span class=glyph>⟹</span> <tr id=entity-DoubleRightArrow><td> <code>DoubleRightArrow;</code> <td> U+021D2 <td> <span class=glyph>⇒</span> <tr id=entity-DoubleRightTee><td> <code>DoubleRightTee;</code> <td> U+022A8 <td> <span class=glyph>⊨</span> <tr id=entity-DoubleUpArrow><td> <code>DoubleUpArrow;</code> <td> U+021D1 <td> <span class=glyph>⇑</span> <tr id=entity-DoubleUpDownArrow><td> <code>DoubleUpDownArrow;</code> <td> U+021D5 <td> <span class=glyph>⇕</span> <tr id=entity-DoubleVerticalBar><td> <code>DoubleVerticalBar;</code> <td> U+02225 <td> <span class=glyph>∥</span> <tr id=entity-DownArrow><td> <code>DownArrow;</code> <td> U+02193 <td> <span class=glyph>↓</span> <tr id=entity-Downarrow><td> <code>Downarrow;</code> <td> U+021D3 <td> <span class=glyph>⇓</span> <tr id=entity-downarrow><td> <code>downarrow;</code> <td> U+02193 <td> <span class=glyph>↓</span> <tr id=entity-DownArrowBar><td> <code>DownArrowBar;</code> <td> U+02913 <td> <span class=glyph>⤓</span> <tr id=entity-DownArrowUpArrow><td> <code>DownArrowUpArrow;</code> <td> U+021F5 <td> <span class=glyph>⇵</span> <tr id=entity-DownBreve><td> <code>DownBreve;</code> <td> U+00311 <td> <span class="glyph composition">◌̑</span> <tr id=entity-downdownarrows><td> <code>downdownarrows;</code> <td> U+021CA <td> <span class=glyph>⇊</span> <tr id=entity-downharpoonleft><td> <code>downharpoonleft;</code> <td> U+021C3 <td> <span class=glyph>⇃</span> <tr id=entity-downharpoonright><td> <code>downharpoonright;</code> <td> U+021C2 <td> <span class=glyph>⇂</span> <tr id=entity-DownLeftRightVector><td> <code>DownLeftRightVector;</code> <td> U+02950 <td> <span class=glyph>⥐</span> <tr id=entity-DownLeftTeeVector><td> <code>DownLeftTeeVector;</code> <td> U+0295E <td> <span class=glyph>⥞</span> <tr id=entity-DownLeftVector><td> <code>DownLeftVector;</code> <td> U+021BD <td> <span class=glyph>↽</span> <tr id=entity-DownLeftVectorBar><td> <code>DownLeftVectorBar;</code> <td> U+02956 <td> <span class=glyph>⥖</span> <tr id=entity-DownRightTeeVector><td> <code>DownRightTeeVector;</code> <td> U+0295F <td> <span class=glyph>⥟</span> <tr id=entity-DownRightVector><td> <code>DownRightVector;</code> <td> U+021C1 <td> <span class=glyph>⇁</span> <tr id=entity-DownRightVectorBar><td> <code>DownRightVectorBar;</code> <td> U+02957 <td> <span class=glyph>⥗</span> <tr id=entity-DownTee><td> <code>DownTee;</code> <td> U+022A4 <td> <span class=glyph>⊤</span> <tr id=entity-DownTeeArrow><td> <code>DownTeeArrow;</code> <td> U+021A7 <td> <span class=glyph>↧</span> <tr id=entity-drbkarow><td> <code>drbkarow;</code> <td> U+02910 <td> <span class=glyph>⤐</span> <tr id=entity-drcorn><td> <code>drcorn;</code> <td> U+0231F <td> <span class=glyph>⌟</span> <tr id=entity-drcrop><td> <code>drcrop;</code> <td> U+0230C <td> <span class=glyph>⌌</span> <tr id=entity-Dscr><td> <code>Dscr;</code> <td> U+1D49F <td> <span class=glyph></span> <tr id=entity-dscr><td> <code>dscr;</code> <td> U+1D4B9 <td> <span class=glyph></span> <tr id=entity-DScy><td> <code>DScy;</code> <td> U+00405 <td> <span class=glyph>Ѕ</span> <tr id=entity-dscy><td> <code>dscy;</code> <td> U+00455 <td> <span class=glyph>ѕ</span> <tr id=entity-dsol><td> <code>dsol;</code> <td> U+029F6 <td> <span class=glyph>⧶</span> <tr id=entity-Dstrok><td> <code>Dstrok;</code> <td> U+00110 <td> <span class=glyph>Đ</span> <tr id=entity-dstrok><td> <code>dstrok;</code> <td> U+00111 <td> <span class=glyph>đ</span> <tr id=entity-dtdot><td> <code>dtdot;</code> <td> U+022F1 <td> <span class=glyph>⋱</span> <tr id=entity-dtri><td> <code>dtri;</code> <td> U+025BF <td> <span class=glyph>▿</span> <tr id=entity-dtrif><td> <code>dtrif;</code> <td> U+025BE <td> <span class=glyph>▾</span> <tr id=entity-duarr><td> <code>duarr;</code> <td> U+021F5 <td> <span class=glyph>⇵</span> <tr id=entity-duhar><td> <code>duhar;</code> <td> U+0296F <td> <span class=glyph>⥯</span> <tr id=entity-dwangle><td> <code>dwangle;</code> <td> U+029A6 <td> <span class=glyph>⦦</span> <tr id=entity-DZcy><td> <code>DZcy;</code> <td> U+0040F <td> <span class=glyph>Џ</span> <tr id=entity-dzcy><td> <code>dzcy;</code> <td> U+0045F <td> <span class=glyph>џ</span> <tr id=entity-dzigrarr><td> <code>dzigrarr;</code> <td> U+027FF <td> <span class=glyph>⟿</span> <tr id=entity-Eacute><td> <code>Eacute;</code> <td> U+000C9 <td> <span class=glyph>É</span> <tr id=entity-Eacute-legacy class=impl><td> <code>Eacute</code> <td> U+000C9 <td> <span>É</span> <tr id=entity-eacute><td> <code>eacute;</code> <td> U+000E9 <td> <span class=glyph>é</span> <tr id=entity-eacute-legacy class=impl><td> <code>eacute</code> <td> U+000E9 <td> <span>é</span> <tr id=entity-easter><td> <code>easter;</code> <td> U+02A6E <td> <span class=glyph>⩮</span> <tr id=entity-Ecaron><td> <code>Ecaron;</code> <td> U+0011A <td> <span class=glyph>Ě</span> <tr id=entity-ecaron><td> <code>ecaron;</code> <td> U+0011B <td> <span class=glyph>ě</span> <tr id=entity-ecir><td> <code>ecir;</code> <td> U+02256 <td> <span class=glyph>≖</span> <tr id=entity-Ecirc><td> <code>Ecirc;</code> <td> U+000CA <td> <span class=glyph>Ê</span> <tr id=entity-Ecirc-legacy class=impl><td> <code>Ecirc</code> <td> U+000CA <td> <span>Ê</span> <tr id=entity-ecirc><td> <code>ecirc;</code> <td> U+000EA <td> <span class=glyph>ê</span> <tr id=entity-ecirc-legacy class=impl><td> <code>ecirc</code> <td> U+000EA <td> <span>ê</span> <tr id=entity-ecolon><td> <code>ecolon;</code> <td> U+02255 <td> <span class=glyph>≕</span> <tr id=entity-Ecy><td> <code>Ecy;</code> <td> U+0042D <td> <span class=glyph>Э</span> <tr id=entity-ecy><td> <code>ecy;</code> <td> U+0044D <td> <span class=glyph>э</span> <tr id=entity-eDDot><td> <code>eDDot;</code> <td> U+02A77 <td> <span class=glyph>⩷</span> <tr id=entity-Edot><td> <code>Edot;</code> <td> U+00116 <td> <span class=glyph>Ė</span> <tr id=entity-eDot><td> <code>eDot;</code> <td> U+02251 <td> <span class=glyph>≑</span> <tr id=entity-edot><td> <code>edot;</code> <td> U+00117 <td> <span class=glyph>ė</span> <tr id=entity-ee><td> <code>ee;</code> <td> U+02147 <td> <span class=glyph>ⅇ</span> <tr id=entity-efDot><td> <code>efDot;</code> <td> U+02252 <td> <span class=glyph>≒</span> <tr id=entity-Efr><td> <code>Efr;</code> <td> U+1D508 <td> <span class=glyph></span> <tr id=entity-efr><td> <code>efr;</code> <td> U+1D522 <td> <span class=glyph></span> <tr id=entity-eg><td> <code>eg;</code> <td> U+02A9A <td> <span class=glyph>⪚</span> <tr id=entity-Egrave><td> <code>Egrave;</code> <td> U+000C8 <td> <span class=glyph>È</span> <tr id=entity-Egrave-legacy class=impl><td> <code>Egrave</code> <td> U+000C8 <td> <span>È</span> <tr id=entity-egrave><td> <code>egrave;</code> <td> U+000E8 <td> <span class=glyph>è</span> <tr id=entity-egrave-legacy class=impl><td> <code>egrave</code> <td> U+000E8 <td> <span>è</span> <tr id=entity-egs><td> <code>egs;</code> <td> U+02A96 <td> <span class=glyph>⪖</span> <tr id=entity-egsdot><td> <code>egsdot;</code> <td> U+02A98 <td> <span class=glyph>⪘</span> <tr id=entity-el><td> <code>el;</code> <td> U+02A99 <td> <span class=glyph>⪙</span> <tr id=entity-Element><td> <code>Element;</code> <td> U+02208 <td> <span class=glyph>∈</span> <tr id=entity-elinters><td> <code>elinters;</code> <td> U+023E7 <td> <span class=glyph>⏧</span> <tr id=entity-ell><td> <code>ell;</code> <td> U+02113 <td> <span class=glyph>ℓ</span> <tr id=entity-els><td> <code>els;</code> <td> U+02A95 <td> <span class=glyph>⪕</span> <tr id=entity-elsdot><td> <code>elsdot;</code> <td> U+02A97 <td> <span class=glyph>⪗</span> <tr id=entity-Emacr><td> <code>Emacr;</code> <td> U+00112 <td> <span class=glyph>Ē</span> <tr id=entity-emacr><td> <code>emacr;</code> <td> U+00113 <td> <span class=glyph>ē</span> <tr id=entity-empty><td> <code>empty;</code> <td> U+02205 <td> <span class=glyph>∅</span> <tr id=entity-emptyset><td> <code>emptyset;</code> <td> U+02205 <td> <span class=glyph>∅</span> <tr id=entity-EmptySmallSquare><td> <code>EmptySmallSquare;</code> <td> U+025FB <td> <span class=glyph>◻</span> <tr id=entity-emptyv><td> <code>emptyv;</code> <td> U+02205 <td> <span class=glyph>∅</span> <tr id=entity-EmptyVerySmallSquare><td> <code>EmptyVerySmallSquare;</code> <td> U+025AB <td> <span class=glyph>▫</span> <tr id=entity-emsp><td> <code>emsp;</code> <td> U+02003 <td> <span class=glyph> </span> <tr id=entity-emsp13><td> <code>emsp13;</code> <td> U+02004 <td> <span class=glyph> </span> <tr id=entity-emsp14><td> <code>emsp14;</code> <td> U+02005 <td> <span class=glyph> </span> <tr id=entity-ENG><td> <code>ENG;</code> <td> U+0014A <td> <span class=glyph>Ŋ</span> <tr id=entity-eng><td> <code>eng;</code> <td> U+0014B <td> <span class=glyph>ŋ</span> <tr id=entity-ensp><td> <code>ensp;</code> <td> U+02002 <td> <span class=glyph> </span> <tr id=entity-Eogon><td> <code>Eogon;</code> <td> U+00118 <td> <span class=glyph>Ę</span> <tr id=entity-eogon><td> <code>eogon;</code> <td> U+00119 <td> <span class=glyph>ę</span> <tr id=entity-Eopf><td> <code>Eopf;</code> <td> U+1D53C <td> <span class=glyph></span> <tr id=entity-eopf><td> <code>eopf;</code> <td> U+1D556 <td> <span class=glyph></span> <tr id=entity-epar><td> <code>epar;</code> <td> U+022D5 <td> <span class=glyph>⋕</span> <tr id=entity-eparsl><td> <code>eparsl;</code> <td> U+029E3 <td> <span class=glyph>⧣</span> <tr id=entity-eplus><td> <code>eplus;</code> <td> U+02A71 <td> <span class=glyph>⩱</span> <tr id=entity-epsi><td> <code>epsi;</code> <td> U+003B5 <td> <span class=glyph>ε</span> <tr id=entity-Epsilon><td> <code>Epsilon;</code> <td> U+00395 <td> <span class=glyph>Ε</span> <tr id=entity-epsilon><td> <code>epsilon;</code> <td> U+003B5 <td> <span class=glyph>ε</span> <tr id=entity-epsiv><td> <code>epsiv;</code> <td> U+003F5 <td> <span class=glyph>ϵ</span> <tr id=entity-eqcirc><td> <code>eqcirc;</code> <td> U+02256 <td> <span class=glyph>≖</span> <tr id=entity-eqcolon><td> <code>eqcolon;</code> <td> U+02255 <td> <span class=glyph>≕</span> <tr id=entity-eqsim><td> <code>eqsim;</code> <td> U+02242 <td> <span class=glyph>≂</span> <tr id=entity-eqslantgtr><td> <code>eqslantgtr;</code> <td> U+02A96 <td> <span class=glyph>⪖</span> <tr id=entity-eqslantless><td> <code>eqslantless;</code> <td> U+02A95 <td> <span class=glyph>⪕</span> <tr id=entity-Equal><td> <code>Equal;</code> <td> U+02A75 <td> <span class=glyph>⩵</span> <tr id=entity-equals><td> <code>equals;</code> <td> U+0003D <td> <span class=glyph>=</span> <tr id=entity-EqualTilde><td> <code>EqualTilde;</code> <td> U+02242 <td> <span class=glyph>≂</span> <tr id=entity-equest><td> <code>equest;</code> <td> U+0225F <td> <span class=glyph>≟</span> <tr id=entity-Equilibrium><td> <code>Equilibrium;</code> <td> U+021CC <td> <span class=glyph>⇌</span> <tr id=entity-equiv><td> <code>equiv;</code> <td> U+02261 <td> <span class=glyph>≡</span> <tr id=entity-equivDD><td> <code>equivDD;</code> <td> U+02A78 <td> <span class=glyph>⩸</span> <tr id=entity-eqvparsl><td> <code>eqvparsl;</code> <td> U+029E5 <td> <span class=glyph>⧥</span> <tr id=entity-erarr><td> <code>erarr;</code> <td> U+02971 <td> <span class=glyph>⥱</span> <tr id=entity-erDot><td> <code>erDot;</code> <td> U+02253 <td> <span class=glyph>≓</span> <tr id=entity-Escr><td> <code>Escr;</code> <td> U+02130 <td> <span class=glyph>ℰ</span> <tr id=entity-escr><td> <code>escr;</code> <td> U+0212F <td> <span class=glyph>ℯ</span> <tr id=entity-esdot><td> <code>esdot;</code> <td> U+02250 <td> <span class=glyph>≐</span> <tr id=entity-Esim><td> <code>Esim;</code> <td> U+02A73 <td> <span class=glyph>⩳</span> <tr id=entity-esim><td> <code>esim;</code> <td> U+02242 <td> <span class=glyph>≂</span> <tr id=entity-Eta><td> <code>Eta;</code> <td> U+00397 <td> <span class=glyph>Η</span> <tr id=entity-eta><td> <code>eta;</code> <td> U+003B7 <td> <span class=glyph>η</span> <tr id=entity-ETH><td> <code>ETH;</code> <td> U+000D0 <td> <span class=glyph>Ð</span> <tr id=entity-ETH-legacy class=impl><td> <code>ETH</code> <td> U+000D0 <td> <span>Ð</span> <tr id=entity-eth><td> <code>eth;</code> <td> U+000F0 <td> <span class=glyph>ð</span> <tr id=entity-eth-legacy class=impl><td> <code>eth</code> <td> U+000F0 <td> <span>ð</span> <tr id=entity-Euml><td> <code>Euml;</code> <td> U+000CB <td> <span class=glyph>Ë</span> <tr id=entity-Euml-legacy class=impl><td> <code>Euml</code> <td> U+000CB <td> <span>Ë</span> <tr id=entity-euml><td> <code>euml;</code> <td> U+000EB <td> <span class=glyph>ë</span> <tr id=entity-euml-legacy class=impl><td> <code>euml</code> <td> U+000EB <td> <span>ë</span> <tr id=entity-euro><td> <code>euro;</code> <td> U+020AC <td> <span class=glyph>€</span> <tr id=entity-excl><td> <code>excl;</code> <td> U+00021 <td> <span class=glyph>!</span> <tr id=entity-exist><td> <code>exist;</code> <td> U+02203 <td> <span class=glyph>∃</span> <tr id=entity-Exists><td> <code>Exists;</code> <td> U+02203 <td> <span class=glyph>∃</span> <tr id=entity-expectation><td> <code>expectation;</code> <td> U+02130 <td> <span class=glyph>ℰ</span> <tr id=entity-ExponentialE><td> <code>ExponentialE;</code> <td> U+02147 <td> <span class=glyph>ⅇ</span> <tr id=entity-exponentiale><td> <code>exponentiale;</code> <td> U+02147 <td> <span class=glyph>ⅇ</span> <tr id=entity-fallingdotseq><td> <code>fallingdotseq;</code> <td> U+02252 <td> <span class=glyph>≒</span> <tr id=entity-Fcy><td> <code>Fcy;</code> <td> U+00424 <td> <span class=glyph>Ф</span> <tr id=entity-fcy><td> <code>fcy;</code> <td> U+00444 <td> <span class=glyph>ф</span> <tr id=entity-female><td> <code>female;</code> <td> U+02640 <td> <span class=glyph>♀</span> <tr id=entity-ffilig><td> <code>ffilig;</code> <td> U+0FB03 <td> <span class=glyph>ffi</span> <tr id=entity-fflig><td> <code>fflig;</code> <td> U+0FB00 <td> <span class=glyph>ff</span> <tr id=entity-ffllig><td> <code>ffllig;</code> <td> U+0FB04 <td> <span class=glyph>ffl</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>fi</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>fl</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><</span> <tr id=entity-LT-legacy class=impl><td> <code>LT</code> <td> U+0003C <td> <span><</span> <tr id=entity-Lt><td> <code>Lt;</code> <td> U+0226A <td> <span class=glyph>≪</span> <tr id=entity-lt><td> <code>lt;</code> <td> U+0003C <td> <span class=glyph><</span> <tr id=entity-lt-legacy class=impl><td> <code>lt</code> <td> U+0003C <td> <span><</span> <tr id=entity-ltcc><td> <code>ltcc;</code> <td> U+02AA6 <td> <span class=glyph>⪦</span> <tr id=entity-ltcir><td> <code>ltcir;</code> <td> U+02A79 <td> <span class=glyph>⩹</span> <tr id=entity-ltdot><td> <code>ltdot;</code> <td> U+022D6 <td> <span class=glyph>⋖</span> <tr id=entity-lthree><td> <code>lthree;</code> <td> U+022CB <td> <span class=glyph>⋋</span> <tr id=entity-ltimes><td> <code>ltimes;</code> <td> U+022C9 <td> <span class=glyph>⋉</span> <tr id=entity-ltlarr><td> <code>ltlarr;</code> <td> U+02976 <td> <span class=glyph>⥶</span> <tr id=entity-ltquest><td> <code>ltquest;</code> <td> U+02A7B <td> <span class=glyph>⩻</span> <tr id=entity-ltri><td> <code>ltri;</code> <td> U+025C3 <td> <span class=glyph>◃</span> <tr id=entity-ltrie><td> <code>ltrie;</code> <td> U+022B4 <td> <span class=glyph>⊴</span> <tr id=entity-ltrif><td> <code>ltrif;</code> <td> U+025C2 <td> <span class=glyph>◂</span> <tr id=entity-ltrPar><td> <code>ltrPar;</code> <td> U+02996 <td> <span class=glyph>⦖</span> <tr id=entity-lurdshar><td> <code>lurdshar;</code> <td> U+0294A <td> <span class=glyph>⥊</span> <tr id=entity-luruhar><td> <code>luruhar;</code> <td> U+02966 <td> <span class=glyph>⥦</span> <tr id=entity-lvertneqq><td> <code>lvertneqq;</code> <td> U+02268 U+0FE00 <td> <span class="glyph compound">≨︀</span> <tr id=entity-lvnE><td> <code>lvnE;</code> <td> U+02268 U+0FE00 <td> <span class="glyph compound">≨︀</span> <tr id=entity-macr><td> <code>macr;</code> <td> U+000AF <td> <span class=glyph>¯</span> <tr id=entity-macr-legacy class=impl><td> <code>macr</code> <td> U+000AF <td> <span>¯</span> <tr id=entity-male><td> <code>male;</code> <td> U+02642 <td> <span class=glyph>♂</span> <tr id=entity-malt><td> <code>malt;</code> <td> U+02720 <td> <span class=glyph>✠</span> <tr id=entity-maltese><td> <code>maltese;</code> <td> U+02720 <td> <span class=glyph>✠</span> <tr id=entity-Map><td> <code>Map;</code> <td> U+02905 <td> <span class=glyph>⤅</span> <tr id=entity-map><td> <code>map;</code> <td> U+021A6 <td> <span class=glyph>↦</span> <tr id=entity-mapsto><td> <code>mapsto;</code> <td> U+021A6 <td> <span class=glyph>↦</span> <tr id=entity-mapstodown><td> <code>mapstodown;</code> <td> U+021A7 <td> <span class=glyph>↧</span> <tr id=entity-mapstoleft><td> <code>mapstoleft;</code> <td> U+021A4 <td> <span class=glyph>↤</span> <tr id=entity-mapstoup><td> <code>mapstoup;</code> <td> U+021A5 <td> <span class=glyph>↥</span> <tr id=entity-marker><td> <code>marker;</code> <td> U+025AE <td> <span class=glyph>▮</span> <tr id=entity-mcomma><td> <code>mcomma;</code> <td> U+02A29 <td> <span class=glyph>⨩</span> <tr id=entity-Mcy><td> <code>Mcy;</code> <td> U+0041C <td> <span class=glyph>М</span> <tr id=entity-mcy><td> <code>mcy;</code> <td> U+0043C <td> <span class=glyph>м</span> <tr id=entity-mdash><td> <code>mdash;</code> <td> U+02014 <td> <span class=glyph>—</span> <tr id=entity-mDDot><td> <code>mDDot;</code> <td> U+0223A <td> <span class=glyph>∺</span> <tr id=entity-measuredangle><td> <code>measuredangle;</code> <td> U+02221 <td> <span class=glyph>∡</span> <tr id=entity-MediumSpace><td> <code>MediumSpace;</code> <td> U+0205F <td> <span class=glyph> </span> <tr id=entity-Mellintrf><td> <code>Mellintrf;</code> <td> U+02133 <td> <span class=glyph>ℳ</span> <tr id=entity-Mfr><td> <code>Mfr;</code> <td> U+1D510 <td> <span class=glyph></span> <tr id=entity-mfr><td> <code>mfr;</code> <td> U+1D52A <td> <span class=glyph></span> <tr id=entity-mho><td> <code>mho;</code> <td> U+02127 <td> <span class=glyph>℧</span> <tr id=entity-micro><td> <code>micro;</code> <td> U+000B5 <td> <span class=glyph>µ</span> <tr id=entity-micro-legacy class=impl><td> <code>micro</code> <td> U+000B5 <td> <span>µ</span> <tr id=entity-mid><td> <code>mid;</code> <td> U+02223 <td> <span class=glyph>∣</span> <tr id=entity-midast><td> <code>midast;</code> <td> U+0002A <td> <span class=glyph>*</span> <tr id=entity-midcir><td> <code>midcir;</code> <td> U+02AF0 <td> <span class=glyph>⫰</span> <tr id=entity-middot><td> <code>middot;</code> <td> U+000B7 <td> <span class=glyph>·</span> <tr id=entity-middot-legacy class=impl><td> <code>middot</code> <td> U+000B7 <td> <span>·</span> <tr id=entity-minus><td> <code>minus;</code> <td> U+02212 <td> <span class=glyph>−</span> <tr id=entity-minusb><td> <code>minusb;</code> <td> U+0229F <td> <span class=glyph>⊟</span> <tr id=entity-minusd><td> <code>minusd;</code> <td> U+02238 <td> <span class=glyph>∸</span> <tr id=entity-minusdu><td> <code>minusdu;</code> <td> U+02A2A <td> <span class=glyph>⨪</span> <tr id=entity-MinusPlus><td> <code>MinusPlus;</code> <td> U+02213 <td> <span class=glyph>∓</span> <tr id=entity-mlcp><td> <code>mlcp;</code> <td> U+02ADB <td> <span class=glyph>⫛</span> <tr id=entity-mldr><td> <code>mldr;</code> <td> U+02026 <td> <span class=glyph>…</span> <tr id=entity-mnplus><td> <code>mnplus;</code> <td> U+02213 <td> <span class=glyph>∓</span> <tr id=entity-models><td> <code>models;</code> <td> U+022A7 <td> <span class=glyph>⊧</span> <tr id=entity-Mopf><td> <code>Mopf;</code> <td> U+1D544 <td> <span class=glyph></span> <tr id=entity-mopf><td> <code>mopf;</code> <td> U+1D55E <td> <span class=glyph></span> <tr id=entity-mp><td> <code>mp;</code> <td> U+02213 <td> <span class=glyph>∓</span> <tr id=entity-Mscr><td> <code>Mscr;</code> <td> U+02133 <td> <span class=glyph>ℳ</span> <tr id=entity-mscr><td> <code>mscr;</code> <td> U+1D4C2 <td> <span class=glyph></span> <tr id=entity-mstpos><td> <code>mstpos;</code> <td> U+0223E <td> <span class=glyph>∾</span> <tr id=entity-Mu><td> <code>Mu;</code> <td> U+0039C <td> <span class=glyph>Μ</span> <tr id=entity-mu><td> <code>mu;</code> <td> U+003BC <td> <span class=glyph>μ</span> <tr id=entity-multimap><td> <code>multimap;</code> <td> U+022B8 <td> <span class=glyph>⊸</span> <tr id=entity-mumap><td> <code>mumap;</code> <td> U+022B8 <td> <span class=glyph>⊸</span> <tr id=entity-nabla><td> <code>nabla;</code> <td> U+02207 <td> <span class=glyph>∇</span> <tr id=entity-Nacute><td> <code>Nacute;</code> <td> U+00143 <td> <span class=glyph>Ń</span> <tr id=entity-nacute><td> <code>nacute;</code> <td> U+00144 <td> <span class=glyph>ń</span> <tr id=entity-nang><td> <code>nang;</code> <td> U+02220 U+020D2 <td> <span class="glyph compound">∠⃒</span> <tr id=entity-nap><td> <code>nap;</code> <td> U+02249 <td> <span class=glyph>≉</span> <tr id=entity-napE><td> <code>napE;</code> <td> U+02A70 U+00338 <td> <span class="glyph compound">⩰̸</span> <tr id=entity-napid><td> <code>napid;</code> <td> U+0224B U+00338 <td> <span class="glyph compound">≋̸</span> <tr id=entity-napos><td> <code>napos;</code> <td> U+00149 <td> <span class=glyph>ʼ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"><⃒</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> 702393fb6ee3Sopenharmony_ci 702493fb6ee3Sopenharmony_ci </div> 702593fb6ee3Sopenharmony_ci 702693fb6ee3Sopenharmony_ci <p>This data is also available <a href=entities.json>as a JSON file</a>.</p> 702793fb6ee3Sopenharmony_ci 702893fb6ee3Sopenharmony_ci <p><i>The glyphs displayed above are non-normative. Refer to the Unicode specifications for formal 702993fb6ee3Sopenharmony_ci definitions of the characters listed above.</i></p> 703093fb6ee3Sopenharmony_ci 703193fb6ee3Sopenharmony_ci 703293fb6ee3Sopenharmony_ci <nav><a href=webstorage.html>← 11 Web storage</a> — <a href=index.html>Table of Contents</a> — <a href=xhtml.html>13 The XHTML syntax →</a></nav> 7033