HTML Entity for Shamrock (☘)

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

What Is the Shamrock Entity?

Shamrock (☘) is the Miscellaneous Symbols character at Unicode U+2618 (SHAMROCK). It is a three-leaf clover — a traditional Irish symbol used for St. Patrick’s Day and heritage design.

Remember
Character     ☘
Unicode       U+2618
Hex entity    ☘
Decimal       ☘
Named entity  (none)
CSS escape    \2618
Not the same  🍀 (four-leaf clover emoji)

Hex, decimal, CSS, and a typed character all produce the same glyph: ☘. Prefer ☘ when you want an explicit entity. For another Miscellaneous Symbols icon, see Scales (U+2696).

Quick Reference

One table for every form you will actually use.

FormCodeWhere it goes
Hex entity☘HTML markup (best entity default)
Decimal entity☘HTML markup
Named entityNoneHTML5 does not define one
CSS escape\2618Stylesheet content
Direct character☘UTF-8 HTML text

When to Use Which

SituationUse
Shamrock (three-leaf)☘ or ☘
St. Patrick’s Day / Irish UI☘ plus visible label text
Generated text via ::before / ::aftercontent: "\2618"
Four-leaf clover (luck emoji)Use U+1F340 (🍀) — not this entity
Balance / justice symbolUse Scales (U+2696)

Live Preview

Shamrock in festive and cultural contexts, compared with the four-leaf clover emoji.

Greeting ☘ Happy St. Patrick’s Day!
Large glyph ☘
Hex entity ☘ → ☘
vs four-leaf ☘  |  🍀
With entities Hex: ☘ | Decimal: ☘

Complete HTML Example

One page that shows this symbol with hex, decimal, and CSS. Use View Output or open the live editor.

Hex + Decimal + CSS

Three ways to produce ☘ in a single document (no named entity).

html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Shamrock (☘)</title>
  <style>
    #point::after {
      content: "\2618";
    }
  </style>
</head>
<body>
  <p>Using Hex Code: &#x2618;</p>
  <p>Using HTML Code: &#9752;</p>
  <p id="point">Using CSS Entity: </p>
  <p>&#x2618; Happy St. Patrick&rsquo;s Day!</p>
</body>
</html>
Try It Yourself

How It Works

1. Hex: U+2618 → &#x2618; in HTML. The browser turns it into ☘.

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

3. Named: HTML5 does not define a named entity for this character — use hex or decimal instead.

4. CSS: use \2618 in content (not an HTML entity). #point::after appends that ☘ after the paragraph text.

Pitfalls & Tips

Common mistakes when working with Shamrock.

Look-alikes

☘ ≠ 🍀

U+2618 is a three-leaf shamrock. U+1F340 is the four-leaf clover emoji — do not mix them if you mean Irish heraldry.

Named

No &…; name

Do not invent a name like &shamrock;. Use &#x2618; or &#9752;.

A11y

Add context

A lone ☘ may be unclear. Pair it with text such as “St. Patrick’s Day” or an accessible name.

Fonts

Glyph coverage

Miscellaneous Symbols coverage varies. Test festive UIs on mobile and provide a fallback if ☘ is missing.

CSS vs HTML

Do not mix escapes

\2618 belongs in CSS. &#x2618; / &#9752; belong in HTML.

Semicolon

End references

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

Browser Support

Shamrock (U+2618) and its entity forms (&#x2618;, &#9752;, CSS \\2618) are supported in all modern browsers. Glyph coverage depends on the font.

✓ Universal encoding

Shamrock (☘)

Encode with hex, decimal, or CSS escape — or type ☘ directly in UTF-8 HTML. No named entity.

100% Browser coverage
Google Chrome Supported
Yes
Microsoft Edge Supported
Yes
Mozilla Firefox Supported
Yes
Apple Safari Supported
Yes
Opera Supported
Yes
Internet Explorer IE 9+
Yes*
U+2618 Full support

Bottom line: Prefer &#x2618; for readable HTML. Use \\2618 only inside CSS content. Remember: three leaves, not four.

Key Takeaways

  • Unicode: this symbol is U+2618 (decimal 9752) — shamrock (three-leaf).
  • HTML: prefer &#x2618; — or use &#9752;. No named entity.
  • CSS: use \2618 inside content for festive markers.
  • Watch out: not the same as four-leaf clover emoji (U+1F340).

One line: U+2618 → &#x2618; / &#9752; / CSS \2618 (no named entity).

Frequently Asked Questions

Use &#x2618; (hex), &#9752; (decimal), or the CSS escape \2618 in the content property. All render ☘ when the font supports Miscellaneous Symbols. There is no named HTML entity.
U+2618 (SHAMROCK). Hex 2618, decimal 9752. It belongs to Miscellaneous Symbols (U+2600–U+26FF). It is a three-leaf clover associated with Ireland and St. Patrick’s Day.
No. HTML5 does not define a named entity for U+2618. Use numeric references like &#x2618; or &#9752;.
No. U+2618 is SHAMROCK — a three-leaf clover. A four-leaf clover is a different symbol, commonly shown as the emoji U+1F340 (🍀).
Use it for St. Patrick’s Day content, Irish-themed design, cultural celebrations, festive pages, and heritage sites. Pair the glyph with visible text for accessibility.
HTML entities (&#9752; or &#x2618;) go in markup. The CSS escape \2618 is used in stylesheets (usually in the content property of ::before/::after). Both render ☘.

Did you know?

Shamrock is Unicode U+2618 (decimal 9752) — SHAMROCK in Miscellaneous Symbols. HTML5 has no named entity — use &#x2618; or &#9752;. It is a three-leaf clover — not the four-leaf clover emoji (U+1F340).

Next: Short Right Arrow Above Left Arrow

Learn the HTML entity for Short Right Arrow Above Left Arrow — next in this sequence.

Continue tutorial →

CODETOFUN NEWS

Stay Ahead in Tech

Get the latest IT news, programming updates, and technology trends directly on your phone.

Your daily dose of tech, straight to your feed.

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