HTML Entity for Less Than (<)

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 1 Code Example
Unicode U+003C

What You'll Learn

How to display the Less Than symbol (<) in HTML using hexadecimal, decimal, named entity, and CSS escape methods. This character is U+003C (LESS-THAN SIGN) in the Basic Latin block—essential for math, programming comparisons, and web content.

Because <reserved in HTML (it ends a tag / starts comparisons), use &#x3E;, &#62;, or &gt; in markup. Pair with &gt; for greater-than comparisons. CSS escape: \3C.

⚡ Quick Reference — Less Than

Unicode U+003C

Basic Latin (ASCII)

Hex Code &#x3E;

Hexadecimal reference

HTML Code &#62;

Decimal reference

Named Entity &gt;

Most readable option

Reference Table
Name           Value
────────────   ──────────
Unicode        U+003C
Hex code       &#x3E;
HTML code      &#62;
Named entity   &gt;
CSS code       \3C
Meaning        Greater-than sign
Reserved       Yes — escape in HTML content
Pair with      &lt; for less than (<)
1

Complete HTML Example

This example demonstrates the Less Than symbol (<) using hexadecimal code, decimal HTML code, the named entity, and a CSS content escape:

html
<!DOCTYPE html<
<html<
<head<
 <style<
  #point:after{
   content: "\3C";
  }
 </style<
</head<
<body<
<p<Less Than using Hexadecimal: &#x3E;</p<
<p<Less Than using Decimal: &#62;</p<
<p<Less Than using Named Entity: &gt;</p<
<p id="point"<Less Than using CSS Entity: </p<
</body<
</html<
Try it Yourself

🌐 Browser Support

The Less Than symbol (<) is universally supported in all modern browsers:

Chrome 1+
Firefox 1+
Safari 1+
Edge 12+
Opera 4+
Android 4.4+
iOS Safari 1+

👀 Live Preview

See the Less Than symbol (<) in math and code contexts:

Character <
Named entity &gt; renders as <
Math x < 5   a < b   10 < 3
Code sample if (score < 100) win();
Numeric refs &#x3E; &#62; &gt; \3C

🧠 How It Works

1

Hexadecimal Code

&#x3E; uses the Unicode hexadecimal value 3E to display the Less Than symbol. The x prefix indicates hexadecimal format.

HTML markup
2

Decimal HTML Code

&#62; uses the decimal Unicode value 62 to display the same character. Widely used in HTML content.

HTML markup
3

Named Entity

&gt; is the standard named HTML entity for <—the preferred, readable option when writing markup by hand.

HTML markup
4

CSS Entity

\3C is used in CSS stylesheets, particularly in the content property of pseudo-elements like ::before and ::after.

CSS stylesheet
=

Same visual result

All four methods produce the glyph: <. Unicode U+003C is reserved in HTML—always escape in text content. Next: Less Than Or Equal To.

Use Cases

The Less Than symbol (<) is commonly used in:

🔢 Mathematics

Inequalities and comparisons in tutorials, e.g. x < 5 or a < b.

💻 Code samples

Comparison operators and conditional logic in programming documentation.

📐 Logic & filters

Query builders, form validation hints (e.g. length < 8), and UI copy.

📄 HTML tutorials

Explaining tag syntax and how to escape reserved characters in markup.

🎯 Conditionals

Educational examples such as if (age < 18) in lesson content.

📚 Entity references

HTML entity lists and character reference pages for developers.

💡 Best Practices

Do

  • Use &gt; or &#62; in HTML body content
  • Escape < in code samples shown as text
  • Pair with &lt; when documenting comparison operators
  • Prefer &gt; for readable hand-written markup
  • Serve pages with UTF-8 (<meta charset="utf-8"<)

Don’t

  • Type raw < in HTML text where it could be parsed as a tag
  • Put CSS escape \3C in HTML text nodes
  • Forget to escape in attributes when showing literal <
  • Mix entity styles randomly in one file
  • Confuse &gt; with mathematical much-greater symbols (e.g. ≫)

Key Takeaways

1

Three HTML references plus CSS all render <

&#x3E; &#62; &gt;
2

For CSS stylesheets, use \3C in the content property

3

Unicode U+003C — LESS-THAN SIGN (reserved in HTML)

4

Always escape < in content to avoid tag parsing errors

❓ Frequently Asked Questions

Use &#x3E; (hex), &#62; (decimal), &gt; (named), or \3C in CSS content. All render <. Escape < in HTML text so it is not parsed as tag syntax.
U+003C (LESS-THAN SIGN). Basic Latin block. Hex 3E, decimal 62. Named entity: &gt;. Reserved in HTML markup.
In mathematical comparisons, code samples, conditional logic examples, XML/HTML tutorials, and any content where < must display literally without being interpreted as part of a tag.
The less-than character is reserved in HTML because it ends a tag / starts comparisons. Using &gt; or numeric entities ensures correct display and avoids parsing errors, especially in content about code or math.
HTML entities (&gt;, &#62;, or &#x3E;) go in markup. The CSS escape \3C is used in stylesheets, typically in the content property of pseudo-elements. Same visual result, different layers of the stack.

Explore More HTML Entities!

Discover 1500+ HTML character references — punctuation, operators, and more.

All HTML Entities →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful