HTML5 creative specifications
Overview
This document contains the specifications for HTML5 creatives delivered with Equativ's ad server.
IAB guidelines
For detailed guidance on HTML5 creatives, refer to the IAB's HTML5 for Digital Advertising guidelines.
HTML5 creative structure
An HTML5 creative typically contains the following:
- Main
index.html
file - Assets, such as image files or video files
- CSS file
- Javascript file
To avoid browser security warnings, HTML5 creatives must load libraries and resources, such as javascript files or CSS files with HTTPS.
Supported file formats
Supported file format | File name extension |
---|---|
HTML, CSS, Javascript | html, css, js |
Image | jpg, jpeg, png, gif |
Other | txt, zip, xml, woff, woff2 |
Video/Audio/Playlist | mp4, m4v, wmv, m4a, avi, webm, 3gp, ogg, mp3, aac, ogv, m3u8* |
* HTML5 videos must be transcoded at minimum into the formats H.264/MP4 and VP8/WebM.
Javascript libraries with the extension min.js (minified javascript) are not supported!
HTML5 zip file
Bundle the HTML5 creative into a ZIP file before uploading it to Equativ Monetization Platform. The following rules apply:
- Name the main html file
index.html
. - In the
<head>
of theindex.html
file, add<meta charset="UTF-8">
to allow for the reading of most special characters. - Place the
index.html
file at the root of the ZIP file. Don't place it into a sub-folder. - Place the assets into sub-folders or at the root of the zip file. If you choose sub-folders, don't compress them.
- Only use assets used by the HTML5 creative. Don't use "orphan" assets.
- Don't use dots in the ZIP file name. For example, don't name the ZIP file
creative.test.zip
. - In the ZIP file name, don't use any special characters—for example, !, ?, ¿, ¡, @, #, or %—and don't use language-specific characters, such as é, à, ê, ï, ñ, or ç.
- Don't use dots in folder names inside the HTML5 ZIP file. For example, don't name a folder
test.folder
. - Don't start a file name inside the HTML5 ZIP file with a dot.
- Don't start creative file names with a dot.
Maximum file size and pricing
The following file size limits apply to the compressed ZIP file (including the index.html, CSS, js, and asset files):
- The maximum file size you can upload into an insertion in EMP is 50 MB.
- The maximum size of the uploaded ZIP file without the additional fee for heavy creatives depends in the provisions in your contract with Equativ.
Best practices
The following is a list of recommendations to be followed by developers creating HTML creatives:
- Keep images light:
- In CSS, use global class names instead of inline styles for each tag.
- Use indexed PNG or GIF files rather than heavier JPEG files.
- Don't use transparency if it is not needed.
- Choose the lowest quality and the maximum compression rate to get the best quality with minimal weight.
- Keep code light:
- In CSS, use global class names instead of inline styles for each tag.
- Use efficient and compact javascript.
- Minify code whenever possible to reduce file length.
- Reduce the number of parallel HTTPS requests:
- In case of images, use sprites.
- In case of javascript, merge all scripts in a single javascript file.
- Ensure that the HTML5 creative loads libraries, such as javascript files or css files, and any other resources with HTTPS.
- Embed libraries, such as jQuery directly in the HTML5 creative. Don't reference them as external libraries.