What Is an HTML5 Ad? What's Inside the ZIP

An HTML5 ad is a small, self-contained web page packaged as a ZIP and run inside an ad slot. This glossary entry walks through what the files are, how they behave, and where things usually go wrong.

By the PlayableRun team··8 min read

Key takeaways - An HTML5 ad is a small, self-contained web page, packaged as a ZIP, that an ad network loads inside an ad slot. - A playable ad is one type of HTML5 ad. Banners and simple animated units use the same container. - The ZIP usually holds an entry HTML file, scripts, styles and media. The exact rules differ by network, so check each current spec. - The click-through is not a normal link. Each network provides its own exit mechanism, and using the wrong one is a common reason for rejection. - Most failures come from the package itself: wrong file paths, external requests, a missing entry file, or a broken click path.

The short definition

An HTML5 ad is a web page built to be shown inside someone else's app or website. It is written with the same technologies as any web page: HTML for structure, CSS for layout, JavaScript for behavior. The difference is where it runs and how it is delivered.

Instead of living on a server you control, the ad is uploaded to an ad platform as a package. The platform hosts it, decides when to show it, and loads it into a frame or webview when an impression is served. That is the whole idea. Everything else is detail about that package and that frame.

If you have ever opened a simple HTML file on your desktop and seen it work without a server, you have the right mental model. An HTML5 ad is that file, plus its dependencies, zipped.

HTML5 ad vs playable ad

The terms get mixed up, so here are plain definitions.

  • HTML5 ad: any ad delivered as HTML, CSS and JavaScript. It could be a static banner, an animated banner, or something interactive.
  • Playable ad: an HTML5 ad that responds to touch or clicks and lets the user try a small piece of the app, such as a few merges in a puzzle game or a single swipe in a runner.
  • Interstitial or full-screen HTML5 ad: the same package, shown at a larger size, often with an end card.

So "what is an HTML5 ad" has a broad answer, and "what is a playable ad" has a narrower one. A playable is an HTML5 ad with a game loop or a guided interaction inside. For how the interaction side is designed, see the playable ad end card article, which covers the final moments.

What is inside the ZIP

The ZIP is just a folder compressed into one file. A typical layout looks like this:

  • index.html: the entry file. The network loads this first. Many networks expect it at the root of the ZIP, not buried inside a subfolder.
  • JavaScript files: the logic. This can be the game loop, a small animation engine, the click handler and any bundled library code.
  • CSS file or inline styles: layout, fonts, button appearance.
  • Images: backgrounds, characters, buttons, icons, sprite sheets.
  • Audio (optional): sound effects or music, often with a mute control.
  • Config or manifest (sometimes): a small file some networks ask for to declare dimensions, orientation or metadata.

Two things matter more than the list itself.

First, paths are relative. The HTML refers to images/hero.png, not to a full web address. When the network unpacks the ZIP onto its own servers, relative paths still resolve.

Second, the package is self-contained. Every file the ad needs is in the ZIP. If your code tries to fetch a font, a script or an image from a third-party server, you are depending on something the network may block, rewrite or simply not allow.

For the Google Ads specifics, including how to arrange the files, see HTML5 ZIP for Google Ads: structure, assets and size.

How the ad actually runs

When an impression is served, the network's SDK or ad server creates a container and loads your entry file into it. On mobile apps this is typically a webview. On the web it is usually an iframe.

That container is deliberately limited. The ad is treated as untrusted code from a third party, so it generally cannot reach into the host app, read the page around it, or navigate the user away on its own. Browsers describe this model in their documentation on the iframe element, and it is worth reading once if you build ads by hand.

Practical consequences:

  • Rendering usually relies on standard web features, such as DOM elements or a canvas element for game graphics.
  • The ad should start without waiting on a network round trip. A blank frame while assets download is a lost impression.
  • Anything that needs permission, such as popups, can silently fail. Opening a store page should go through the network's approved exit method, not a raw call like window.open.

The click-through is special

In a normal web page, you link to a URL with an anchor tag. In an ad, that approach is usually wrong, because the network needs to count the click, apply tracking and then route the user.

So each network gives you a mechanism:

  • clickTag: a variable the platform injects with the destination, which your code opens when the user taps. This is the older convention in display advertising.
  • Exit API: a script the network provides, which your code calls to register the exit. Google Ads uses this for HTML5 ads.
  • MRAID: a standard API for in-app ads, where the ad calls an open function on the host container. The IAB Tech Lab's MRAID page is the reference.

The names differ, but the principle is the same: the ad asks the container to open the destination; it does not open it itself. Hardcoding a store URL is one of the most common reasons a package is rejected or an ad runs with no clicks recorded.

The differences are covered in detail in Exit API vs clickTag. If you are shipping to more than one network, expect to adapt this one piece per destination.

Why size and simplicity matter

An ad loads while a user is doing something else, such as scrolling, playing a level or waiting for a screen. It has very little time to earn attention. Heavy packages load slowly, and a slow load often means the user never sees the first screen.

Networks therefore set limits on package size, file count and sometimes load behavior. I am not quoting numbers here because they change and differ by network and format. Check the network's current spec before you export, and keep your own budget well under it.

Good habits that help on every network:

  • Compress images and use the right format for each asset.
  • Reuse sprite sheets instead of many small files.
  • Trim unused code from bundled libraries.
  • Keep audio short and optional.
  • Avoid shipping a full game engine if a few hundred lines of code will do.

What an HTML5 ad is not

A few clarifications that save confusion:

  • It is not a mini app install. Nothing is downloaded to the device. It is a web page that runs and disappears.
  • It is not a video. Video ads are a different format, even though some HTML5 ads contain video.
  • It is not your real game. A playable is a simplified, scripted slice. It should feel like the product, but it does not run your actual game code.
  • It is not a landing page. It lives in a slot, for a short time, and its main job is to get one decision: tap through or leave.

Common packaging mistakes

Most rejections and silent failures come from a short list of causes.

  1. Entry file in the wrong place. The ZIP contains a folder, and index.html is inside it, so the network cannot find it.
  2. Absolute or external URLs. An image or script points to a remote server that the ad slot blocks.
  3. Case-sensitive filename mismatch. Hero.PNG in the folder, hero.png in the code. This works on a laptop and fails on a server.
  4. No exit call, or the wrong one. The ad looks fine in a browser, then records no clicks.
  5. Assets that never load. A path typo leaves a blank background or a missing button.
  6. Wrong dimensions or orientation behavior. The ad was designed for portrait and is served in a landscape slot with no handling.

A good habit is to unzip your own export into a clean folder, open index.html in a browser with the network panel visible, and check that every request resolves to a local file. Then run the steps in the playable ad QA checklist before you upload.

How people build them

There are three common routes:

  • By hand: a developer writes the HTML, CSS and JavaScript, then packages it. This gives full control and takes the most time.
  • With an engine or framework: a game engine exports to HTML5, then the team trims and adapts the output for ad networks.
  • From a listing: a tool starts from the store page, builds a playable from its screenshots and text, and exports a package. PlayableRun works this way for Google Ads-ready ZIPs, and you can see examples in the demos.

Whichever route you take, the output is the same kind of object: a small, self-contained folder with an entry file and a correct click path.

A quick way to think about it

When you are unsure whether something belongs in an HTML5 ad, ask three questions:

  • Is it inside the ZIP, or does it depend on something outside?
  • Does it work with no server, no login and no prior state?
  • Does the click go through the network's exit method?

If the answer to all three is yes, you are probably in good shape.

Where to go next

If you want to see an HTML5 ad rather than read about one, open a few examples in the demos, then unzip an export from a free account and look at the files yourself. It takes about as long as reading this article, and it makes the structure much easier to remember.

Frequently asked questions

›What is an HTML5 ad in simple terms?

It is a small web page, made of HTML, CSS, JavaScript and media files, packaged so an ad network can load it inside an ad slot. It can be a simple animated banner or a fully interactive playable.

›Is an HTML5 ad the same as a playable ad?

No. A playable ad is one kind of HTML5 ad, one that responds to touch input and lets the user try a slice of the app. Many HTML5 ads are animated banners with no interaction beyond the click.

›What files go inside an HTML5 ad ZIP?

Typically an index.html entry file, one or more JavaScript and CSS files, and the images, audio or sprite sheets they use. Some networks also expect a small config or manifest file. Check each network's current spec.

›Can an HTML5 ad load files from my server?

Usually it should not. Most networks expect the ad to be self-contained, with every asset inside the package and relative paths between files. External requests may be blocked, slow, or cause a rejection.

›How does an HTML5 ad send people to the app store?

Through a click handler that calls the network's exit function. Depending on the network that is a clickTag variable, an Exit API call, or an MRAID open call. Hardcoding a store URL in the code often fails review.

›How do I check what is inside an HTML5 ad ZIP?

Unzip it and open index.html in a browser, then look at the file list and the browser's network panel. Confirm the entry file is at the expected location and nothing requests a file that is not in the package.

Sources

Turn your store listing into a playable

Paste an App Store or Google Play link and get an HTML5 playable you can test in minutes. The first one is free.

Keep reading