HTML Entity for Comet (☄)

Beginner
5 min read
Updated: Sep 2026
1 example
Unicode U+2604

What Is the Comet Entity?

Comet (☄) is the Unicode character at U+2604 in the Miscellaneous Symbols block (official name: COMET). It is a simple astronomy / space glyph used in educational pages, labels, and light decorative UI.

Remember
Character     ☄
Unicode       U+2604
Hex entity    ☄
Decimal       ☄
Named entity  (none)
CSS escape    \2604

All of these produce the same glyph: ☄. Prefer a typed ☄ or hex ☄ in hand-written HTML; use decimal when generating numeric-only markup.

Quick Reference

One table for every form you will actually use.

FormCodeWhere it goes
Direct character☄HTML text (UTF-8)
Hex entity☄HTML markup
Decimal entity☄HTML markup
CSS escape\2604Stylesheet content
Named entitynoneUse hex or decimal instead

When to Use Which

SituationUse
Hand-written HTMLType ☄ or use ☄
Generated / numeric-only markup☄ or ☄
Generated text via ::before / ::aftercontent: "\2604"
Sunny weather / sun symbol☀ U+2600
Polished app iconsPrefer SVG or an icon set over the Unicode glyph alone

Live Preview

Comet rendered in common writing contexts.

Inline text ☄ Night sky
Large glyph ☄
Compared ☄   ☀   ✪
Monospace object: ☄ comet
With entities Hex: ☄ | Decimal: ☄

Complete HTML Example

One page that shows Comet with the hex entity, decimal entity, CSS escape, and a typed character. Use View Output or open the live editor.

Hex + Decimal + CSS + Typed

Four ways to produce ☄ in a single document.

html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Comet (☄) in HTML</title>
  <style>
    #point::after {
      content: "\2604";
    }
  </style>
</head>
<body>
  <p>Comet using Hex Code: &#x2604;</p>
  <p>Comet using HTML Code: &#9732;</p>
  <p id="point">Comet using CSS Entity: </p>
  <p>Typed directly: ☄</p>
</body>
</html>
Try It Yourself

How It Works

1. Hex: U+2604 → &#x2604; in HTML. The browser turns it into ☄.

2. Decimal: same code point as 9732 → &#9732;. Same result as hex.

3. CSS: use \2604 in content (not an HTML entity). #point::after appends that ☄ after the paragraph text.

4. Typed ☄: fine in UTF-8 pages. All four lines show the same glyph.

Pitfalls & Tips

Common mistakes when working with Comet entities.

Named?

No named entity

HTML5 does not define a named reference for U+2604. Use &#x2604; or &#9732;.

CSS vs HTML

Do not mix escapes

\2604 belongs in CSS. &#x2604; / &#9732; belong in HTML.

☄ vs ☀

Different characters

☄ is U+2604. Sun ☀ is U+2600.

A11y

Do not rely on the glyph alone

Pair ☄ with text (or an accessible name) so screen-reader users get the same meaning — e.g. “Comet”.

Semicolon

End references

Always finish with ; — write &#9732;, not &#9732.

Fonts

Coverage varies

Some fonts lack ☄. If it falls back to a box, try a font with broader Miscellaneous Symbols coverage or use SVG.

Browser Support

Comet (U+2604) and its entity forms (&#x2604;, &#9732;, CSS \\2604) are supported in all mainstream browsers that handle Unicode. Glyph availability depends on fonts.

✓ Universal support

Comet (☄)

Type ☄, or encode with hex, decimal, or CSS escape — same glyph everywhere encoding and fonts support it.

100% Browser coverage
Google Chrome Supported
Yes
Microsoft Edge Supported
Yes
Mozilla Firefox Supported
Yes
Apple Safari Supported
Yes
Opera Supported
Yes
Internet Explorer All versions
Yes
U+2604 / entities Full support

Bottom line: Prefer &#x2604; or a typed ☄ for simple comet labels. Use decimal when generating markup, and \\2604 only inside CSS content.

Key Takeaways

  • Unicode: comet is U+2604 (decimal 9732).
  • HTML: use &#x2604; or &#9732; (no named entity).
  • CSS: use \2604 inside content for generated text.
  • Watch out: ☄ ≠ ☀ (comet ≠ sun).

One line: U+2604 → &#x2604; / &#9732; / CSS \2604.

Frequently Asked Questions

Use &#x2604; (hex), &#9732; (decimal), or the CSS escape \2604 in the content property. All render ☄. You can also paste ☄ directly when your file is UTF-8. There is no named HTML entity.
U+2604 (hex 2604, decimal 9732). Unicode names it COMET. It belongs to the Miscellaneous Symbols block.
No. HTML5 does not define a named entity for ☄. Use numeric references like &#x2604; or &#9732;.
Use it for astronomy labels, space-themed pages, or simple decorative cues. Prefer SVG icons when you need color, size control, or animation.
HTML entities (&#9732; or &#x2604;) go in markup. The CSS escape \2604 goes in stylesheet strings (usually content on ::before/::after).
☄ (U+2604) is COMET. ☀ (U+2600) is BLACK SUN WITH RAYS — a different astronomy / weather symbol with its own code point.

Did you know?

Comet is Unicode U+2604 (decimal 9732) — official name COMET in the Miscellaneous Symbols block. HTML5 has no named entity. It is an astronomy / space symbol and is not the sun (U+2600 ☀) or a generic star glyph.

Next: Comma

Learn the HTML entity for comma (,).

Comma tutorial →

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