HTML Entity for Digit Six (6)

What You'll Learn
How to display the digit six (6) in HTML using numeric character references. The digit 6 is part of Basic Latin (Unicode U+0036).
In most cases you can type 6 directly, but entity forms are useful for generated HTML, templating, and CSS content.
⚡ Quick Reference — 6 Entity
U+0036Basic Latin (ASCII digit)
6Hexadecimal reference
6Decimal reference
\0036Use in CSS content
Name Value
──────────── ──────────
Unicode U+0036
Hex code 6
HTML code 6
Named entity (none)
CSS code \0036Complete HTML Example
This example demonstrates 6 using hexadecimal code, decimal HTML code, and a CSS content escape on a pseudo-element:
<!DOCTYPE html>
<html>
<head>
<style>
#point:after{
content: "\0036";
}
</style>
</head>
<body>
<p>Digit Six using Hexa Decimal: 6</p>
<p>Digit Six using HTML Code: 6</p>
<p id="point">Digit Six using CSS Entity: </p>
</body>
</html>🌐 Browser Support
The digit 6 (U+0036) is universally supported in all browsers and fonts:
👀 Live Preview
See the digit 6 rendered in different contexts:
🧠 How It Works
Hexadecimal Code
6 references Unicode 0036 (hex 36) to render the digit 6 in HTML.
Decimal HTML Code
6 uses the decimal code point value 54 to render the same character.
CSS Entity (Escape)
\0036 is used in CSS (often in content) to generate 6 in pseudo-elements. The 4-digit hex escape is a common style for ASCII code points.
Same visual result
All methods render 6. Unicode is U+0036 (Basic Latin). There is no named HTML entity for digits.
Use Cases
Using the digit 6 via character reference is useful in these scenarios:
Templates/CMS output where you want explicit numeric references.
Use \0036 for pseudo-elements and badges.
Generating date strings like 2026-06-01 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 6 directly in normal prose when you can
- Use numeric references in generated HTML output
- Use
\0036in 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 6 is Unicode U+0036
Hex and decimal references
66CSS escape for generated content
\0036There is no named HTML entity for digits
Typing 6 directly is usually best
❓ Frequently Asked Questions
6 (hex) or 6 (decimal) in HTML. In CSS, use \0036 in the content property. All render 6.U+0036 (hex 36, decimal 54). It’s part of the Basic Latin (ASCII) range.\0036 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.
8 people found this page helpful
