HTML Entity for Digit Nine (9)

What You'll Learn
How to display the digit nine (9) in HTML using numeric character references. The digit 9 is part of Basic Latin (Unicode U+0039).
In most cases you can type 9 directly, but entity forms are useful for generated HTML, templating, and CSS content.
⚡ Quick Reference — 9 Entity
U+0039Basic Latin (ASCII digit)
9Hexadecimal reference
9Decimal reference
\0039Use in CSS content
Name Value
──────────── ──────────
Unicode U+0039
Hex code 9
HTML code 9
Named entity (none)
CSS code \0039Complete HTML Example
This example demonstrates 9 using hexadecimal code, decimal HTML code, and a CSS content escape on a pseudo-element:
<!DOCTYPE html>
<html>
<head>
<style>
#point:after{
content: "\0039";
}
</style>
</head>
<body>
<p>Digit Nine using Hexa Decimal: 9</p>
<p>Digit Nine using HTML Code: 9</p>
<p id="point">Digit Nine using CSS Entity: </p>
</body>
</html>🌐 Browser Support
The digit 9 (U+0039) is universally supported in all browsers and fonts:
👀 Live Preview
See the digit 9 rendered in different contexts:
🧠 How It Works
Hexadecimal Code
9 references Unicode 0039 (hex 39) to render the digit 9 in HTML.
Decimal HTML Code
9 uses the decimal code point value 57 to render the same character.
CSS Entity (Escape)
\0039 is used in CSS (often in content) to generate 9 in pseudo-elements. The 4-digit hex escape is a common style for ASCII code points.
Same visual result
All methods render 9. Unicode is U+0039 (Basic Latin). There is no named HTML entity for digits.
Use Cases
Using the digit 9 via character reference is useful in these scenarios:
Templates/CMS output where you want explicit numeric references.
Use \0039 for pseudo-elements and badges.
Generating date strings like 2026-09-09 safely.
Simple example of how numeric references work.
Part of a consistent HTML escaping/encoding strategy.
Counters and fixed labels in generated UI strings.
💡 Best Practices
Do
- Type 9 directly in normal prose when you can
- Use numeric references in generated HTML output
- Use
\0039in CSScontentwhen needed - Keep encoding consistent across templates
- Prefer semantic markup for lists (
<ol>)
Don’t
- Over-escape digits in static content without need
- Use CSS escapes inside HTML text nodes
- Assume entities improve accessibility (rendered output is identical)
- Mix reference styles randomly (hex vs decimal) in one section
- Use entities in JSON/JS strings (use the literal character)
Key Takeaways
Digit 9 is Unicode U+0039
Hex and decimal references
99CSS escape for generated content
\0039There is no named HTML entity for digits
Typing 9 directly is usually best
❓ Frequently Asked Questions
9 (hex) or 9 (decimal) in HTML. In CSS, use \0039 in the content property. All render 9.U+0039 (hex 39, decimal 57). It’s part of the Basic Latin (ASCII) range.\0039 go in stylesheets (usually content on pseudo-elements).Explore More HTML Entities!
Discover 1500+ HTML character references — currency symbols, arrows, math operators, emojis, and more.
9 people found this page helpful
