Toskan
Toskan

Reputation: 14931

How to produce this special character for html displaying?

If i try to reproduce this character it shows as a plain simple 2

enter image description here

Someone got an idea how I can reproduce it? it is a 2 that is below the normal textflow and is a bit smaller.

Upvotes: 0

Views: 61

Answers (2)

monkeyinshoes
monkeyinshoes

Reputation: 11

HTML..

<font color="CYAN"><sub><u>2</u></sub></font>

But oh noes! The u tag is deprecated in HTML5. Well, alrighty then.

Time for inline CSS shenanigans.. With a benefit, underline will still work if CSS is disabled thus cater to assistive modes, which is like, a big deal at W3C.

<u style="color:cyan;text-decoration:none;border-bottom: 1px solid cyan;"><sub>2</sub></u>

Looks like it did the job.

Upvotes: 1

13ruce1337
13ruce1337

Reputation: 733

If you need to use subscript in HTML, the element <sub></sub> works fine. There is also <sup></sup> for superscript.

example: H<sub>2</sub>0

reference

Upvotes: 4

Related Questions