Digit one (1) is the Basic Latin character at Unicode U+0031. You can type 1 directly in HTML, or write it with a numeric character reference when you need an explicit entity form.
Remember
Character 1
Unicode U+0031
Hex entity 1
Decimal 1
CSS escape \0031
Named entity (none)
All of these produce the same glyph: 1. Prefer typing 1 in normal page text; use entities for CSS content, generated markup, or when encoding must be explicit.
Reference
Quick Reference
One table for every form you will actually use.
Form
Code
Where it goes
Direct character
1
HTML text (default choice)
Hex entity
1
HTML markup
Decimal entity
1
HTML markup
CSS escape
\0031
Stylesheet content
Named entity
—
Not defined in HTML5
When to use which
Situation
Use
Normal paragraphs, headings, labels
Type 1
Need an entity in HTML source
1 or 1
Generated text via ::before / ::after
content: "\0031"
Looking for &one; or similar
Does not exist — use numeric form
See it
Live Preview
Digit one rendered in common UI contexts.
Inline textYou have 1 new notification.
Large glyph1
Date / time2026-09-22 10:01
Monospaceindex 1, value 1
With entitiesHex: 1 | Decimal: 1
Code
Complete HTML Example
One page that shows digit one with the hex entity, decimal entity, CSS escape, and a typed character. Use View Output or open the live editor.
Hex + Decimal + CSS + Typed
All four ways to produce 1 in a single document.
html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Digit One (1) in HTML</title>
<style>
#point::after {
content: "\0031";
}
</style>
</head>
<body>
<p>Digit One using Hex Code: 1</p>
<p>Digit One using HTML Code: 1</p>
<p id="point">Digit One using CSS Entity: </p>
<p>Typed directly: 1</p>
</body>
</html>
Digit One using Hex Code: 1
Digit One using HTML Code: 1
Digit One using CSS Entity: 1
Typed directly: 1
How It Works
1. Hex:U+0031 → 1 in HTML. The browser turns it into 1.
2. Decimal: same code point as 49 → 1. Same result as hex.
3. CSS: use \0031 in content (not an HTML entity). #point::after appends that 1 after the paragraph text.
4. Typed 1: best for normal text. All four lines show the same digit.
Pitfalls & Tips
Common mistakes when working with digit one entities.
Named?
No &one;
HTML5 does not define a named entity for ASCII digits. Use numeric forms.
CSS vs HTML
Do not mix escapes
\0031 belongs in CSS. 1 / 1 belong in HTML.
1 vs l vs I
Avoid ambiguity
In monospace or codes, digit 1 can look like lowercase l or capital I. Add labels when precision matters.
Default
Type 1 when you can
Entities are for encoding needs — not required for ordinary body text.
Semicolon
End references
Always finish with ; — write 1, not 1.
Related
Sub / super one
₁ and ¹ are different Unicode characters — not the same as U+0031.
Compatibility
Browser Support
Digit one (U+0031) and its numeric entity forms (1, 1, CSS \\0031) are supported in all mainstream browsers.
✓ Universal support
Digit One (1)
Type 1, or encode with hex, decimal, or CSS escape — same glyph everywhere.
100%Browser coverage
Google ChromeSupported
Yes
Microsoft EdgeSupported
Yes
Mozilla FirefoxSupported
Yes
Apple SafariSupported
Yes
OperaSupported
Yes
Internet ExplorerAll versions
Yes
U+0031 / entitiesFull support
Bottom line: Use a typed 1 for normal text. Prefer 1 or 1 in HTML when encoding must be explicit, and \\0031 only inside CSS content.
Remember
Key Takeaways
Unicode: digit one is U+0031 (decimal 49).
HTML: use 1 or 1 when you need an entity.
CSS: use \0031 inside content for generated text.
Default: type 1 directly unless encoding requires an entity.
One line:U+0031 → type 1, or encode as 1 / 1 / CSS \0031.
Frequently Asked Questions
Use 1 (hex), 1 (decimal), or the CSS escape \0031 in the content property. All render the digit one (1). In most cases you can also type 1 directly.
U+0031 (hex 0031, decimal 49). It belongs to the Basic Latin (ASCII) block.
No. ASCII digits like 1 do not have named HTML entities in HTML5, so you should use numeric references like 1 or 1 when you need an entity form.
Use entities when generating content in CSS, when you want explicit encoding, or when outputting into contexts where escaping is required. For normal body text, typing 1 directly is usually best.
HTML entities (1 or 1) go in markup. The CSS escape \0031 is used in stylesheets (usually in the content property of ::before/::after). Both render 1.
Use UI or monospace fonts for codes and counts, and add labels like Step 1 or Count: 1 so context is clear.
🤔
Did you know?
Digit one is Unicode U+0031 (decimal 49). HTML5 has no named entity for it — use 1 or 1 when you need an entity form.