HTML Entity for Uppercase X (X)

What You'll Learn
How to display the uppercase letter X in HTML using entity methods and direct character input. The letter X is the twenty-fourth letter of the modern English/Latin alphabet (U+0058) and is part of the Basic Latin block. It appears in acronyms (XML, XHTML, XSS), UI labels (close buttons), algebra (unknown variables), coordinates, and any text that requires capitalization. In most cases you can type it directly; numeric or CSS entities are useful when escaping, generating content via CSS, or ensuring correct encoding.
This character can be displayed using the character itself, a hexadecimal reference, a decimal reference, or a CSS escape in the content property. There is no named HTML entity like &X; for this letter.
⚡ Quick Reference — Uppercase X Entity
U+0058Basic Latin (ASCII)
XHexadecimal reference
XDecimal reference
XType directly (no named entity)
Name Value
──────────── ──────────
Unicode U+0058
Hex code X
HTML code X
Named entity (none — use X directly)
CSS code \0058
Meaning Latin capital letter X
Related U+0078 = x (lowercase)
Block Basic Latin (U+0000–U+007F)Complete HTML Example
A simple example showing the uppercase letter X using hexadecimal code, decimal HTML code, the character directly, and a CSS content escape:
<!DOCTYPE html>
<html>
<head>
<style>
#letter:after{
content: "\0058";
}
</style>
</head>
<body>
<p>Symbol (hex): X</p>
<p>Symbol (decimal): X</p>
<p>Symbol (direct): X</p>
<p id="letter">Symbol (CSS): </p>
</body>
</html>🌐 Browser Support
The uppercase letter X (U+0058) is universally supported in all browsers and platforms as part of Basic Latin:
👀 Live Preview
See the uppercase letter X in common text contexts:
🧠 How It Works
Hexadecimal Code
X uses the Unicode hexadecimal value 58 to display the letter. The x prefix indicates hexadecimal format.
Decimal HTML Code
X uses the decimal Unicode value 88 to display the same character. This is the ASCII/Unicode decimal for X.
Direct Character
Type X directly in HTML. There is no named entity like &X;; the character itself is the standard approach in body text.
CSS Entity
\0058 is used in CSS stylesheets, particularly in the content property of pseudo-elements like ::before and ::after.
Same visual result
All methods produce the glyph: X. Unicode U+0058 sits in Basic Latin. The lowercase form is U+0078 (x). In normal text, typing X is preferred over numeric entities.
Use Cases
The uppercase letter X (or its entity forms) is commonly used in:
Sentence starts, proper nouns, and titles where the letter X begins a word.
Close buttons, dismiss icons, and interface elements that use X as a symbol (with accessible labels).
Abbreviations such as XML, XHTML, XSS, and Xbox where X appears in the name.
Tutorials, API docs, and code samples that show the character X as an entity or escape.
Unknown variables, coordinates (X-axis), and scientific notation in educational content.
When building HTML in code, using X or X ensures correct output regardless of encoding context.
Using \0058 in the CSS content property to insert X via pseudo-elements.
💡 Best Practices
Do
- Type
Xdirectly in body content; use entities only when necessary - Serve pages as UTF-8 so Basic Latin characters render without entities
- Use numeric references (
XorX) when escaping is required - Use
\0058in CSScontentwhen generating the letter via pseudo-elements - Add accessible labels (e.g.
aria-label="Close") when X is used as a close icon
Don’t
- Overuse numeric entities for
Xin normal readable text - Expect a named HTML entity like
&X;—none exists for this letter - Use
\00058in CSS—the correct escape is\0058 - Confuse plain
X(U+0058) with the XOR symbol ⊻ (U+22BB) - Put CSS escape
\0058in HTML text nodes
Key Takeaways
Type X directly, or use hex/decimal references
X XFor CSS stylesheets, use the escape in the content property
\0058Unicode U+0058 — LATIN CAPITAL LETTER X
Twenty-fourth letter of the modern English/Latin alphabet (Basic Latin block)
Previous: Uppercase Wynn (Ƿ) Next: Uppercase Y (Y)
❓ Frequently Asked Questions
X directly, or use X (hex), X (decimal), or \0058 in CSS content. There is no named HTML entity for X. For most content, typing X is standard; use numeric or CSS entities when escaping or generating via CSS.U+0058 (LATIN CAPITAL LETTER X). Basic Latin block. Hex 58, decimal 88. It is the twenty-fourth letter of the modern English/Latin alphabet and a standard character in virtually all Western scripts.X or X, or the CSS entity \0058. In UTF-8 pages you can type X directly.X or X) is used in HTML content; CSS entity \0058 is used in stylesheets in the content property of pseudo-elements. Both produce the character X.Explore More HTML Entities!
Discover 1500+ HTML character references — letters, symbols, and more.
8 people found this page helpful
