From Java applets to HTML5: a short history of browser games
Today you can open a web page and play a game instantly on a phone, tablet or computer, with nothing to install. It wasn't always like that. Here's a short history of how games in the browser got here.
The early web: text and links
The first web pages in the early 1990s were mostly text, links and a few images. Some early "games" were just pages linked together, like choose-your-own-adventure books, where every choice loaded a new page.
1995: JavaScript arrives
In 1995 Brendan Eich created JavaScript at Netscape, famously writing the first version in about ten days. It let web pages react to clicks and keys without loading a new page. Early JavaScript was slow and limited, but it made small games like simple puzzles and quizzes possible.
Java applets and plugins
For more serious games, the late 1990s relied on plugins: extra software installed into the browser. Java applets ran small programs inside web pages, and Shockwave was used for games and animations. They could do much more than early JavaScript, but users had to install them, and they often caused security problems and crashes.
The Flash era
In the 2000s, Adobe Flash (originally made by Macromedia) became the way to make browser games. Flash was easy for artists and programmers to use, and thousands of game websites filled up with Flash games. Many of today's professional game developers made their first games in Flash.
Phones change everything
In 2007 the iPhone arrived, and it didn't support Flash. In 2010 Apple's Steve Jobs published a letter explaining why, pointing to security, battery life and touch screens. As more people browsed on phones, game makers needed a way to make games that worked everywhere without plugins.
HTML5 and the canvas
The answer was HTML5, a new version of the language web pages are written in. It added the <canvas> element, a drawing surface that JavaScript can paint on many times a second, as well as built-in audio, video and better ways to handle touch. JavaScript engines also became dramatically faster. The HTML5 standard was officially finished in 2014.
Adobe officially ended support for Flash at the end of 2020, and browsers removed it. Many old Flash games were preserved by fans, but new browser games are now built with HTML, CSS and JavaScript.
Browser games today
Modern browsers can run 3D graphics with WebGL, play sound with the Web Audio API, read game controllers with the Gamepad API, and even work offline. Every game on this site is built this way: HTML for the page, CSS for the look, and JavaScript drawing on a canvas. To see how that works in more detail, read how browser games work, or start building with our guide to making your first game.