Reputation: 64844
For example 2nd
, I want to make the nd
appears bit above using html
and css
. how ?
Upvotes: 0
Views: 132
Reputation: 161
<p>2 <sup>superscript</sup> text.</p>
<p>2 <sub>subscript</sub> text.</p>
Upvotes: 1
Reputation: 4273
<sub>
tag defines subscript text. Subscript text appears half a character below the baseline. Subscript text can be used for chemical formulas, like H2O.
<sup>
tag defines superscript text. Superscript text appears half a character above the baseline. Superscript text can be used for footnotes, like WWW[1].
Upvotes: 1
Reputation: 1707
From the department of Hilariously Bad Ideas: You could use UTF8 superscript characters!
2ⁿᵈ
Upvotes: 0
Reputation: 164
Try this:
2<span style="vertical-align: super;">nd</span>
Using the vertical-align should do the trick.
Upvotes: -1
Reputation: 174957
Use <sup>
(and <sub>
, for the opposite effect)
2nd H2O
Upvotes: 2