What is the best way to write superscript text on web pages?

I have an application that contains many numbers or letters in a superset. I noticed that

 X<span style="vertical-align: super;">3</span>

and just using the tag suparound figure 3, both give in my application.X3

But only the tag supgives on SO. Does this mean that I should stick to the latter? What are the differences, pros and cons, if any?X3

Edit: I checked http://www.w3schools.com/tags/tag_sup.asp and http://www.w3.org/TR/html-markup/sup.html . I don't seem to see any difference.

+4
source share
2 answers

<sup>super</sup>,

W3C, sup - CSS:

sup {
    vertical-align: super;
    font-size: smaller;
} 

: , . "".

: CSS.

: j08691 - :

SO , , ,

+5

<sup> , "title"; , ... title= "Tombeau de Napol & eacute; on 1er" ...?

"er" ( "st" !) . <sup> .: - (

0

Source: https://habr.com/ru/post/1611327/


All Articles