Superscript Two (²) is the Unicode character at U+00B2 in the Latin-1 Supplement block. It looks like a small raised 2 and is common for squares such as x², m², and exponents.
Remember
Character ²
Unicode U+00B2
Hex entity ²
Decimal ²
Named entity ²
CSS escape \00B2
All of these produce the same glyph: ². Prefer ² when you want readable markup; use <sup>2</sup> when you want semantic superscript formatting instead.
Reference
Quick Reference
One table for every form you will actually use.
Form
Code
Where it goes
Direct character
²
HTML text (UTF-8)
Named entity
²
HTML markup (preferred readable form)
Hex entity
²
HTML markup
Decimal entity
²
HTML markup
CSS escape
\00B2
Stylesheet content
Semantic tag
<sup>2</sup>
HTML (formatting, not the ² glyph)
When to use which
Situation
Use
Need the Unicode glyph ²
², or ² / ²
Generated text via ::before / ::after
content: "\00B2"
Semantic superscript for any text
<sup>2</sup>
Plain digit two (not superscript)
Type 2 (U+0032)
Readable HTML source
Prefer ²
See it
Live Preview
Superscript Two rendered in common writing contexts.
Inline textArea = 12 m²
Large glyph²
In a powerx² = x × x 5² = 25
Monospacen² → square
With entitiesNamed: ² | Hex: ² | Decimal: ²
Semantic <sup>x2 (tag styles digit 2)
Code
Complete HTML Example
One page that shows Superscript Two with hex, decimal, named entity, CSS escape, and the semantic <sup> option. Use View Output or open the live editor.
Hex + Decimal + Named + CSS + <sup>
Five ways to show a raised two in a single document.
html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Superscript Two (²) in HTML</title>
<style>
#point::after {
content: "\00B2";
}
</style>
</head>
<body>
<p>Superscript Two using Hex Code: ²</p>
<p>Superscript Two using HTML Code: ²</p>
<p>Superscript Two using Named Entity: ²</p>
<p id="point">Superscript Two using CSS Entity: </p>
<p>Semantic alternative: x<sup>2</sup></p>
</body>
</html>
Superscript Two using Hex Code: ²
Superscript Two using HTML Code: ²
Superscript Two using Named Entity: ²
Superscript Two using CSS Entity: ²
Semantic alternative: x²
How It Works
1. Hex:U+00B2 → ² in HTML. The browser turns it into ².
2. Decimal: same code point as 178 → ². Same result as hex.
3. Named:² is the standard HTML named entity for ² — easier to read in source.
4. CSS: use \00B2 in content (not an HTML entity). #point::after appends that ² after the paragraph text.
5. Semantic <sup>:x<sup>2</sup> styles digit two as a superscript. Prefer this when you need meaning, not a specific Unicode glyph.
Pitfalls & Tips
Common mistakes when working with Superscript Two entities.
Named
Use ²
HTML5 defines ² for ². Prefer it for readable source; numeric forms still work.
CSS vs HTML
Do not mix escapes
\00B2 belongs in CSS. ² / ² / ² belong in HTML.
² vs 2 vs ₂
Different characters
² is U+00B2; digit 2 is U+0032; subscript ₂ is U+2082.
Glyph vs tag
Choose intentionally
Use the Unicode glyph for exact look (great for m²); use <sup> for semantic superscript on any text.
Semicolon
End references
Always finish with ; — write ² and ², not without the semicolon.
Units
Squared units
For area units, m² (m²) is clearer than styling a plain 2 with CSS alone.
Compatibility
Browser Support
Superscript Two (U+00B2) and its entity forms (², ², ², CSS \\00B2) are supported in all mainstream browsers. Glyph shape depends on the font.
✓ Universal support
Superscript Two (²)
Use ², hex, decimal, or CSS escape — or use <sup> for semantic formatting.
100%Browser coverage
Google ChromeSupported
Yes
Microsoft EdgeSupported
Yes
Mozilla FirefoxSupported
Yes
Apple SafariSupported
Yes
OperaSupported
Yes
Internet ExplorerAll versions
Yes
U+00B2 / entitiesFull support
Bottom line: Prefer ² (or ² / ²) for the Unicode glyph, \\00B2 only inside CSS content, and <sup>2</sup> when you want semantic superscript.
Remember
Key Takeaways
Unicode: Superscript Two is U+00B2 (decimal 178).
HTML: prefer ², or use ² / ².
CSS: use \00B2 inside content for generated text.
Alternative: use <sup>2</sup> for semantic superscript formatting.
One line:U+00B2 → ² / ² / ² / CSS \00B2, or semantic <sup>2</sup>.
Frequently Asked Questions
Use ² (hex), ² (decimal), ² (named), or the CSS escape \00B2 in the content property. All render ². You can also paste ² directly when your file is UTF-8.
U+00B2 (hex 00B2, decimal 178). It belongs to the Latin-1 Supplement Unicode block.
Yes. HTML5 defines ² for superscript two. You can also use numeric references ² or ².
Use ² (or its entities) when you need the exact Unicode superscript glyph — common for squared units like m². Use <sup>2</sup> when you want semantic superscript formatting for arbitrary text.
No. Digit two is U+0032. Subscript two is U+2082 (₂). Superscript Two is U+00B2 (²) — a different character.
HTML entities (², ², or ²) go in markup. The CSS escape \00B2 is used in stylesheets (usually in the content property of ::before/::after). Both render ².
🤔
Did you know?
Superscript two is Unicode U+00B2 (decimal 178) in the Latin-1 Supplement block. Unlike most superscript digits, HTML5 defines a named entity: ². It is a different character from digit two (U+0032) and from subscript two ₂ (U+2082).