< — Less-Than Sign

Code point 60 · U+003C · markup-critical

< is the named character reference for the less-than sign, code point 60. Written as a decimal reference it is <; as a hexadecimal reference, <. All three resolve to the same glyph, and the choice between them is about what survives your toolchain rather than about meaning.

Character<
Named&lt;
Decimal&#60;
Hexadecimal&#x3C;

Which form to write

Named references are readable and self-documenting, which is why hand-written markup uses them. Numeric references — decimal or hexadecimal — are unambiguous and immune to entity-table gaps, which is why generators, serialisers and sanitisers prefer them. HTML5 recognises the named form in both HTML and XHTML syntax, and browsers resolve any of the three identically at render time.

FormBytesSurvivesTypical producer
&lt;4Any HTML5 parserHand-written templates
&#60;5Every HTML and XML parserOlder escape libraries
&#x3C;6Every HTML and XML parserModern serialisers

What this site's encoder does with it

Paste the less-than sign into the encoder and pick a style: with named selected the output is &lt;. That is the named form, because this character sits in the small set the encoder must escape no matter what.

This character is one of the handful that must always be escaped. Left raw inside text or an attribute it changes how the document is parsed rather than what it displays.

Mistakes worth avoiding

Questions about &lt;

What is &lt; in decimal and hex?

Decimal <, hexadecimal <. All three reference code point 60 and render the same character, “<”.

Do I have to use the named form?

In text content only the ampersand and the angle brackets are compulsory; everything else is optional. Named forms are easier to read in source and that is the main reason to prefer them.

Which form does this site's encoder output for &lt;?

It emits < when the named style is selected, because this character is one of the four with a mandatory escape.

Where does &lt; break?

It breaks when the surrounding text already assumes an ASCII-only pipeline. Some legacy systems re-encode the ampersand, turning one entity into two and exposing the raw code in the rendered page.