Forum Moderators: open

Message Too Old, No Replies

Character Entity representation

did not find it in W3

         

henry0

8:01 pm on Feb 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello
Do you know of a character entity representation for
rd like in 1/3rd with the small rd above base line in a similar way as MS Words does it.

same for nd (second) and th for (fifth)

thanks

moltar

8:05 pm on Feb 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In plain HTML I think you are limited to the following entities:

¼ ¼ one-fourth
½ ½ one-half
¾ ¾ three-fourths

But you should check out MathML [w3.org].

encyclo

8:14 pm on Feb 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't think there's a character entity for any of these. The easy way to do it is to use good ole' superscript tags:

1<sup>st</sup> 
2<sup>nd</sup>
3<sup>rd</sup>
4<sup>th</sup>

You can also use a

span
with a class and apply CSS, but that's much more verbose than using
<sup></sup>
.

henry0

8:29 pm on Feb 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thank you gentlemen,
It confirms my thoughts about existing entity

I will then use the <sup></sup>.

I had forgotten about those!

Regards

Henry

encyclo

8:34 pm on Feb 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I forgot to mention: you can still use CSS applied to the
<sup></sup>
tags, for example:

sup {color:#c00;}

So you can adjust the look as required.

bill

5:46 am on Feb 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



But you should check out MathML.

I just did this recently: Mathematical equations on your web page [webmasterworld.com]

Although I would love to use it, MathML is just not ready yet. IE doesn't support it without a plug-in...that's enough to scare off a lot of your visitors. Also, it really wouldn't work in this case anyway. encyclo already nailed the solution in msg #:3.

henry0

10:16 am on Feb 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks all,
I used Encyclo tip

regards

Henry

PS) it is strange that W3 has only a few of those in that range working
further more my quest is quite simple and got to be used very often