HTML Entity for Yin Yang (☯)

What You'll Learn
How to display the Yin Yang symbol (☯) in HTML using hexadecimal, decimal, and CSS escape methods. This character is U+262F (YIN YANG, also called taijitu) in the Miscellaneous Symbols block (U+2600–U+26FF)—representing balance, harmony, and the duality of opposite forces.
Render it with ☯, ☯, or CSS escape \262F. There is no named HTML entity. Do not confuse ☯ with the Wheel of Dharma (☸, U+2638) or I Ching trigrams (U+2630–U+2637). Use aria-label when the symbol stands alone for accessibility.
⚡ Quick Reference — Yin Yang
U+262FMiscellaneous Symbols
☯Hexadecimal reference
☯Decimal reference
—Use numeric codes only
Name Value
──────────── ──────────
Unicode U+262F
Hex code ☯
HTML code ☯
Named entity (none)
CSS code \262F
Meaning Yin Yang / taijitu (balance symbol)
Related U+2638 = Wheel of Dharma (☸)
U+2630–U+2637 = I Ching trigrams
Block Miscellaneous Symbols (U+2600–U+26FF)Complete HTML Example
A simple example showing the Yin Yang symbol (☯) using hexadecimal code, decimal HTML code, and a CSS content escape:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style>
#balance:after{
content: "\262F";
}
</style>
</head>
<body>
<p>Yin Yang (hex): ☯</p>
<p>Yin Yang (decimal): ☯</p>
<p id="balance">Yin Yang (CSS): </p>
</body>
</html>🌐 Browser Support
U+262F is widely supported in modern browsers as a Miscellaneous Symbol:
👀 Live Preview
See the Yin Yang symbol in different contexts:
🧠 How It Works
Hexadecimal Code
☯ uses the Unicode hexadecimal value 262F to display the Yin Yang symbol. The x prefix indicates hexadecimal format.
Decimal HTML Code
☯ uses the decimal Unicode value 9775 to display the same character.
CSS Entity
\262F is used in CSS stylesheets, particularly in the content property of pseudo-elements like ::before and ::after.
Same visual result
All three methods produce the glyph: ☯. Unicode U+262F is YIN YANG in Miscellaneous Symbols (U+2600–U+26FF).
Use Cases
The Yin Yang symbol (☯) is commonly used in:
Taoism, balance, and dualistic philosophy in content and navigation.
Yoga, mindfulness, and holistic health apps and websites.
Favicons and brand identity for balance-themed businesses.
Asian studies, symbolism, and philosophy tutorials.
Dashboards and tools visualizing comparison or duality.
Tattoo, design, and creative project galleries.
Harmony and Eastern philosophy topics across languages.
💡 Best Practices
Do
- Add
aria-label="Yin Yang symbol"when ☯ stands alone - Pair the symbol with meaningful context (balance, harmony, Tao)
- Use UTF-8 and test rendering on target devices
- Pick one numeric style (hex or decimal) per project for consistency
- Consider cultural sensitivity when using spiritual symbols in branding
Don’t
- Confuse ☯ (yin yang) with ☸ (Wheel of Dharma)
- Put CSS escape
\262Fin HTML text nodes - Use the symbol decoratively without context on serious cultural pages
- Mix entity styles randomly in one file
- Expect a named HTML entity for U+262F—use numeric references instead
Key Takeaways
Three ways to render ☯ in HTML and CSS
☯ ☯For CSS stylesheets, use the escape in the content property
\262FUnicode U+262F — YIN YANG (taijitu)
Miscellaneous Symbols block; strong browser support
Previous: Variant Three (圜) Next: Yuan Character China (元)
❓ Frequently Asked Questions
☯ (hex), ☯ (decimal), or \262F in CSS content. There is no named HTML entity. In UTF-8 you can also type ☯ directly.U+262F (YIN YANG). Miscellaneous Symbols block U+2600–U+26FF. Hex 262F, decimal 9775. Represents balance, harmony, and yin–yang duality.☯ or ☯) go directly in markup. The CSS escape \262F is used in stylesheets, typically in the content property of pseudo-elements. Same visual result, different layers of the stack.☯ or ☯ in HTML, or \262F in CSS.Explore More HTML Entities!
Discover 1500+ HTML character references — symbols, philosophy icons, and more.
8 people found this page helpful
