HTML Entity for Degree Sign (°)

What You'll Learn
How to display the Degree sign (°) in HTML using named, hexadecimal, decimal, and CSS entity methods. The Degree sign is U+00B0 in the Latin-1 Supplement block (U+0080–U+00FF) and is used for temperatures (e.g. °C, °F), angles (e.g. 90°), and geographic coordinates (e.g. 40°N).
This character can be rendered with the named entity °, hexadecimal °, decimal °, or CSS escape \00B0. For precomposed units see Degree Celsius (℃) and Degree Fahrenheit (℉).
⚡ Quick Reference — Degree Sign
U+00B0Latin-1 Supplement block
°Hexadecimal reference
°Decimal reference
°Most readable option
Name Value
──────────── ──────────
Unicode U+00B0
Hex code °
HTML code °
Named entity °
CSS code \00B0Complete HTML Example
This example demonstrates the Degree sign (°) using hexadecimal code, decimal HTML code, the named entity, and a CSS content escape on a pseudo-element:
<!DOCTYPE html>
<html>
<head>
<style>
#point:after{
content: "\00B0";
}
</style>
</head>
<body>
<p>Degree Sign using Hexadecimal: °</p>
<p>Degree Sign using HTML Code: °</p>
<p>Degree Sign using HTML Entity: °</p>
<p id="point">Degree Sign using CSS Entity: </p>
</body>
</html>🌐 Browser Support
The Degree sign entity is universally supported in all modern browsers:
👀 Live Preview
See the Degree sign rendered live in different contexts:
🧠 How It Works
Named HTML Entity
° is the semantic named entity for the Degree sign—the easiest to read in source HTML.
Hexadecimal Code
° uses the Unicode hexadecimal value 00B0. The x prefix indicates hexadecimal format.
Decimal HTML Code
° uses the decimal Unicode value 176 to display the same character.
CSS Entity
\00B0 is used in CSS stylesheets, particularly in the content property of ::before and ::after.
Same visual result
All four methods produce the Degree sign: °. Unicode U+00B0 is in Latin-1 Supplement. Often combined with C or F for °C and °F.
Use Cases
The Degree sign (°) is commonly used in:
Weather, cooking, and science (e.g. 25°C, 77°F, 100°).
Mathematics, engineering, and geometry (90°, 180°, 45°).
Latitude and longitude (40°N, 74°W), maps, and location content.
Chemistry, physics, and lab reports for arc degrees and temperature.
Charts, gauges, and dashboards showing angles or temperatures.
Unicode tables and HTML entity guides for the degree character.
💡 Best Practices
Do
- Use
°for readable source markup - Use
°Cor°Ffor temperature units - Pick one style (named / hex / decimal) per project
- Use
\00B0only inside CSScontent - Consider ℃ or ℉ for single-character ℃/℉ when needed
Don’t
- Use the letter “o” instead of ° in angles or temperatures
- Put CSS escape
\00B0in HTML text nodes - Use HTML entities in JS (use
\u00B0instead) - Confuse ° with superscript zero or other similar glyphs
- Mix entity styles randomly in one file
Key Takeaways
Four ways to render ° in HTML
° ° °For CSS stylesheets, use the escape in the content property
\00B0Unicode U+00B0 — Latin-1 Supplement (U+0080–U+00FF)
Prefer ° for readability—widely used named entity
Essential for temperatures, angles, and geographic coordinates
❓ Frequently Asked Questions
° (named), ° (hex), ° (decimal), or \00B0 in CSS content. All produce °.U+00B0 (DEGREE SIGN). Latin-1 Supplement block. Hex 00B0, decimal 176. Used for temperatures, angles, and coordinates.°, °, or °) go in markup. The CSS escape \00B0 is used in stylesheets, typically in the content property of pseudo-elements. Same visual result, different layers.Explore More HTML Entities!
Discover 1500+ HTML character references — temperature units, math operators, arrows, and more.
8 people found this page helpful
