HTML Entity for Number Sign (#)

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

What Is Number Sign?

Number sign (#) is the Unicode character at U+0023 in the Basic Latin (ASCII) block. Official name: NUMBER SIGN. Also known as hash, pound, or octothorpe — used for hashtags, labels, and CSS id selectors.

Remember
Character     #
Unicode       U+0023
Named entity  #
Hex entity    #
Decimal       #
CSS escape    \23
Not the same  № · ♯ · %

Prefer typing # or # in HTML markup. Numeric forms work the same when you need an explicit entity.

Quick Reference

One table for every form you will actually use.

FormCodeWhere it goes
Named entity#HTML markup
Direct character#HTML text (preferred / UTF-8)
Hex entity#HTML markup
Decimal entity#HTML markup
CSS escape\23Stylesheet content

When to Use Which

SituationUse
Hashtags, labels, item numbersType # or #
Numero / “No.” abbreviation№ / №
Music sharp♯ / ♯
Percent% / %
Generated text via ::before / ::aftercontent: "\23" or content: "#"

Live Preview

Number sign rendered in common web and coding contexts.

Hashtag #HTML #WebDev
Large glyph #
Numbering Item #1 • Issue #42
Compared #   №   ♯   %
With entities Named: # | Hex: # | Decimal: #

Complete HTML Example

One page that shows Number Sign with named, hex, decimal, CSS escape, and a typed character. Use View Output or open the live editor.

Named + Hex + Decimal + CSS + Typed

Five ways to produce #, plus a hashtag example.

html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Number Sign (#) in HTML</title>
  <style>
    #point::after {
      content: "\23";
    }
  </style>
</head>
<body>
  <p>Symbol using Named Entity: &num;</p>
  <p>Symbol using Hex Code: &#x23;</p>
  <p>Symbol using HTML Code: &#35;</p>
  <p id="point">Symbol using CSS Entity: </p>
  <p>Typed directly: #</p>
  <p>Example: Tag &num;HTML</p>
</body>
</html>
Try It Yourself

How It Works

1. Named: &num; is the HTML5 name for U+0023 → #. Useful when you want a readable entity.

2. Hex: U+0023 → &#x23; in HTML. Same glyph as the named form.

3. Decimal: same code point as 35 → &#35;. Same result as hex and named.

4. CSS: use \23 in content (not an HTML entity). #point::after appends that # after the paragraph text. You can also write content: "#".

5. Typed / example: paste # in UTF-8, or write &num;HTML for a hashtag-style label.

Pitfalls & Tips

Common mistakes when working with Number Sign.

ASCII

Typing # is fine

Number sign is ASCII. You do not need an entity unless you prefer one for consistency or generated markup.

№

Not the numero sign

№ (&numero;) means “number” / “No.” Use # for hash and labels, not as a substitute for №.

♯

Not music sharp

Formal music notation uses ♯ (&sharp;). Do not replace it with # in scores or theory text.

CSS vs HTML

Do not mix escapes

\23 belongs in CSS strings. &num; / &#x23; / &#35; belong in HTML.

Selectors

Id selectors vs the glyph

In CSS, #header starts an id selector. That is syntax, not the character entity. Document the glyph with entities or a typed # in prose.

Semicolon

End references

Always finish named/numeric forms with ; — write &num;, not &num.

Browser Support

Number sign (U+0023) and its entity forms (&num;, &#x23;, &#35;, CSS \\23) are supported in all mainstream browsers. As ASCII, the glyph is available in essentially every font.

✓ Universal support

Number Sign (#)

Encode with named, hex, decimal, CSS escape, or type the character — same code point 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+0023 / entities Full support

Bottom line: Prefer typing # or &num; in HTML. Use &#x23; or &#35; when numeric form is required, and \\23 only inside CSS content.

Key Takeaways

  • Unicode: number sign is U+0023 (decimal 35) — glyph #.
  • HTML: type #, or use &num; / &#x23; / &#35;.
  • CSS: use \23 or "#" inside content for generated text.
  • Meaning: # = hash / number sign — not № or ♯.

One line: U+0023 → type # / &num; / &#x23; / &#35; / CSS \23.

Frequently Asked Questions

Type # directly, or use &num; (named), &#x23; (hex), &#35; (decimal), or the CSS escape \23 in content. Prefer typing # or &num; in normal HTML.
U+0023 (NUMBER SIGN). Hex 23, decimal 35. It belongs to the Basic Latin (ASCII) block (U+0000–U+007F).
Yes. Use &num;. Numeric forms &#35; and &#x23; also work. Typing # is fine in UTF-8 documents.
Use it for hashtags, item or issue numbers (Item #1), CSS id-selector docs, and any text that needs the hash or pound symbol.
HTML entities (&num;, &#35;, or &#x23;) go in markup. The CSS escape \23 goes in stylesheet strings (usually content on ::before/::after).
No. # is U+0023 (number sign). № is U+2116 (numero sign). ♯ is U+266F (music sharp). Use the correct character for each meaning.

Did you know?

Number sign is Unicode U+0023 (decimal 35) — glyph # in the Basic Latin (ASCII) block. Also called hash, pound, or octothorpe. HTML5 names it &num;. Do not confuse it with № (&numero;) or music sharp ♯ (&sharp;).

Next: Numero Sign

Learn the HTML entity for the numero sign (U+2116).

Numero Sign 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