HTML Entity for Colon (:)

Beginner
5 min read
Updated: Sep 2026
1 example
Unicode U+003A

What Is the Colon Entity?

Colon (:) is the Unicode character at U+003A — the standard ASCII colon. It is used for time (12:30), labels (Name:), ratios in plain text, and many programming languages.

Remember
Character     :
Unicode       U+003A
Hex entity    :
Decimal       :
Named entity  :
CSS escape    \3A

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\3AStylesheet content

When to Use Which

SituationUse
Normal HTML / proseType : (simplest)
Want a named reference:
Generated / numeric-only markup: or :
Generated text via ::before / ::aftercontent: "\3A"
Math proportion / ratio marksUse ∷ (∷) or ∶ (∶) — not ASCII :

Live Preview

Colon rendered in common writing contexts.

Inline text Time: 12:30
Large glyph :
Compared :   ∷   ∶   ;
Monospace label: value
With entities Named: : | Hex: : | Decimal: :

Complete HTML Example

One page that shows Colon 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>Colon (:) in HTML</title>
  <style>
    #point::after {
      content: "\3A";
    }
  </style>
</head>
<body>
  <p>Colon using Named Entity: &colon;</p>
  <p>Colon using Hex Code: &#x3A;</p>
  <p>Colon using HTML Code: &#58;</p>
  <p id="point">Colon using CSS Entity: </p>
  <p>Typed directly: :</p>
</body>
</html>
Try It Yourself

How It Works

1. Named: &colon; is the HTML5 named reference for U+003A → :.

2. Hex: U+003A → &#x3A; in HTML. Same glyph as the named form.

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

4. CSS: use \3A 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 Colon entities.

Case

&colon; ≠ &Colon;

Lowercase &colon; is :. Capital &Colon; is proportion ∷ (U+2237).

CSS vs HTML

Do not mix escapes

\3A belongs in CSS. &colon; / &#x3A; / &#58; belong in HTML.

: vs ;

Different punctuation

Colon is : (U+003A). Semicolon is ; (U+003B).

Default

Just type it

In normal HTML you almost never need an entity for colon — type : directly.

Semicolon

End references

Always finish entities with ; — write &colon; and &#58;, not bare forms.

CSS tip

Short hex escapes

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

Browser Support

Colon (U+003A) and its entity forms (&colon;, &#x3A;, &#58;, CSS \\3A) are supported in all mainstream browsers.

✓ Universal support

Colon (:)

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+003A / entities Full support

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

Key Takeaways

  • Unicode: colon is U+003A (decimal 58).
  • HTML: type :, or use &colon; / &#x3A; / &#58;.
  • CSS: use \3A inside content for generated text.
  • Watch out: &colon; ≠ &Colon; (: ≠ ∷).

One line: U+003A → type : / &colon; / &#58; / CSS \3A.

Frequently Asked Questions

Type : directly in UTF-8 HTML, or use &#x3A; (hex), &#58; (decimal), &colon; (named), or the CSS escape \3A in the content property. All render :.
U+003A (hex 3A, decimal 58). It is the standard ASCII colon character.
Yes. &colon; is the HTML5 named reference for :. Note: &Colon; (capital C) is a different character — proportion ∷ (U+2237).
Use it for time (12:30), labels (Name:), ratios in plain text, and code syntax. Prefer typing : in normal HTML; use &colon; when you want the named form explicit.
HTML entities (&colon;, &#58;, or &#x3A;) go in markup. The CSS escape \3A goes in stylesheet strings (usually content on ::before/::after).
: (U+003A / &colon;) is the ASCII colon. ∷ (U+2237 / &Colon;) is PROPORTION. ∶ (U+2236 / &ratio;) is RATIO. Do not confuse &colon; with &Colon;.

Did you know?

Colon is Unicode U+003A (decimal 58) — the familiar ASCII :. HTML named reference is &colon;. It is not &Colon; (capital C), which maps to proportion ∷ (U+2237), and not ratio ∶ (U+2236 / &ratio;).

Next: Colon Equals

Learn the HTML entity for colon equals (U+2254).

Colon Equals tutorial →

CODETOFUN NEWS

Stay Ahead in Tech

Get the latest IT news, programming updates, and technology trends directly on your phone.

Your daily dose of tech, straight to your feed.

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