html5 - what is the diference to output superscript using the below two methods in html -


in html, can use both &trade , <sup></sup> output superscript. then, difference between '&trade' , '<sup></sup>'?

&trade; single character, whereas <sup></sup> changes way "normal" characters displayed.

using <sup>tm</sup> displaying 2 letters t , m using superscript text layout, whereas &trade; unicode character 'trade mark sign' (u+2122).

practically speaking:

  • &trade; might not survive copy-and-paste across different documents (given how broken applications respect unicode).
  • it's not available in every font might use.
  • anyone searching "tm" won't find &trade; (unless software they're using clever specific case).

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -