Sure! Here's a simple example of a 2D Mario-styled platformer game implemented as a single HTML file using JavaScript:
To play the game, save the above code into a .html file, open it in a web browser (preferably on a smartphone), and use the left and right arrow keys to move the player. Press the spacebar to make the player jump.
Please note that this is a very basic example to demonstrate the concept of a 2D platformer game. It lacks features like enemy interaction, multiple levels, power-ups, etc. You can expand and customize the game as per your requirements.