unless you already know how to convert scratch code to javascript
You can also just publish it on Scratch. Then take the "iframe" that comes when you click share. Put that into an html document, and boom, you have a Scratch game on HTML.
Yeah that's what I do lol