HTML Entity for XOR (⊻)

What You'll Learn
How to display the XOR symbol (⊻) in HTML using various entity methods. The XOR symbol (veebar) represents the exclusive OR logical operation and is essential for programming documentation, mathematical expressions, Boolean algebra, and technical content.
This character is part of the Mathematical Operators Unicode block and can be rendered with a hexadecimal reference, a decimal reference, the named entity ⊻, or a CSS escape in the content property.
⚡ Quick Reference — XOR Entity
U+22BBMathematical Operators block
⊻Hexadecimal reference
⊻Decimal reference
⊻Most readable option
Name Value
──────────── ──────────
Unicode U+22BB
Hex code ⊻
HTML code ⊻
Named entity ⊻
CSS code \22BBComplete HTML Example
This example demonstrates the XOR symbol (⊻) using hexadecimal code, decimal HTML code, and a CSS content escape on a pseudo-element:
<!DOCTYPE html>
<html>
<head>
<style>
#point:after{
content: "\22BB";
}
</style>
</head>
<body>
<p>XOR using Hexa Decimal: ⊻</p>
<p>XOR using HTML Code: ⊻</p>
<p id="point">XOR using CSS Entity: </p>
</body>
</html>🌐 Browser Support
The XOR entity is universally supported in all modern browsers:
👀 Live Preview
See the XOR symbol rendered live in different contexts:
🧠 How It Works
Hexadecimal Code
⊻ uses the Unicode hexadecimal value 22BB to display the XOR symbol. The x prefix indicates hexadecimal format.
Decimal HTML Code
⊻ uses the decimal Unicode value 8891 to display the same character. This is one of the most commonly used methods.
CSS Entity
\22BB is used in CSS stylesheets, particularly in the content property of pseudo-elements like ::before and ::after.
Named Entity
⊻ is the semantic named entity — the easiest to read in source HTML and the most self-descriptive option.
Same visual result
All four methods produce the XOR glyph: ⊻. Unicode U+22BB sits in the Mathematical Operators block (U+2200–U+22FF).
Use Cases
The XOR symbol (⊻) commonly appears in the following scenarios:
Describe XOR in prose next to code (e.g. A ⊻ B).
Exclusive OR in formulas where ⊻ is the standard operator.
Truth tables, lecture notes, and logic simplification examples.
Logic gate docs and educational content on digital design.
Explain stream ciphers, one-time pads, and XOR-based patterns.
CS courses, textbooks, and interactive tutorials.
Bitwise tricks, hashing, checksums, and algorithms using XOR.
💡 Best Practices
Do
- Use
⊻for readable source markup - Pick one style (hex / decimal / named) per project
- Add
aria-labelfor standalone symbols - Test the glyph across browsers and devices
- Pair ⊻ with plain text on first use
Don’t
- Mix entity styles randomly in one file
- Assume all fonts render ⊻ correctly
- Use CSS escape
\22BBinside HTML - Use HTML entities in JS (use
\u22BB) - Confuse ⊻ (XOR) with ∧ (AND) or ∨ (OR)
Key Takeaways
Three HTML references all render ⊻
⊻ ⊻ ⊻For CSS stylesheets, use the escape in the content property
\22BBUnicode U+22BB belongs to the Mathematical Operators block (U+2200–U+22FF)
Prefer ⊻ for readability—it’s the most self-descriptive named entity
Always pair the symbol with explanatory text the first time you use it on a page
❓ Frequently Asked Questions
⊻ (hex), ⊻ (decimal), ⊻ (named), or \22BB in CSS content. All produce ⊻.U+22BB (hex 22BB, decimal 8891). It denotes exclusive OR in the Mathematical Operators block.⊻ or ⊻) go directly in markup. The CSS escape \22BB is used in stylesheets, typically in the content property of ::before or ::after. Same visual result, different layers of the stack.⊻, ⊻, and ⊻ are equivalent in modern browsers and all render ⊻.Explore More HTML Entities!
Discover 1500+ HTML character references — currency symbols, arrows, math operators, emojis, and more.
8 people found this page helpful
