How can I have HTML-formatted tooltips show up in dynamically generated Javascript results?

I’ve made a “random generator” tool for a tabletop RPG.

It dynamically generates some results using javascript tables.

What I want to do, is have certain words inside those tooltips get tooltip popups inside those results. And, importantly, have the tooltips get a little formatting.

Unfortunately, I’m pretty sure I’ve got things messed up.

I’ve got a bunch of HTML and work done but I’m stuck with this.

https://jetwong.neocities.org/armygens/weaseltech/goodversion/visualtest

I’ve tried a few different online suggestions that offered suggestions but I think I may have put them all in improperly, or accidentally left more than one in.