HTML Entity for Subscript Digit Two (₂)

What You'll Learn
How to display the subscript digit two (₂) in HTML using hex, decimal, and CSS entity methods. This character belongs to the Superscripts and Subscripts Unicode block and is useful for chemical formulas (H₂O, CO₂), mathematical notation, scientific writing, and technical content.
₂ has no named HTML entity. You’ll typically use numeric references (₂ or ₂) or a CSS escape (\2082 in content).
⚡ Quick Reference — ₂ Entity
U+2082Superscripts & Subscripts block
₂Hexadecimal reference
₂Decimal reference
\2082Use in CSS content
Name Value
──────────── ──────────
Unicode U+2082
Hex code ₂
HTML code ₂
Named entity (none)
CSS code \2082Complete HTML Example
This example demonstrates the subscript digit two (₂) using hexadecimal code, decimal HTML code, and a CSS content escape on a pseudo-element:
<!DOCTYPE html>
<html>
<head>
<style>
#point:after{
content: "\2082";
}
</style>
</head>
<body>
<p>Subscript 2 using Hexa Decimal: ₂</p>
<p>Subscript 2 using HTML Code: ₂</p>
<p id="point">Subscript 2 using CSS Entity: </p>
</body>
</html>🌐 Browser Support
The ₂ character (Unicode U+2082) is supported in all modern browsers. If a font doesn’t include Superscripts and Subscripts, the browser may fall back to another font.
👀 Live Preview
See the subscript digit two rendered live in different contexts:
🧠 How It Works
Hexadecimal Code
₂ references Unicode 2082 in hexadecimal, producing the glyph ₂ in your HTML.
Decimal HTML Code
₂ references the same Unicode code point using the decimal value 8322.
CSS Entity (Escape)
\2082 is used in CSS (most often in the content property) to generate ₂ without adding extra HTML.
Same visual result
All methods produce ₂. The Unicode value is U+2082 in the Superscripts and Subscripts block. There is no named HTML entity for this character.
Use Cases
The subscript digit two (₂) commonly appears in the following scenarios:
Write formulas like H₂O, CO₂, O₂, and N₂ with true subscript numerals.
Use in indices, sequences, and variables like x₂, a₂, or term₂.
Present scientific notation and equations with proper typographic subscripts.
Use subscript-style markers in notes and references when design calls for it.
Label versions, items, or parameters like item₂ in documentation and examples.
Teach chemistry, physics, and math with correctly formatted subscripts.
💡 Best Practices
Do
- Use
₂or₂for reliable HTML rendering in formulas - Use the CSS escape
\2082incontentfor generated labels and markers - Consider
<sub>for complex formulas when you control styling - Provide readable context for screen readers in chemical/math content
- Test font support and fallback rendering across devices
Don’t
- Confuse the subscript ₂ with the regular digit 2
- Use the CSS escape
\2082directly in HTML text - Mix hex/decimal references randomly in the same file
- Assume every font includes Superscripts/Subscripts glyphs
- Rely on a glyph alone to convey meaning without context
Key Takeaways
Two HTML numeric references render ₂
₂ ₂For CSS stylesheets, use the escape in the content property
\2082Unicode U+2082 belongs to the Superscripts and Subscripts block
There is no named HTML entity for this character
Use ₂ for chemical formulas, indices, and scientific notation
❓ Frequently Asked Questions
₂ (hex) or ₂ (decimal) in HTML. For CSS, use \2082 in the content property. All methods render ₂.U+2082 (hex 2082, decimal 8322). It’s part of the Superscripts and Subscripts block.₂ or ₂) go directly in markup. The CSS escape \2082 is used in stylesheets (usually in content on ::before/::after). Same visual result, different layers of the stack.₂ or decimal ₂.Explore More HTML Entities!
Discover 1500+ HTML character references — currency symbols, arrows, math operators, emojis, and more.
8 people found this page helpful
