How should I express fractions like 15/16ths in HTML?

前端 未结 7 1477
慢半拍i
慢半拍i 2021-02-05 04:49

I know there are HTML entities for 1/2, 1/4, and 3/4, but are there others? Like 1/3 or 1/8? Is there a good way to encode arbitrary fractions?

7条回答
  •  情书的邮戳
    2021-02-05 05:10

    This would depend on your exact needs and audience. For most purposes many methods would be appropriate. 15/16, 15 parts of 16, 93.75%, 15/16 all mean the same, you might even use symbols like ++++++++++++++-

    For some more complex scenarios you will need more complex solutions more like LaTeX than html. I believe there are also server side components that take LaTeX descriptions and create images that are browser compatible, such as described here: http://www.fauskes.net/nb/htmleqII/

提交回复
热议问题