I tried to partially bring the ecosystem of TeX to the Web via SVG[1] a while ago, but I really hope there is an alternative to TeX for the Web to avoid the hassle of conversion. Matthew Butterick's Pollen[2] seems to be a good start, but currently the ecosystem is too small. It needs some more attention.
[1]: https://krasjet.com/voice/karasu/
[2]: https://docs.racket-lang.org/pollen/