If you are running your web page using ASP or PHP you could develop a small re-useable function that you just send through the two numbers in the fraction and then have it format them like above. I think that you will probably also be able to do the same using JavaScript on a static page to include the relevant SUB and SUP details.