HTML Entity for Diamond Operator (⋄)

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

What Is Diamond Operator?

Diamond operator (⋄) is the Unicode character at U+22C4 in the Mathematical Operators block. Official name: DIAMOND OPERATOR. It appears in math and modal logic (often for possibility), and as a custom operator symbol.

Remember
Character     ⋄
Unicode       U+22C4
Named entity  ⋄
Hex entity    ⋄
Decimal       ⋄
CSS escape    \22C4
Not the same  ♦ · ◊ · ⋅

Prefer ⋄ in HTML markup. You can also type ⋄ in UTF-8, or use numeric forms when needed.

Quick Reference

One table for every form you will actually use.

FormCodeWhere it goes
Named entity⋄HTML markup (preferred)
Direct character⋄HTML text (UTF-8)
Hex entity⋄HTML markup
Decimal entity⋄HTML markup
CSS escape\22C4Stylesheet content

When to Use Which

SituationUse
Math / logic diamond operator⋄ or type ⋄
Card suit diamond♦ / ♦
Lozenge (hollow diamond)◊ / ◊
Dot operator (related math)⋅ / ⋅
Generated text via ::before / ::aftercontent: "\22C4"

Live Preview

Diamond operator rendered in common math and logic contexts.

Logic ⋄ p
Large glyph ⋄
Binary use a ⋄ b
Compared ⋄   ♦   ◊   ⋅
With entities Named: ⋄ | Hex: ⋄ | Decimal: ⋄

Complete HTML Example

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

Named + Hex + Decimal + CSS + Typed

Five ways to produce ⋄ in a single document.

html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Diamond Operator (⋄) in HTML</title>
  <style>
    #point::after {
      content: "\22C4";
    }
  </style>
</head>
<body>
  <p>Diamond using Named Entity: &diamond;</p>
  <p>Diamond using Hex Code: &#x22C4;</p>
  <p>Diamond using HTML Code: &#8900;</p>
  <p id="point">Diamond using CSS Entity: </p>
  <p>Typed directly: ⋄</p>
  <p>Logic: &diamond; <em>p</em></p>
</body>
</html>
Try It Yourself

How It Works

1. Named: &diamond; is the HTML5 name for U+22C4 → ⋄. Best default in markup.

2. Hex: U+22C4 → &#x22C4; in HTML. Same glyph as the named form.

3. Decimal: same code point as 8900 → &#8900;. Same result as hex and named.

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

5. Typed / logic: paste ⋄ in UTF-8, or write &diamond; <em>p</em> for a simple modal-logic style example.

Pitfalls & Tips

Common mistakes when working with Diamond Operator.

♦

Not the card suit

&diams; / ♦ is the black diamond suit. For the math operator, use &diamond; (⋄).

◊

Not the lozenge

&loz; (◊) is a hollow geometric lozenge — a different character from U+22C4.

Name

Use &diamond;

There is no &diamondop;. The HTML5 name for U+22C4 is &diamond;.

CSS vs HTML

Do not mix escapes

\22C4 belongs in CSS strings. &diamond; / &#x22C4; / &#8900; belong in HTML.

Fonts

Math font coverage

Some fonts omit U+22C4. Prefer a font with Mathematical Operators coverage for display.

Semicolon

End references

Always finish with ; — write &diamond;, not &diamond.

Browser Support

Diamond operator (U+22C4) and its entity forms (&diamond;, &#x22C4;, &#8900;, CSS \\22C4) are supported in all mainstream browsers. Visible glyphs depend on math font coverage.

✓ Universal support

Diamond Operator (&#x22C4;)

Encode with named, hex, decimal, CSS escape, or type the character — same code point everywhere encoding is supported.

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+22C4 / entities Full support

Bottom line: Prefer &diamond; in HTML. Use &#x22C4; or &#8900; when numeric form is required, and \\22C4 only inside CSS content.

Key Takeaways

  • Unicode: diamond operator is U+22C4 (decimal 8900) — glyph ⋄.
  • HTML: prefer &diamond;, or use &#x22C4; / &#8900; / type ⋄.
  • CSS: use \22C4 inside content for generated text.
  • Meaning: ⋄ is a math/logic operator — not the same as ♦ or ◊.

One line: U+22C4 → &diamond; / &#x22C4; / &#8900; / CSS \22C4 / type ⋄.

Frequently Asked Questions

Use &diamond; (named), &#x22C4; (hex), &#8900; (decimal), type ⋄ directly in UTF-8, or the CSS escape \22C4 in content. Prefer &diamond; in normal HTML.
U+22C4 (DIAMOND OPERATOR). Hex 22C4, decimal 8900. It belongs to the Mathematical Operators block (U+2200–U+22FF).
Yes. Use &diamond; — the preferred form in HTML markup. Numeric forms &#8900; and &#x22C4; also work.
Use it in mathematics, modal logic, and related notation when you need the diamond operator (often possibility, or a custom binary operator), not a card-suit diamond.
HTML entities (&diamond;, &#8900;, or &#x22C4;) go in markup. The CSS escape \22C4 goes in stylesheet strings (usually content on ::before/::after).
No. &diamond; is U+22C4 (diamond operator ⋄). &diams; / &diamondsuit; is U+2666 (black diamond suit ♦). Use the operator for math; use the suit for cards or decoration.

Did you know?

Diamond operator is Unicode U+22C4 (decimal 8900) — glyph ⋄ in the Mathematical Operators block. HTML5 names it &diamond;. It is a math/logic operator, not the card suit diamond ♦ (&diams;) or the lozenge ◊ (&loz;).

Next: Die Face 1

Learn the HTML entity for die face 1 (U+2680).

Die Face 1 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