HTML Entity for Degree Sign (°)

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 1 Code Example
Unicode U+00B0

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

Unicode U+00B0

Latin-1 Supplement block

Hex Code °

Hexadecimal reference

HTML Code °

Decimal reference

Named Entity °

Most readable option

Reference Table
Name           Value
────────────   ──────────
Unicode        U+00B0
Hex code       °
HTML code      °
Named entity   °
CSS code       \00B0
1

Complete 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:

html
<!DOCTYPE html>
<html>
<head>
 <style>
  #point:after{
   content: "\00B0";
  }
 </style>
</head>
<body>
<p>Degree Sign using Hexadecimal: &#x00B0;</p>
<p>Degree Sign using HTML Code: &#176;</p>
<p>Degree Sign using HTML Entity: &deg;</p>
<p id="point">Degree Sign using CSS Entity: </p>
</body>
</html>
Try it Yourself

🌐 Browser Support

The Degree sign entity is universally supported in all modern browsers:

Chrome 1+
Firefox 1+
Safari 1+
Edge 12+
Opera 4+
Android 4.4+
iOS Safari 1+

👀 Live Preview

See the Degree sign rendered live in different contexts:

Temperature 25 °C   77 °F
Angle Right angle: 90°   Turn: 180°
Coordinates 40°N, 74°W
Large glyph °
Monospace refs &deg; &#x00B0; &#176; \00B0

🧠 How It Works

1

Named HTML Entity

&deg; is the semantic named entity for the Degree sign—the easiest to read in source HTML.

HTML markup
2

Hexadecimal Code

&#x00B0; uses the Unicode hexadecimal value 00B0. The x prefix indicates hexadecimal format.

HTML markup
3

Decimal HTML Code

&#176; uses the decimal Unicode value 176 to display the same character.

HTML markup
4

CSS Entity

\00B0 is used in CSS stylesheets, particularly in the content property of ::before and ::after.

CSS stylesheet
=

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:

🌤️ Temperature

Weather, cooking, and science (e.g. 25°C, 77°F, 100°).

📐 Angles

Mathematics, engineering, and geometry (90°, 180°, 45°).

🌍 Coordinates

Latitude and longitude (40°N, 74°W), maps, and location content.

🔬 Science

Chemistry, physics, and lab reports for arc degrees and temperature.

📊 Dashboards

Charts, gauges, and dashboards showing angles or temperatures.

🔤 Symbol references

Unicode tables and HTML entity guides for the degree character.

💡 Best Practices

Do

  • Use &deg; for readable source markup
  • Use &deg;C or &deg;F for temperature units
  • Pick one style (named / hex / decimal) per project
  • Use \00B0 only inside CSS content
  • Consider ℃ or ℉ for single-character ℃/℉ when needed

Don’t

  • Use the letter “o” instead of ° in angles or temperatures
  • Put CSS escape \00B0 in HTML text nodes
  • Use HTML entities in JS (use \u00B0 instead)
  • Confuse ° with superscript zero or other similar glyphs
  • Mix entity styles randomly in one file

Key Takeaways

1

Four ways to render ° in HTML

&deg; &#x00B0; &#176;
2

For CSS stylesheets, use the escape in the content property

\00B0
3

Unicode U+00B0 — Latin-1 Supplement (U+0080–U+00FF)

4

Prefer &deg; for readability—widely used named entity

5

Essential for temperatures, angles, and geographic coordinates

❓ Frequently Asked Questions

Use &deg; (named), &#x00B0; (hex), &#176; (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.
In temperature displays (°C, °F), angles and geometry (e.g. 90°), geographic coordinates, scientific and mathematical content, and any place that requires the degree symbol.
HTML entities (&deg;, &#176;, or &#x00B0;) go in markup. The CSS escape \00B0 is used in stylesheets, typically in the content property of pseudo-elements. Same visual result, different layers.
Degrees of arc (angles), temperature (e.g. 25°C, 77°F), and geographic coordinates (e.g. 40°N). One of the most common symbols in science, weather, and geography.

Explore More HTML Entities!

Discover 1500+ HTML character references — temperature units, math operators, arrows, and more.

All HTML Entities →

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