Disclaimer and Crediting: This example is from Monogame.com website. It was simply copied and posted here to demonstrate that it can be hosted and ran on your own web server with very little effort. Good job to the original creators!
Controls:
Mouse click on the blue screen below to load and start the game
Use your Left and Right arrow keys (or A and D keys) to move the player left or right
Use the space bar (or W key) to jump
If the player does not move then click on the game screen region so that it is in focus.