Less-Than Sign HTML entity <

&lt; is the HTML entity for Less-Than Sign < (U+003C). Copy the decimal &#60; and hex &#x3C; codes plus CSS, JavaScript, Python and URL escapes.

Entity
&lt;
Also written
&LT;
Legacy form
&LT (no semicolon)
Code point
U+003C
Unicode name
LESS-THAN SIGN
Block
Basic Latin
Category
Math symbol (Sm)
Since
Unicode 1.1
Defined in
HTML 4.01 and HTML5, and predefined in XML

Codes to copy

HTML named&lt;Works in HTML; in XML only &amp; &lt; &gt; &quot; &apos; are predefined.
HTML decimal&#60;Works in HTML and XML.
HTML hex&#x3C;Works in HTML and XML.
CSScontent: "\3C";In a stylesheet, for ::before and ::after.
JavaScript"\u003C"Also valid in JSON.
Python"\u003c"Python 3 string literal.
Python by name"\N{LESS-THAN SIGN}"Readable alternative using the Unicode name.
URL%3CPercent-encoded UTF-8 bytes, for a path or query value.
UTF-8 bytes3C1 byte.
UTF-16003C1 code unit, which is what JavaScript length counts.

When to use it

Write &lt; whenever a less than sign appears in text or code samples: a raw < followed by a letter starts a tag, and the rest of the line disappears into it. Escaping < and & is the core of output encoding against HTML injection. Predefined in XML as well as HTML.

The name dates from HTML 4, so it works in every browser and in old email clients.

Browsers also accept the legacy form &LT without a semicolon, for compatibility with old pages; new HTML should always end the reference with a semicolon.

More html syntax and ascii punctuation

All html syntax and ascii punctuation · Every HTML entity · Encode or decode text

Source: the WHATWG HTML Standard list of named character references and the Unicode Character Database (Unicode 18.0).