Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What would be the math symbol for representing a fraction?

Tags:

html

I would like to shown 2/3 (i.e. 2 divided by 3) in a HTML format and I don't want to use /. What would be the right symbol to format fractions/division using HTML?

like image 470
user339108 Avatar asked Dec 15 '10 11:12

user339108


3 Answers

Judging by your comments, it looks like you're specifically asking how to display fractions. If that's the case, many fractions are defined as HTML entities. As an example, a few of those entities are:

½ ¼ ⅛ ⅔ ⅖ ¾ ⅜ 

Result:

½ ¼ ⅛ ⅔ ⅖ ¾ ⅜

Note that not all browsers support those named entities, but you could use their Unicode values instead. If you want to be able to display any fraction and not just the ones that have entities, you can use the fraction slash entity, ⁄ ( ⁄ ). This character overlaps pixels from the preceding and following characters to make a very neat fraction. It's best used when combined with superscript and subscript numbers:

<sup>39</sup>&frasl;<sub>40</sub> 

Result:

3940

Further reading:
http://changelog.ca/log/2008/07/01/writing_fractions_in_html

If the font you're using supports it, you may also be able to paste the subscript and superscript numbers directly into your HTML from an application like charmap.exe. See Konrad Rudolph's excellent answer for an example.

like image 157
Andy E Avatar answered Sep 20 '22 11:09

Andy E


To generate the division sign ÷, type &divide; or &#247;

like image 32
Vuk Avatar answered Sep 21 '22 11:09

Vuk


Use the entity &#247;

÷

HTML ASCII Characters

like image 30
Ian Nelson Avatar answered Sep 23 '22 11:09

Ian Nelson