HTML Entity for Digit Zero (0)

What You'll Learn
How to display the digit zero (0) using HTML numeric entities and a CSS escape. While you can type 0 directly in most content, entity forms help when you need explicit encoding (like CSS content or generated markup).
Digit zero is in the Basic Latin (ASCII) block and is referenced as Unicode U+0030.
⚡ Quick Reference — Digit Zero Entity
U+0030Basic Latin (ASCII) block
0Hexadecimal reference
0Decimal reference
—No named entity available
Name Value
──────────── ──────────
Unicode U+0030
Hex code 0
HTML code 0
Named entity —
CSS code \0030Complete HTML Example
This example renders digit zero using the hex entity, decimal entity, and a CSS escape on a pseudo-element:
<!DOCTYPE html>
<html>
<head>
<style>
#point:after{
content: "\0030";
}
</style>
</head>
<body>
<p>Digit Zero using Hexa Decimal: 0</p>
<p>Digit Zero using HTML Code: 0</p>
<p id="point">Digit Zero using CSS Entity: </p>
</body>
</html>🌐 Browser Support
Digit zero (0) and its numeric entity forms are supported in all browsers:
👀 Live Preview
See digit zero rendered in a few common contexts:
🧠 How It Works
Hexadecimal Code
0 uses the Unicode hexadecimal value 30 to render digit zero.
Decimal HTML Code
0 uses the decimal Unicode value 48 for the same character.
CSS Entity
\0030 is a CSS escape used in stylesheets (typically inside content for ::before/::after).
Same visual result
All methods display 0. Unicode U+0030 is a Basic Latin (ASCII) character.
Use Cases
Digit zero (0) is used in everyday web content such as:
Counts like “0 items”, pagination, and status badges.
Formatting like $0.00 and free-tier pricing.
Zero-padding in timestamps (e.g. 09:05).
Default values, validation, and quantities.
Code examples, indices, versions (v1.0), and IDs.
Equations and 0-indexed explanations in tutorials.
💡 Best Practices
Do
- Type
0directly in normal body content - Use entities when you need explicit encoding (CSS
content, generated output, or special contexts) - Use monospace or tabular figures for aligned numeric UI
- Include context so users don’t confuse 0 with O
Don’t
- Assume there is a named entity for 0 (there isn’t)
- Mix CSS escapes into HTML markup (use them in stylesheets only)
- Overuse entities where a direct character is clearer
- Use ambiguous fonts in UI where 0 and O look identical
Key Takeaways
Digit zero is Unicode U+0030
U+0030 0 0For CSS stylesheets, use the escape in the content property
\0030There is no named HTML entity for 0
Prefer typing 0 directly unless you need an entity form
❓ Frequently Asked Questions
0 (hex), 0 (decimal), or \0030 in CSS content. In most cases you can also type 0 directly.U+0030 (hex 0030, decimal 48) in the Basic Latin (ASCII) block.0 is simplest.Explore More HTML Entities!
Discover 1500+ HTML character references — currency symbols, arrows, math operators, emojis, and more.
8 people found this page helpful
