Superscript One HTML entity ¹

¹ is the HTML entity for Superscript One ¹ (U+00B9). Copy the decimal ¹ and hex ¹ codes plus CSS, JavaScript, Python and URL escapes.

Entity
¹
Legacy form
&sup1 (no semicolon)
Code point
U+00B9
Unicode name
SUPERSCRIPT ONE
Block
Latin-1 Supplement
Category
Other number (No)
Since
Unicode 1.1
Defined in
HTML 4.01 and HTML5

Codes to copy

HTML named¹Works in HTML; in XML only & < > " ' are predefined.
HTML decimal¹Works in HTML and XML.
HTML hex¹Works in HTML and XML.
CSScontent: "\B9";In a stylesheet, for ::before and ::after.
JavaScript"\u00B9"Also valid in JSON.
Python"\u00b9"Python 3 string literal.
Python by name"\N{SUPERSCRIPT ONE}"Readable alternative using the Unicode name.
URL%C2%B9Percent-encoded UTF-8 bytes, for a path or query value.
UTF-8 bytesC2 B92 bytes.
UTF-1600B91 code unit, which is what JavaScript length counts.

When to use it

&sup1; writes U+00B9 (Superscript One), a number form from the Unicode Latin-1 Supplement block, encoded since Unicode 1.1. These characters exist mostly for compatibility with older character sets; for anything beyond simple cases, <sup>, <sub> or MathML give more control.

The name dates from HTML 4, so it works in every browser and in old email clients.

Browsers also accept the legacy form &sup1 without a semicolon, for compatibility with old pages; new HTML should always end the reference with a semicolon.

More letterlike symbols, numbers and fractions

All letterlike symbols, numbers and fractions · Every HTML entity · Encode or decode text

Source: the WHATWG HTML Standard list of named character references and the Unicode Character Database (Unicode 18.0).