HTML Entity for At Symbol (@)

Beginner
⏱️ 5 min read
📚 Updated: May 2026
🎯 1 Code Example
Unicode U+0040

What You'll Learn

How to display the commercial at sign (@, Unicode U+0040) in HTML. It sits in Basic Latin (ASCII) and is required for email addresses (user@example.com), social mentions (@handle), and many programming notations (decorators, annotations, and more).

You can write a literal @ in UTF-8 HTML in most cases, or use @, @, @, or \0040 / \40 in CSS content when you need an explicit escape (for example inside some template languages where @ is special).

⚡ Quick Reference — At Symbol

Unicode U+0040

Basic Latin (ASCII)

Hex Code @

Hexadecimal reference

HTML Code @

Decimal reference

Named Entity @

HTML5 named reference

CSS Code \0040

Also \40 (shorter escape)

Reference Table
Name           Value
────────────   ──────────
Unicode        U+0040
Hex code       @
HTML code      @
Named entity   @
CSS code       \0040  (or \40)
1

Complete HTML Example

This example shows U+0040 using hexadecimal, decimal, the commat named reference, and a CSS content escape:

html
<!DOCTYPE html>
<html>
<head>
 <style>
  #point:after{
   content: "\0040";
  }
 </style>
</head>
<body>

<p>At Symbol using Hexa Decimal: &#x40;</p>
<p>At Symbol using HTML Code: &#64;</p>
<p>At Symbol using HTML Entity: &commat;</p>
<p id="point">At Symbol using CSS Entity: </p>

</body>
</html>

The named entity is written as &commat; so it displays as copyable &commat; in this listing without being parsed by the surrounding page.

Try It Yourself

🌐 Browser Support

The commat named reference and numeric forms for U+0040 are supported everywhere ASCII is supported:

Chrome 1+
Firefox 1+
Safari 1+
Edge 12+
Opera 4+
Android 4.4+
iOS Safari 1+

👀 Live Preview

Common patterns (always validate mailto: links and user-generated handles on the server):

Literal @
Email snippet hello@example.com · same as hello@example.com
Mention Thanks @codetofun for the tip.
Monospace U+0040 COMMERCIAL AT

🧠 How It Works

1

Named entity

&commat; (ampersand + commat + semicolon) is the HTML5 named character reference for U+0040.

HTML markup
2

Hexadecimal code

&#x40; uses the Unicode hexadecimal value 40 (one byte in ASCII).

HTML markup
3

Decimal HTML code

&#64; is the classic ASCII decimal code for the at sign.

HTML markup
4

CSS escape

\0040 or \40 in content emits U+0040 from a stylesheet.

CSS stylesheet
=

Same visual result

All paths expose U+0040COMMERCIAL AT. A plain @ in UTF-8 source is usually the simplest choice.

Use Cases

The at sign is everywhere in modern text and code:

📧 Email

Contact pages, footers, and mailto: links (user@domain when you need entities in markup).

📱 Social mentions

Handles and attribution lines on blogs and community sites.

💻 Programming docs

Decorators, annotations, and shell prompts shown in HTML examples.

📝 Forms

Placeholders and hints for email fields (name@company.com).

🔒 Templates

When @ triggers framework syntax, &commat; can output a literal sign.

♿ Accessibility

Use visible labels like “Email” so the @ is not the only cue.

🌐 Global content

Same code point and meaning across Latin-based locales.

💡 Best Practices

Do

  • Use a literal @ in UTF-8 HTML when no framework conflict exists
  • Switch to &commat; when your toolchain treats @ as syntax
  • Keep mailto: hrefs RFC-safe and validate addresses server-side
  • Use \0040 or \40 only inside CSS content strings
  • Sanitize user-supplied handles and emails before echoing them into HTML

Don’t

  • Obfuscate email with broken patterns that harm accessibility unless you also offer a plain contact path
  • Assume &commat; inside mailto: attributes without testing (prefer literal @ in the URI)
  • Double-encode entities inside generated JSON or URLs
  • Use CSS escapes inside raw HTML text nodes

Key Takeaways

1

Named + numeric ways to write U+0040

&commat; &#64; &#x40;
2

CSS content escape

\0040
3

Unicode U+0040 — COMMERCIAL AT

4

ASCII / Basic Latin — universal font coverage

5

Literal @ is usually enough; entities help when escaping matters

❓ Frequently Asked Questions

Use &commat; (named), &#x40; (hex), &#64; (decimal), or a literal @ in UTF-8. In CSS content, use \0040 or \40.
COMMERCIAL AT at U+0040 (decimal 64).
When a template or preprocessor reserves @, or when you want the character spelled out explicitly in generated markup. Otherwise UTF-8 literal is standard.
Markup uses &commat;, &#64;, or &#x40; in HTML. CSS uses backslash escapes inside content. Same glyph, different layer.
Yes: &commat; maps to U+0040.

Explore More HTML Entities!

Discover 1500+ HTML character references — currency symbols, arrows, math operators, emojis, and more.

All HTML Entities →

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