HTML Entity for Comma (,)

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

What Is the Comma Entity?

Comma (,) is the Unicode character at U+002C — the standard ASCII comma. It separates items in lists, appears in numbers (locale-dependent), and is used in CSV-style text and many programming languages.

Remember
Character     ,
Unicode       U+002C
Hex entity    ,
Decimal       ,
Named entity  ,
CSS escape    \2C

All of these produce the same glyph: ,. Prefer typing , in everyday HTML; use , when you want the named reference explicit.

Quick Reference

One table for every form you will actually use.

FormCodeWhere it goes
Direct character,HTML text (UTF-8) — usual choice
Named entity,HTML markup
Hex entity,HTML markup
Decimal entity,HTML markup
CSS escape\2CStylesheet content

When to Use Which

SituationUse
Normal HTML / proseType , (simplest)
Want a named reference,
Generated / numeric-only markup, or ,
Generated text via ::before / ::aftercontent: "\2C"
Comma as a combining diacriticU+0313 — not ASCII ,

Live Preview

Comma rendered in common writing contexts.

Inline text apples, oranges, pears
Large glyph ,
Compared ,   ;   .
Monospace a,b,c
With entities Named: , | Hex: , | Decimal: ,

Complete HTML Example

One page that shows Comma with the named entity, hex entity, decimal entity, 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>Comma (,) in HTML</title>
  <style>
    #point::after {
      content: "\2C";
    }
  </style>
</head>
<body>
  <p>Comma using Named Entity: &comma;</p>
  <p>Comma using Hex Code: &#x2C;</p>
  <p>Comma using HTML Code: &#44;</p>
  <p id="point">Comma using CSS Entity: </p>
  <p>Typed directly: ,</p>
</body>
</html>
Try It Yourself

How It Works

1. Named: &comma; is the HTML5 named reference for U+002C → ,.

2. Hex: U+002C → &#x2C; in HTML. Same glyph as the named form.

3. Decimal: same code point as 44 → &#44;. Same result as hex.

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

5. Typed ,: the usual choice in UTF-8 pages. All five lines show the same glyph.

Pitfalls & Tips

Common mistakes when working with Comma entities.

Default

Just type it

In normal HTML you almost never need an entity for comma — type , directly.

CSS vs HTML

Do not mix escapes

\2C belongs in CSS. &comma; / &#x2C; / &#44; belong in HTML.

, vs ;

Different punctuation

Comma is , (U+002C). Semicolon is ; (U+003B).

Diacritic

Not combining comma above

Combining comma above (U+0313) attaches to a base letter. ASCII , is a spacing separator.

Semicolon

End references

Always finish entities with ; — write &comma; and &#44;, not bare forms.

CSS tip

Short hex escapes

In CSS, \2C is fine when followed by a non-hex character (or use \002C). Avoid gluing hex digits to the next token.

Browser Support

Comma (U+002C) and its entity forms (&comma;, &#x2C;, &#44;, CSS \\2C) are supported in all mainstream browsers.

✓ Universal support

Comma (,)

Type ,, or encode with named, hex, decimal, or CSS escape — same glyph 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+002C / entities Full support

Bottom line: Prefer typing , for everyday text. Use &comma; when you want a named form, and \\2C only inside CSS content.

Key Takeaways

  • Unicode: comma is U+002C (decimal 44).
  • HTML: type ,, or use &comma; / &#x2C; / &#44;.
  • CSS: use \2C inside content for generated text.
  • Watch out: , ≠ ; ≠ U+0313 (comma ≠ semicolon ≠ combining comma).

One line: U+002C → type , / &comma; / &#44; / CSS \2C.

Frequently Asked Questions

Type , directly in UTF-8 HTML, or use &#x2C; (hex), &#44; (decimal), &comma; (named), or the CSS escape \2C in the content property. All render ,.
U+002C (hex 2C, decimal 44). It is the standard ASCII comma character.
Yes. &comma; is the HTML5 named reference for ,. Numeric forms &#44; and &#x2C; also work.
Use it in lists, decimal-style numbers (locale-dependent), CSV-style text, and code. Prefer typing , in normal HTML; use &comma; when you want the named form explicit.
HTML entities (&comma;, &#44;, or &#x2C;) go in markup. The CSS escape \2C goes in stylesheet strings (usually content on ::before/::after).
, (U+002C / &comma;) is the ASCII comma. ; (U+003B) is the semicolon. U+0313 is combining comma above — a diacritic that attaches to a base letter, not a spacing comma.

Did you know?

Comma is Unicode U+002C (decimal 44) — the familiar ASCII ,. HTML named reference is &comma;. It is not combining comma above (U+0313) and not semicolon ; (U+003B).

Next: Comma Above

Learn the HTML entity for combining comma above (U+0313).

Comma Above 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