HTML Entity for Mars (♂)

What You'll Learn
How to display the Mars symbol (♂) in HTML using hexadecimal, decimal, and CSS escape methods. The symbol denotes the planet Mars in astronomy and astrology.
It is U+2642 (JUPITER) in the Miscellaneous Symbols block (U+2600–U+26FF). Use ♂, ♂, or CSS \2642. There is no named HTML entity for this character.
⚡ Quick Reference — Mars Symbol
U+2642Miscellaneous Symbols
♂Hexadecimal reference
♂Decimal reference
—Use numeric codes only
Name Value
──────────── ──────────
Unicode U+2642
Hex code ♂
HTML code ♂
Named entity (none)
CSS code \2642
Meaning Planet Mars (♂)
Glyph ♂
Example Planets: ♂ Mars Complete HTML Example
This example shows the Mars symbol (U+2642) using hexadecimal code, decimal HTML code, and a CSS content escape. This character has no named HTML entity:
<!DOCTYPE html>
<html>
<head>
<style>
#point:after{
content: "\2642";
}
</style>
</head>
<body>
<p>Mars using Hexadecimal: ♂</p>
<p>Mars using Decimal: ♂</p>
<p id="point">Mars using CSS Entity: </p>
</body>
</html> 🌐 Browser Support
The Mars symbol (♂) is widely supported when fonts include Miscellaneous Symbols (U+2600–U+26FF):
👀 Live Preview
See the Mars symbol (♂) in astronomy and astrology contexts:
🧠 How It Works
Hexadecimal Code
♂ uses the Unicode hexadecimal value 2642 to display the Mars symbol (♂).
Decimal HTML Code
♂ uses the decimal Unicode value 9794 for the same character.
CSS Entity
\2642 is used in CSS stylesheets in the content property, often on ::after following a base character in markup.
No Named Entity
U+2642 has no standard &...; named form. Use hex, decimal, or CSS escape only.
Same visual result
All three methods produce ♂ (♂). Unicode U+2642 is in Miscellaneous Symbols. Next: Kelvin Sign.
Use Cases
The Mars symbol (♂) is commonly used in:
Planet lists, solar system content, and space education with ♂.
Horoscopes, birth charts, and zodiac content using the Mars symbol.
STEM textbooks and tutorials covering planets and symbols.
Planet tables, infographics, and encyclopedic content.
Logos, icons, and UI that need the Mars (♂) character.
Character pickers and Unicode reference for planet symbols.
💡 Best Practices
Do
- Use
♂or♂in HTML content - Use fonts that support Miscellaneous Symbols (U+2642)
- Set
<meta charset="utf-8"> - Pick one numeric style per project
- Add
aria-labelor nearby text (e.g. “Mars”) for accessibility
Don’t
- Expect a named HTML entity for U+2642
- Use CSS
\2642inside HTML text nodes - Use fonts without Miscellaneous Symbols support
- Mix entity styles randomly in one file
Key Takeaways
Two HTML numeric references plus CSS for U+2642
♂ ♂For CSS, use \2642 in the content property
Unicode U+2642 — JUPITER
Miscellaneous Symbols block; glyph ♂ (♂)
Previous: Latin Small Letter Iota Next: Kelvin Sign
❓ Frequently Asked Questions
♂ (hex), ♂ (decimal), or \2642 in CSS content. There is no named entity. All methods render ♂ (♂) when the font supports U+2642.U+2642 (JUPITER). Miscellaneous Symbols block (U+2600–U+26FF). Hex 2642, decimal 9794. Used in astronomy and astrology for the planet Mars.♂ or ♂) go in markup. The CSS escape \2642 is used in stylesheets, typically on ::before or ::after. Both render ♂ (♂).Explore More HTML Entities!
Discover 1500+ HTML character references — planet symbols, math, science, and more.
8 people found this page helpful
