HTML Entity for Digit Five (5)

Beginner
6 min read
Updated: Sep 2026
1 example
Unicode U+0035

What Is the Digit Five Entity?

Digit five (5) is the Basic Latin character at Unicode U+0035. You can type 5 directly in HTML, or write it with a numeric character reference when you need an explicit entity form.

Remember
Character     5
Unicode       U+0035
Hex entity    5
Decimal       5
CSS escape    \0035
Named entity  (none)

All of these produce the same glyph: 5. Prefer typing 5 in normal page text; use entities for CSS content, generated markup, or when encoding must be explicit.

Quick Reference

One table for every form you will actually use.

FormCodeWhere it goes
Direct character5HTML text (default choice)
Hex entity5HTML markup
Decimal entity5HTML markup
CSS escape\0035Stylesheet content
Named entity—Not defined in HTML5

When to use which

SituationUse
Normal paragraphs, headings, labelsType 5
Need an entity in HTML source5 or 5
Generated text via ::before / ::aftercontent: "\0035"
Looking for &five; or similarDoes not exist — use numeric form

Live Preview

Digit five rendered in common UI contexts.

Inline text You have 5 unread emails.
Large glyph 5
Date / time 2026-05-15 15:50
Monospace index 5, value 5
With entities Hex: 5 | Decimal: 5

Complete HTML Example

One page that shows digit five with the hex entity, decimal entity, CSS escape, and a typed character. Use View Output or open the live editor.

Hex + Decimal + CSS + Typed

All four ways to produce 5 in a single document.

html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Digit Five (5) in HTML</title>
  <style>
    #point::after {
      content: "\0035";
    }
  </style>
</head>
<body>
  <p>Digit Five using Hex Code: &#x35;</p>
  <p>Digit Five using HTML Code: &#53;</p>
  <p id="point">Digit Five using CSS Entity: </p>
  <p>Typed directly: 5</p>
</body>
</html>
Try It Yourself

How It Works

1. Hex: U+0035 → &#x35; in HTML. The browser turns it into 5.

2. Decimal: same code point as 53 → &#53;. Same result as hex.

3. CSS: use \0035 in content (not an HTML entity). #point::after appends that 5 after the paragraph text.

4. Typed 5: best for normal text. All four lines show the same digit.

Pitfalls & Tips

Common mistakes when working with digit five entities.

Named?

No &five;

HTML5 does not define a named entity for ASCII digits. Use numeric forms.

CSS vs HTML

Do not mix escapes

\0035 belongs in CSS. &#x35; / &#53; belong in HTML.

Lookalikes

Related forms differ

Circled or dingbat fives (such as ➄) are different Unicode characters — not the same as U+0035.

Default

Type 5 when you can

Entities are for encoding needs — not required for ordinary body text.

Semicolon

End references

Always finish with ; — write &#53;, not &#53.

CSS escape

Pad short hex

In CSS content, prefer \0035 (six hex digits) so the escape does not swallow the next character.

Browser Support

Digit five (U+0035) and its numeric entity forms (&#x35;, &#53;, CSS \\0035) are supported in all mainstream browsers.

✓ Universal support

Digit Five (5)

Type 5, or encode with hex, decimal, or CSS escape — same glyph everywhere.

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

Bottom line: Use a typed 5 for normal text. Prefer &#x35; or &#53; in HTML when encoding must be explicit, and \\0035 only inside CSS content.

Key Takeaways

  • Unicode: digit five is U+0035 (decimal 53).
  • HTML: use &#x35; or &#53; when you need an entity.
  • CSS: use \0035 inside content for generated text.
  • Default: type 5 directly unless encoding requires an entity.

One line: U+0035 → type 5, or encode as &#x35; / &#53; / CSS \0035.

Frequently Asked Questions

Use &#x35; (hex), &#53; (decimal), or the CSS escape \0035 in the content property. All render the digit five (5). In most cases you can also type 5 directly.
U+0035 (hex 0035, decimal 53). It belongs to the Basic Latin (ASCII) block.
No. ASCII digits like 5 do not have named HTML entities in HTML5, so you should use numeric references like &#53; or &#x35; when you need an entity form.
Use entities when generating content in CSS, when you want explicit encoding, or when outputting into contexts where escaping is required. For normal body text, typing 5 directly is usually best.
HTML entities (&#53; or &#x35;) go in markup. The CSS escape \0035 is used in stylesheets (usually in the content property of ::before/::after). Both render 5.
No. Digit five is U+0035. Circled and other stylized fives (such as dingbat circled sans-serif ➄) are different Unicode characters.

Did you know?

Digit five is Unicode U+0035 (decimal 53). HTML5 has no named entity for it — use &#x35; or &#53; when you need an entity form.

Next: 5 Dingbat Circled Sans Serif

Learn the HTML entity for dingbat circled sans-serif digit five (➄) — a different Unicode character from digit five.

5 Dingbat Circled Sans Serif 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