HTML Entity for Sun (☉)

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

What You'll Learn

How to display the Sun symbol (☉) in HTML using hexadecimal, decimal, and CSS escape methods. This character is U+2609 (SUN) in the Miscellaneous Symbols block (U+2600–U+26FF)—the astronomical sun glyph used in charts, astrology, and scientific notation.

Render it with ☉, ☉, or CSS escape \2609. There is no named HTML entity. Do not confuse ☉ (astronomical sun) with ☀ (black sun with rays, common in weather UIs) or the emoji ☀️.

⚡ Quick Reference — Sun

Unicode U+2609

Miscellaneous Symbols

Hex Code ☉

Hexadecimal reference

HTML Code ☉

Decimal reference

Named Entity

Use numeric codes only

Reference Table
Name           Value
────────────   ──────────
Unicode        U+2609
Hex code       ☉
HTML code      ☉
Named entity   (none)
CSS code       \2609
Block          Miscellaneous Symbols (U+2600–U+26FF)
Related        U+2600 = Black Sun With Rays (☀)
1

Complete HTML Example

This example demonstrates the Sun symbol (☉) using hexadecimal code, decimal HTML code, and a CSS content escape (no named entity):

html
<!DOCTYPE html>
<html>
<head>
 <style>
  #point:after{
   content: "\2609";
  }
 </style>
</head>
<body>
<p>Sun using Hexadecimal: &#x2609;</p>
<p>Sun using HTML Code: &#9737;</p>
<p id="point">Sun using CSS Entity: </p>
</body>
</html>
Try it Yourself

🌐 Browser Support

The Sun entity is universally supported in all modern browsers:

Chrome 1+
Firefox 1+
Safari 1+
Edge 12+
Opera 4+
Android 4.4+
iOS Safari 1+

👀 Live Preview

See the Sun symbol (☉) rendered in different contexts:

Astronomy ☉ Sun — astronomical symbol for the solar body
Large glyph
vs weather sun ☉ astronomical   ☀ weather / decorative
Monospace &#x2609; &#9737; \2609
No named entity Use ☉ via numeric codes only

🧠 How It Works

1

Hexadecimal Code

&#x2609; uses the Unicode hexadecimal value 2609 to display the Sun symbol. The x prefix indicates hexadecimal format.

HTML markup
2

Decimal HTML Code

&#9737; uses the decimal Unicode value 9737 to display the same character. This is one of the most commonly used methods.

HTML markup
3

CSS Entity

\2609 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+2609 in the Miscellaneous Symbols block (U+2600–U+26FF). No named entity.

Use Cases

The Sun symbol (☉) commonly appears in:

🔭 Astronomy

Star charts, planetarium sites, and science docs.

🌤️ Weather Apps

Forecast UIs and sunny-condition indicators.

📚 Education

Solar system lessons and science textbooks.

♓ Astrology

Horoscopes, birth charts, and zodiac content.

⚡ Solar Energy

Renewable energy and sustainability websites.

🎨 Design

Logos, icons, and decorative celestial imagery.

💻 UI Elements

Light mode toggles and brightness indicators.

💡 Best Practices

Do

  • Use &#x2609; or &#9737; for the astronomical sun
  • Pick one style (hex or decimal) per project for consistency
  • Add aria-label="Sun" when the symbol stands alone
  • Test rendering across browsers and fonts
  • Use ☀ instead if you need a weather-style sun icon

Don’t

  • Confuse ☉ (astronomical sun) with ☀ (black sun with rays)
  • Put CSS escape \2609 directly in HTML text nodes
  • Expect a named HTML entity for U+2609—use numeric references
  • Use HTML entities in JS (use \u2609 instead)
  • Overuse the symbol—keep decorative content balanced

Key Takeaways

1

Two HTML references both render ☉

&#x2609; &#9737;
2

For CSS stylesheets, use the escape in the content property

\2609
3

Unicode U+2609 — SUN (astronomical symbol)

4

No named entity—use numeric references or CSS escape

5

Weather UI alternative: ☀ (black sun with rays)

❓ Frequently Asked Questions

Use &#x2609; (hex), &#9737; (decimal), or \2609 in CSS content. There is no named HTML entity. All three produce ☉.
U+2609 (SUN). Miscellaneous Symbols block (U+2600–U+26FF). Hex 2609, decimal 9737.
In astronomy projects, educational content, weather applications, astrological content, solar energy websites, decorative design, and any content representing the sun or solar concepts.
HTML numeric references (&#9737; or &#x2609;) go directly in markup. The CSS escape \2609 is used in stylesheets, typically in the content property of pseudo-elements. Same visual result, different layers of the stack.
Named HTML entities cover common ASCII, Latin-1, and select math symbols. Characters like ☉ in the Miscellaneous Symbols block use numeric hex or decimal references—standard practice for specialized symbolic characters.

Explore More HTML Entities!

Discover 1500+ HTML character references — symbols, math, astronomy, 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