HTML Entity for Yin Yang (☯)

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 1 Code Example
Unicode U+262F

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

Unicode U+262F

Miscellaneous Symbols

Hex Code ☯

Hexadecimal reference

HTML Code ☯

Decimal reference

Named Entity

Use numeric codes only

Reference Table
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)
1

Complete HTML Example

A simple example showing the Yin Yang symbol (☯) using hexadecimal code, decimal HTML code, and a CSS content escape:

html
<!DOCTYPE html>
<html lang="en">
<head>
 <meta charset="utf-8">
 <style>
  #balance:after{
   content: "\262F";
  }
 </style>
</head>
<body>
<p>Yin Yang (hex): &#x262F;</p>
<p>Yin Yang (decimal): &#9775;</p>
<p id="balance">Yin Yang (CSS): </p>
</body>
</html>
Try It Yourself

🌐 Browser Support

U+262F is widely supported in modern browsers as a Miscellaneous Symbol:

Chrome1+
Firefox1+
Safari1+
Edge12+
Opera4+
Android4.4+
iOS Safari1+

👀 Live Preview

See the Yin Yang symbol in different contexts:

InlineBalance and harmony ☯
Large glyph
Related symbols☯ yin yang   ☸ dharma wheel
Numeric refs&#x262F; &#9775; \262F
Heading accent☯ Tao & Wellness

🧠 How It Works

1

Hexadecimal Code

&#x262F; uses the Unicode hexadecimal value 262F to display the Yin Yang symbol. The x prefix indicates hexadecimal format.

HTML markup
2

Decimal HTML Code

&#9775; uses the decimal Unicode value 9775 to display the same character.

HTML markup
3

CSS Entity

\262F is used in CSS stylesheets, particularly in the content property of pseudo-elements like ::before and ::after.

CSS stylesheet
=

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:

🧘 Philosophy & spirituality

Taoism, balance, and dualistic philosophy in content and navigation.

💆 Wellness & meditation

Yoga, mindfulness, and holistic health apps and websites.

🎨 Logo & branding

Favicons and brand identity for balance-themed businesses.

📚 Cultural education

Asian studies, symbolism, and philosophy tutorials.

⚖ Balance-themed UIs

Dashboards and tools visualizing comparison or duality.

🖼 Art portfolios

Tattoo, design, and creative project galleries.

🌐 Multilingual content

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 \262F in 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

1

Three ways to render ☯ in HTML and CSS

&#x262F; &#9775;
2

For CSS stylesheets, use the escape in the content property

\262F
3

Unicode U+262F — YIN YANG (taijitu)

4

Miscellaneous Symbols block; strong browser support

❓ Frequently Asked Questions

Use &#x262F; (hex), &#9775; (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.
For philosophy and spirituality sites, wellness and meditation content, balance-themed branding, cultural education, dashboards, art portfolios, and Taoist or Eastern philosophy topics.
HTML numeric references (&#9775; or &#x262F;) 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.
Named HTML entities are reserved for commonly used ASCII, Latin-1, and widely recognized symbols. Miscellaneous Symbols like ☯ use numeric codes. Use &#9775; or &#x262F; in HTML, or \262F in CSS.

Explore More HTML Entities!

Discover 1500+ HTML character references — symbols, philosophy icons, and more.

All HTML Entities →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful