Colin Stewart
Colin Stewart

Reputation: 91

HTML superscript shows  character

I have the following 11,500m<sup>²</sup> in my HTML code. The superscript 2 displays fine, but adds an extra character out of nowhere, like so:

11,500m²

Does anyone know what is causing this and how to get rid of it?

Upvotes: 0

Views: 529

Answers (3)

Feng Zhang
Feng Zhang

Reputation: 1948

I had this issue with ®, it is by nature hovering on the top half. I used the number representation &#174; that solves the problem.

Upvotes: 0

John Bupit
John Bupit

Reputation: 10618

Simply use the character for the number 2 (and not for the superscripted 2).

11,500m<sup>2</sup>

11,500m2

Upvotes: 1

Mohamed Ramadan
Mohamed Ramadan

Reputation: 51

Add the following inside < HEAD > tag

<meta charset="utf-8" />

example

<html>
 <head>
  <meta charset="utf-8" />
   ..
 </head>
 <body>
  ..
 </body>
</html>

Upvotes: 1

Related Questions