HTML Entity Detail

HTML Entity - Less Than ("opening Bracket")

Less Than ("opening Bracket") is a reserved HTML characters and special typographic symbols. This HTML entity enables web developers to display this character reliably across all browsers without encoding issues.

Symbol preview
<
Unicode

U+0003C

HTML entity

&lt;

CSS code

\003C

Usage Examples

Use &lt; to display a less-than sign without breaking HTML parsing. For example, to show a code snippet: &lt;div&gt;Hello&lt;/div&gt; renders as &lt;div&gt;Hello&lt;/div&gt;. In mathematics: 5 &lt; 10 renders as 5 &lt; 10.

About Less Than ("opening Bracket")

The less-than sign (<) is the character that starts every HTML tag. Because of that, a literal < in page content must be written as &lt;; otherwise the browser treats it as the beginning of markup and the rest of the document can break.

The character comes from a cursive form of the letter l used in medieval manuscripts, where it was shorthand for the Latin word "libra". It has been used as a comparison operator, meaning "is less than", in mathematics and later in programming languages.

Encoding by context: in HTML content use &lt;. In attribute values use &lt; as well. In XML a bare < is illegal and must always be escaped. In CSS write the CSS escape. In JavaScript a literal < inside a string or comparison is fine because the language parses it directly.

A useful contrast is that browsers are lenient about a bare > (greater-than) and will often render it, but they are not lenient about <, because < unambiguously introduces a tag. For valid, predictable markup, escape both.

Common situations where < must be escaped are showing HTML or XML code samples, writing mathematical comparisons such as "a < b", documenting template syntax, and displaying generic type parameters in programming articles such as List<String>.

Related characters are &le; or &#8804; for "less than or equal to" (≤) and &lt; for strict inequality. Keeping them distinct matters in both mathematical writing and documentation, where confusing < with ≤ changes the meaning of a statement.

Whenever you publish code, markup, or formulas, escaping < correctly is what lets the reader see the symbols you intend instead of triggering the browser's parser.

Common Mistakes

⚠️

Mistake: Using < directly in HTML content instead of &lt;

Fix: Always use &lt; to display a less-than sign in HTML. Otherwise the browser treats it as the start of an HTML tag.

⚠️

Mistake: Confusing < (less-than) with ≤ (less-than-or-equal)

Fix: Use < for strict inequality and ≤ (&le;) for inclusive inequality.

Frequently Asked Questions

What is the HTML entity for a less-than sign?

Use &lt;. The equivalent numeric forms are &#60; and &#x3c;, and all three render the same < character.

Why must I escape < in HTML?

Because < begins an HTML tag. A raw < is interpreted as markup, which breaks rendering. Writing &lt; tells the browser to show a literal less-than sign.

Is &lt; the same as &#60; and \u003C?

Yes. &lt;, &#60; (decimal) and &#x3c; (hex) all describe the same code point, U+003C. Choose the form that reads best in your content.

Do I also need to escape the greater-than sign?

Browsers usually tolerate a bare >, but valid HTML and XML expect &gt;. Escaping both < and > is the safest, most consistent habit.

How do I display the text "<div>" on a page?

Write &lt;div&gt; in your source. The browser then displays the characters <div> without interpreting them as a real element.

What is the difference between < and ≤?

< means strictly less than, while ≤ (entity &le;, code point U+2264) means less than or equal to. Mixing them up changes the meaning of a comparison.

Less Than ("opening Bracket")

Select any code to highlight it before copying.

Category: Special Chars & Html
Unicode U+0003C
Hex Code &#x3c;
HTML Code &#60;
HTML Entity &lt;
CSS Code \003C
Windows Shortcut
Mac Shortcut
HTML code example
CSS code example