[X]

Entities Without The Semicolon

parser and markup 1998 still works

&copy renders the copyright sign with no closing semicolon, and &notit; quietly becomes the not sign followed by the text it;.

In 2026: Still works, and still bites. A short legacy list of named references (copy, amp, lt, gt, reg, nbsp and a few dozen more) is matched even without the trailing semicolon, carried from HTML 4 into the modern parser. Matching is greedy, so &notit; finds &not and leaves it; behind. A newer name with no legacy prefix, like &bigstar, renders as the literal text without its trailing semicolon; only ★ gives the star.

Where it came from: The WHATWG HTML standard, named character references table and the ambiguous ampersand parse error. The semicolon-optional set is inherited from HTML 4.0 (W3C, 1998). WHATWG

<p>Named references still resolve with the semicolon left off:</p>
<p style="font-size:1.6em">&copy &reg &amp &lt &gt</p>
<p>The greedy trap. The source <code>&amp;notit;</code> renders as
<b>&notit;</b>, because the parser matches <code>&amp;not</code>
(the not sign) and leaves <code>it;</code> as plain text.</p>
sandboxed demo · breaks nothing but itselfrestart

More in parser and markup

all 4 in parser and markup › · the whole library ›