HTML Entity for Roman Numeral Two (Ⅱ)

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

What Is the Roman Numeral Two Entity?

Roman Numeral Two (Ⅱ) is the Unicode character at U+2161 in the Number Forms block. It looks like an uppercase roman II and is used for outlines, chapter labels, and formal numbering.

Remember
Character     Ⅱ
Unicode       U+2161
Hex entity    Ⅱ
Decimal       Ⅱ
CSS escape    \2161
Named entity  (none)

All of these produce the same glyph: Ⅱ. Prefer the Unicode character (or its entities) when you need a true roman numeral; type the letters II when you only need ordinary text.

Quick Reference

One table for every form you will actually use.

FormCodeWhere it goes
Direct characterⅡHTML text (UTF-8)
Hex entityⅡHTML markup
Decimal entityⅡHTML markup
CSS escape\2161Stylesheet content
Named entity—Not defined in HTML5

When to use which

SituationUse
Need the roman numeral glyph ⅡType Ⅱ, or Ⅱ / Ⅱ
Generated text via ::before / ::aftercontent: "\2161"
Lowercase roman numeral twoUse ⅱ (U+2171)
Ordinary letters II (not a numeral)Type II
Looking for &romanII; or similarDoes not exist — use numeric form

Live Preview

Roman Numeral Two rendered in common writing contexts.

Inline text Ⅱ. Appendix
Large glyph Ⅱ
Outline Ⅰ One   Ⅱ Two   Ⅲ Three
Monospace section Ⅱ → details
With entities Hex: Ⅱ | Decimal: Ⅱ

Complete HTML Example

One page that shows Roman Numeral Two 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 Ⅱ in a single document.

html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Roman Numeral Two (Ⅱ) in HTML</title>
  <style>
    #point::after {
      content: "\2161";
    }
  </style>
</head>
<body>
  <p>Roman Numeral 2 using Hex Code: &#x2161;</p>
  <p>Roman Numeral 2 using HTML Code: &#8545;</p>
  <p id="point">Roman Numeral 2 using CSS Entity: </p>
  <p>Typed directly: Ⅱ</p>
</body>
</html>
Try It Yourself

How It Works

1. Hex: U+2161 → &#x2161; in HTML. The browser turns it into Ⅱ.

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

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

4. Typed Ⅱ: fine in UTF-8 pages. All four lines show the same roman numeral.

Pitfalls & Tips

Common mistakes when working with Roman Numeral Two entities.

Named?

No named entity

HTML5 does not define &romanII; or similar. Use numeric forms.

CSS vs HTML

Do not mix escapes

\2161 belongs in CSS. &#x2161; / &#8545; belong in HTML.

Ⅱ vs II vs ⅱ

Different characters

Ⅱ is U+2161; letters II are Basic Latin; lowercase ⅱ is U+2171.

Fonts

Check the glyph

Number Forms support varies by font. If Ⅱ is missing, fall back to II or another font.

Semicolon

End references

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

Lists

CSS list-style

For auto-numbered roman lists, prefer list-style-type: upper-roman instead of hard-coding Ⅱ.

Browser Support

Roman Numeral Two (U+2161) and its numeric entity forms (&#x2161;, &#8545;, CSS \\2161) are supported in all mainstream browsers. Glyph shape depends on the font.

✓ Universal support

Roman 2 (Ⅱ)

Encode with hex, decimal, or CSS escape — or paste Ⅱ in UTF-8 HTML.

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

Bottom line: Use &#x2161; or &#8545; for the Unicode glyph, and \\2161 only inside CSS content. Prefer the letters II for ordinary text.

Key Takeaways

  • Unicode: Roman Numeral Two is U+2161 (decimal 8545).
  • HTML: use &#x2161; or &#8545; when you need an entity.
  • CSS: use \2161 inside content for generated text.
  • Default: use Ⅱ for roman outlines; type II for ordinary letters.

One line: U+2161 → &#x2161; / &#8545; / CSS \2161, or paste Ⅱ.

Frequently Asked Questions

Use &#x2161; (hex), &#8545; (decimal), or the CSS escape \2161 in the content property. All render Ⅱ. You can also paste Ⅱ directly when your file is UTF-8.
U+2161 (hex 2161, decimal 8545). It belongs to the Number Forms Unicode block.
No. HTML5 does not define a named entity for Ⅱ. Use numeric references like &#x2161; or &#8545;.
Use it for chapter labels, outlines, and typography that needs a true uppercase roman numeral glyph. For ordinary text, typing II is usually enough.
No. The Latin letters I and I are separate Basic Latin characters. Lowercase roman numeral two is U+2171 (ⅱ). Uppercase roman numeral two is U+2161 (Ⅱ) — a different character.
HTML entities (&#8545; or &#x2161;) go in markup. The CSS escape \2161 is used in stylesheets (usually in the content property of ::before/::after). Both render Ⅱ.

Did you know?

Uppercase roman numeral two is Unicode U+2161 (decimal 8545). HTML5 has no named entity for it — use &#x2161; or &#8545;. It is a different character from the letters II and from lowercase roman ⅱ (U+2171).

Next: 2 Subscript

Learn the HTML entity for subscript two (₂) — a different character from Ⅱ.

2 Subscript 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