I would take leafo's second approach because web pages will change. Especially, for different devices that are running different OS's. Perhaps, consider the legacy of things before the future of what might happen. With his suggestion of the second approach you can encapsulate your game idea in it's own format. Therefore, preserving your original idea(s). As long as HTML5 or what not, holds true. You'll preserve your idea....