If the web author knows a priori what the expression will be, there are several solutions. An article by Dr. Freese of the University of Hawaii describes various options that the web author can use. I genrally use a java applet called WebEQ from Center for the Computation and Visualization of Geometric Structures, a National Science Foundation Science and Technology Center at the University of Minnesota. To give the reader an idea of what can be done with WebEQ here is
The situation is more complicated if we have dynamic materials so that we do not know a priori what the expression will be. The problem of rendering it becomes more difficult. So for instance in the applets on fractions we have to change the fraction real time. This is achieved by using java "layout managers" to build the complex structures.