Time for action – adding a meta tag for a mobile web app

We will take an audio game as an example to begin with. Let's perform the following steps:

  1. Open the index.html file in the code editor.
  2. Add the following code within the head section.
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon" href="game-icon.png">
    <link rel="apple-touch-startup-image" href="launch-screen.png">
  3. Test the game on an iOS device or a simulator. To do this, try tapping on the Share button and then select Add to Home Screen. You should see the icon and the name of the game. Continue to add the game to the home screen.
  4. Then, open the game from the home screen. It will open ...

Get HTML5 Game Development by Example : Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.