HTML Entity for Comma (,)

What You'll Learn
How to display the Comma (,) in HTML using numeric references, the named entity, and CSS escapes. This character is U+002C (COMMA) in the Basic Latin block (ASCII). It separates items in lists, thousands in numbers (locale-dependent), fields in CSV, and arguments in programming syntax.
You can use the named entity ,, hex ,, decimal ,, or CSS \2C. You can usually type , directly on the keyboard; entities help when escaping or referencing explicitly. Do not confuse , with Colon U+003A (:) or combining comma diacritics U+0312–U+0326.
⚡ Quick Reference — Comma
U+002CBasic Latin / ASCII
,Hexadecimal reference
,Decimal reference
,Standard HTML entity
Name Value
──────────── ──────────
Unicode U+002C
Hex code ,
HTML code ,
Named entity ,
CSS code \2CComplete HTML Example
This example demonstrates the Comma (,) using hexadecimal code, decimal HTML code, the named entity ,, and a CSS content escape:
<!DOCTYPE html>
<html>
<head>
<style>
#point:after{
content: "\2C";
}
</style>
</head>
<body>
<p>Comma using Hexa Decimal: ,</p>
<p>Comma using HTML Code: ,</p>
<p>Comma using HTML Entity: ,</p>
<p id="point">Comma using CSS Entity: </p>
</body>
</html>🌐 Browser Support
U+002C is universally supported in all browsers:
👀 Live Preview
See the Comma in common contexts:
🧠 How It Works
Hexadecimal Code
, references code point U+002C using hex digits 2C.
Decimal HTML Code
, is the decimal equivalent (44) for the same character.
Named HTML Entity
, is the standard named entity for U+002C—readable when escaping punctuation in HTML.
CSS Entity
\2C is the CSS escape for U+002C, used in the content property of ::before or ::after.
Same visual result
All four methods produce the Comma glyph: ,. Unicode U+002C is basic ASCII punctuation.
Use Cases
The Comma (,) commonly appears in:
Inline lists, series, and enumerated items in prose.
Thousands separators in many locales (e.g. 1,000,000).
Field separators in CSV, TSV, and tabular data formats.
Function arguments, arrays, and object literals in code examples.
Programmatic output when the character must be escaped.
Punctuation and character entity glossaries.
Screen readers treat commas as pauses in natural sentence flow.
💡 Best Practices
Do
- Type
,directly for normal prose and lists - Use
,when escaping in tutorials or generated HTML - Keep entity style consistent when using references
- Use
\2Conly inside CSScontent - Respect locale rules for number formatting (comma vs period)
Don’t
- Confuse punctuation comma (,) with colon (:) or semicolon (;)
- Confuse with combining comma marks (U+0312–U+0326)
- Over-escape every comma when plain typing works fine
- Put CSS escape
\2Cin HTML text nodes - Mix entity styles randomly in one file
Key Takeaways
Named entity for escaping
,Numeric references also render ,
, ,For CSS stylesheets, use the escape in the content property
\2CU+002C COMMA (ASCII punctuation)
Four methods, one glyph — universally supported
❓ Frequently Asked Questions
, (named entity), , (hex), , (decimal), or \2C in CSS content. You can also type , directly on the keyboard.U+002C (COMMA). Basic Latin / ASCII. Hex 2C, decimal 44.,, ,, or ,) go directly in markup. The CSS escape \2C is used in stylesheets, typically in the content property of pseudo-elements., is the named entity for U+002C in HTML5. It is well supported and easy to remember when you need to escape the punctuation comma.Explore More HTML Entities!
Discover 1500+ HTML character references — math operators, symbols, arrows, and more.
8 people found this page helpful
