Degree sign (°) in HTML
The degree sign marks temperatures, angles and geographic coordinates. Its named reference is ° and its code point is U+00B0.
At a glance
- Character
- °
- Named entity
- °
- Decimal reference
- °
- Hex reference
- °
- Unicode code point
- U+00B0
- Unicode name
- DEGREE SIGN
- In the entity reference
- Math, and pinned in quick access
In detail
The spacing rule is not the same in both of its main uses, which is why so much published text is inconsistent. For an angle or a coordinate the sign attaches directly to the number with no space. For a temperature the international standard treats the degree and the scale letter as a single unit symbol, so it takes a space after the number in the same way that kilograms or metres do.
That means twenty degrees Celsius is written with a space before the sign and no space between the sign and the C, while a forty five degree angle has no space anywhere. Whichever convention you follow, use a non-breaking space rather than an ordinary one, because a temperature whose number and unit land on different lines reads as two separate values.
Three characters are regularly mistaken for it. The masculine ordinal indicator at U+00BA is used in Spanish and Portuguese to abbreviate ordinal numbers and is usually drawn with an underline in older fonts. The ring above at U+02DA is a combining style diacritic. The degree Celsius character at U+2103 packs the sign and the letter into one glyph, and while it exists it is a compatibility character that most style guides advise against.
For coordinates the degree sign travels with the prime and double prime characters for minutes and seconds, at U+2032 and U+2033, and those are not the straight apostrophe and straight quote. Using the typewriter marks in a coordinate is the same class of error as using a hyphen for a minus sign: readable, and wrong to anything parsing the string.
Examples
<p>Water boils at 100 °C at sea level.</p>
<p>Rotate the panel by 45° clockwise.</p><p>19° 04′ 33″ N, 72° 52′ 39″ E</p>′ is the prime at U+2032 and ″ the double prime at U+2033.
Things that catch people out
- An ordinary space between the number and the degree sign lets the two wrap apart on a narrow screen, which looks like a broken value rather than a style choice.
- The masculine ordinal indicator is a different character that renders similarly in many fonts. Text pasted from a Spanish or Portuguese source may contain it where a degree sign is meant.
- A screen reader will usually announce this character as degrees, so writing the word as well produces the word twice.
Try it: HTML Entity Reference
Search 152 entities across 9 categories, switch the copy format between the character, the name, the decimal form and the hex form, and copy in one click.
HTML Entity Reference
LOCAL · Browser-OnlySearchable reference of 150+ HTML entities with one-click copy in any format
152 entities across 9 categories
Commonly Used
→Arrows(13)
±Math(35)
$Currency(8)
…Punctuation(21)
©Symbols(24)
πGreek(30)
½Fractions(6)
●Geometric(7)
æLatin Special(8)
Click any entity card to copy it in your chosen format. All data is embedded in the page and works offline.
Related HTML entities
All html entities →Plus minus sign (±) in HTML
The plus minus sign at U+00B1, its entity forms, how it reads in a tolerance versus a measurement uncertainty, and the minus plus character that reverses it.
Micro sign (µ) in HTML
The micro sign at U+00B5 and the Greek small mu at U+03BC look identical and are different code points. Which one to use for units, and how to normalise them.
Superscript one, two and three in HTML
The superscript digit characters at U+00B9, U+00B2 and U+00B3, their entity forms, the rest of the superscript block, and when the sup element is better.
Multiplication sign (×) in HTML
The multiplication sign at U+00D7, its entity forms, why image dimensions should not use a letter x, and the other cross characters it is confused with.
Division sign (÷) in HTML
The division sign at U+00F7, its entity forms, why standards bodies discourage it, and the slash and fraction characters that replace it in published maths.
Minus sign (−) in HTML
The true minus sign at U+2212 and the hyphen-minus at U+002D. Why negative numbers in a table need the real character, and where it breaks copy and paste.
Tools for this
- HTML Entity Reference Free online HTML entity reference - search and copy HTML entities with live preview
- HTML Entity Encoder Free online HTML entity encoder - encode or decode HTML entities to prevent XSS and display issues