Search code examples
htmlcsssymbols

HTML - text position like squared number


As I found this for squared symbol numbers.

Is it maybe possible to have some [text] like number two is presented in example?

Like here if you put:

²

in HTML code you got: 2²


Solution

  • Put those characters after the text you want or your can use <sup> tag around 2.

    2&#178;
    
    2<sup>2</sup>