Programming games and uploading them to my WordPress so they can be playable online?

Hello everyone! My question is directed towards game designers, website developers and basically anyone who knows about games that are played in browsers.

What I want to do is to code my own games (I love playing but would rather do something productive) - but not .exe games. Not games that are downloadable and playable on your computer but more like playable online in browser, like old runescape.

Do I need Java for that? Or Flash? In what language should I code these games so I can later upload them to my Wordpress blog (so they are playable online)? Also do I need any WP plugin for this?

Any help appreciated!

WordPress (or any other CMS) doesn’t really play any role in this. You need to learn to work with some game engine which works in browser.
I am not a game dev, but I assume there are much better places online to ask for advices on this topic than the Envato forum. I would say the best place to start your journey would be here

No one really makes browser games in Java or Flash anymore (or any games) you could argue that Minecraft was made in Java but nowadays people (hobbyists and companies) use c++ based game engines that support either c++ or c# or both. To name a few theres godot, cryengine, unity and unreal. I don’t know about their export to web options though, I know unreal has bad export. I however exported a game from Unity to browser and hosted it on my cheap server - no lags at all. I recommend you to use unity if you want to export to browser. If you want some tutorials then I’d say this is very good one: GS. If you prever videos then check this video at YT.