HTML Entity for Star (★)

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

What You'll Learn

How to display the Star (★) in HTML using named, hexadecimal, decimal, and CSS escape methods. This character is U+2605 (BLACK STAR) in the Miscellaneous Symbols block (U+2600–U+26FF)—a filled black star for ratings and decorative design.

Render it with ★, ★, ★, or CSS \2605. For inactive rating stars, pair with white star ☆ (☆, U+2606).

⚡ Quick Reference — Star

Unicode U+2605

Miscellaneous Symbols

Hex Code ★

Hexadecimal reference

HTML Code ★

Decimal reference

Named Entity ★

Most readable option

Reference Table
Name           Value
────────────   ──────────
Unicode        U+2605
Hex code       ★
HTML code      ★
Named entity   ★
CSS code       \2605
Meaning        Black star (filled)
Pair with      U+2606 = white star (☆, ☆)
Block          Miscellaneous Symbols (U+2600–U+26FF)
1

Complete HTML Example

A simple example showing ★ using the named entity, hexadecimal code, decimal HTML code, and a CSS content escape:

html
<!DOCTYPE html>
<html>
<head>
 <style>
  #point::after{
   content: "\2605";
  }
 </style>
</head>
<body>
<p>Rating (named): &starf;&starf;&starf;&starf;&star;</p>
<p>Rating (hex): &#x2605;&#x2605;&#x2605;&#x2606;&#x2606;</p>
<p>Rating (decimal): &#9733;&#9733;&#9733;</p>
<p id="point">Featured </p>
</body>
</html>
Try it Yourself

🌐 Browser Support

Star (★) is supported in all modern browsers when fonts include Miscellaneous Symbols glyphs:

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

👀 Live Preview

See the black star in rating and decorative contexts:

Single symbol
4-star rating ★★★★☆
Named entity &starf; renders as ★
Filled vs outline ★ (filled)  |  ☆ (outline, &star;)
Numeric refs &starf; &#x2605; &#9733; \2605

🧠 How It Works

1

Named HTML Entity

&starf; is the semantic named entity for the filled black star—the most readable option in source HTML.

HTML markup
2

Hexadecimal Code

&#x2605; uses Unicode hexadecimal 2605 to display ★ in HTML markup.

HTML markup
3

Decimal HTML Code

&#9733; uses decimal Unicode value 9733 for the same character.

HTML markup
4

CSS Entity

\2605 is used in CSS stylesheets in the content property of pseudo-elements like ::after.

CSS stylesheet
=

Same visual result

All four methods produce . Unicode U+2605 in Miscellaneous Symbols (U+2600–U+26FF).

Use Cases

Star (★) commonly appears in:

⭐ Rating systems

Review interfaces, feedback forms, and product ratings.

🎨 Decorative content

Logos, banners, headers, and creative design projects.

📱 UI elements

Buttons, badges, and interactive elements with star icons.

🌟 Featured labels

Highlighting premium, favorite, or top-rated items.

📚 Educational content

Tutorials and materials using star symbols.

🌐 Web design

Landing pages and applications with visual star elements.

💡 Best Practices

Do

  • Use &starf; for readable rating markup
  • Pair ★ with ☆ (&star;) for filled vs empty ratings
  • Provide accessible text like “4 out of 5 stars” alongside visual ratings
  • Pick one entity style (named, hex, or decimal) per project
  • Use CSS to size stars consistently in UI components

Don’t

  • Use padded Unicode notation like U+02605—the correct value is U+2605
  • Use CSS \02605 with a leading zero—prefer \2605
  • Confuse ★ (filled) with ☆ (outline) in rating UIs
  • Rely on stars alone without accessible text for screen readers
  • Put CSS escape \2605 in HTML text nodes

Key Takeaways

1

Four HTML/CSS references all render ★

&starf; &#x2605; &#9733;
2

For CSS stylesheets, use \2605 in the content property

3

Unicode U+2605 — BLACK STAR (★)

4

&starf; is the standard named entity for the filled star

5

Previous: Staff Hermes   Next: Star Crescent

❓ Frequently Asked Questions

Use &starf; (named), &#x2605; (hex), &#9733; (decimal), or \2605 in CSS content. All four render ★.
U+2605 (BLACK STAR). Miscellaneous Symbols (U+2600–U+26FF). Hex 2605, decimal 9733, named &starf;.
★ (U+2605, &starf;) is a filled black star. ☆ (U+2606, &star;) is an outlined white star. Rating UIs typically use ★ for active stars and ☆ for inactive ones.
For rating systems, decorative content, special UI elements, visual design, logos, and any content needing filled star imagery or visual indicators.
HTML references (&starf;, &#9733;, or &#x2605;) go in markup. The CSS escape \2605 is used in stylesheets, typically in the content property of ::before or ::after. Same visual result, different layers of the stack.

Explore More HTML Entities!

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