HTML Entity for Subscript Four (₄)

What You'll Learn
How to display the subscript four (₄) in HTML using hex, decimal, and CSS entity methods. This character lives in the Superscripts and Subscripts Unicode block and is commonly used for chemical formulas, mathematical expressions, molecular notation, and technical content.
₄ has no named HTML entity, so you’ll use numeric references (₄ or ₄) or a CSS escape (\2084 in content).
⚡ Quick Reference — ₄ Entity
U+2084Superscripts & Subscripts block
₄Hexadecimal reference
₄Decimal reference
\2084Use in CSS content
Name Value
──────────── ──────────
Unicode U+2084
Hex code ₄
HTML code ₄
Named entity (none)
CSS code \2084Complete HTML Example
This example demonstrates ₄ using hexadecimal code, decimal HTML code, and a CSS content escape on a pseudo-element:
<!DOCTYPE html>
<html>
<head>
<style>
#point:after{
content: "\2084";
}
</style>
</head>
<body>
<p>Subscript Four using Hexa Decimal: ₄</p>
<p>Subscript Four using HTML Code: ₄</p>
<p id="point">Subscript Four using CSS Entity: </p>
</body>
</html>🌐 Browser Support
The character ₄ (U+2084) is supported in all modern browsers. Rendering depends on font support for the Superscripts and Subscripts block, so include a sensible fallback font stack:
👀 Live Preview
See ₄ rendered in a few practical contexts:
<sub> (e.g., H2O).🧠 How It Works
Hexadecimal Code
₄ references Unicode 2084 in hexadecimal to produce the glyph ₄ in HTML.
Decimal HTML Code
₄ uses the decimal code point value 8324 to render the same character.
CSS Entity (Escape)
\2084 is used in CSS (often in content) to generate ₄ in pseudo-elements like ::before and ::after.
Same visual result
All methods render ₄. Unicode is U+2084 (Superscripts and Subscripts). There is no named HTML entity for this character.
Use Cases
The subscript four (₄) commonly appears in the following scenarios:
Chemical and ionic formulas like SO₄²⁻, PO₄³⁻.
Indices and sequences like x₄, a₄ in notation.
Compact subscript markers in text-heavy content.
Base notation like 10₄ for base-4 examples.
Textbooks and tutorials with simple subscripts.
Use the glyph when you need a single subscript digit.
💡 Best Practices
Do
- Use
<sub>when the subscript is a word or phrase - Use numeric references (
₄/₄) for portability - Keep formula formatting consistent across the page
- Verify font support for Superscripts/Subscripts when important
- Consider MathML/MathJax for complex equations
Don’t
- Mix Unicode subscripts with random
<sub>usage without reason - Assume every font renders ₄ at the same size and position
- Use the CSS escape inside HTML content
- Let line-height collapse around formulas (adjust if needed)
- Use ₄ where a normal “4” is intended
Key Takeaways
Use numeric references in HTML
₄ ₄For CSS, use the escape in the content property
\2084Unicode U+2084 is in Superscripts/Subscripts
Useful for formulas and indices like SO₄ and x₄
There is no named HTML entity for ₄
❓ Frequently Asked Questions
₄ (hex) or ₄ (decimal) in HTML. In CSS, use \2084 in the content property. All render ₄.U+2084 (hex 2084, decimal 8324). It’s part of the Superscripts and Subscripts Unicode block.₄ or ₄) are used directly in markup. The CSS escape \2084 is used in stylesheets (often in content on pseudo-elements). Same glyph, different layer.₄ or ₄ instead of a named entity.Explore More HTML Entities!
Discover 1500+ HTML character references — currency symbols, arrows, math operators, emojis, and more.
8 people found this page helpful
