HTML5 Creative Specs

File Types

HTML, JS, CSS, JPG, JPEG, GIF, PNG, and SVG

File Sizes

Initial Load
Subload
Max Initial Load Count
Max Subload File Count
Max File Size
User-Initiated

300 KB maximum
600 KB maximum
10 files
100 files
5 MB maximum
2.2 MB maximum (RCMD)

JavaScript and CSS Libraries

Commonly used JavaScript and CSS libraries (such as jQuery) do not need to be included with the creative.

Image Sprite

To help increase performance from HTML ads, include image sprites instead of many images to decrease the number of file requests made by your creative.

Video Tags

We do not recommend the use of video tags in HTML5.

MUST READ: Most Common Reasons for Rejected Ads

  • URL’s can not be hard coded in the HTML file. It must be a clickTAG for Keynes to track clicks.
  • Compressed file format. Please read below for the full exact format needed.

HTML5 File Formatting

The following packaging options are available for HTML5 creatives:

  • A single HTML file
  • A single root/main HTML file with supporting images
  • A single root/main HTML file with supporting images and additional supporting JS and CSS files.
  • When packaging HTML5 creatives, zip the assets, not the folder containing the assets.

Single HTML File:

  • All information for serving the creative (with the exception of commonly used JavaScript and CSS libraries) should be included in the HTML file.
  • The maximum HTML file size is 200 kilobytes

Zip Compressed File

  • All files for displaying the creative (with the exception of commonly used JavaScript and CSS libraries) should be included in the Zip file.
  • The primary HTML file should be located in the root of the zip file.
  • Zip files must contain no more than 100 files, including at least one HTML file for use as the initiating
  • File for display. (We suggest keeping the file count low to minimize browser performance impact.)
  • The maximum size of any automatically started video should be less than 1.1 megabytes
  • The maximum size of any individual file is 2.2 megabytes.
  • The maximum size of the primary HTML file should be 100 kilobytes.
  • The Zip file should be smaller than 10 megabytes compressed and the contents should be smaller than 12 megabytes uncompressed.
  • Only file types of HTML, JS, CSS, JPG, JPEG, GIF, PNG, and SVG may be included in the Zip file.

HTML5 ClickTAG Parameters

The ClickTAG parameter is provided to the primary .HTML file as a URL parameter. The name of the URL parameter is customizable at the time of creative upload or during editing. This system is similar to how we provide click-tracking information for hosted Flash ads.

We suggest using JavaScript to read the parameter from the document location URL and using it to set up the landing page for your clicks. You can use single quotes (‘) or double quotes (“) in your code, but you can not mix them. Use either all single quote or all double quotes.

Backup/Default Clickthrough Parameter

To correctly call the clickthrough page through the backup ad image, you must supply a clickthrough parameter for that purpose. If you wish to also use that clickthrough URL in your HTML5 creative, you can configure the creative to use the Backup Clickthrough URL as the Default Clickthrough URL.

Retrieving the Click-Tag Parameter

The Click Tag URL can be retrieved using the following code:

function getParameterByName(name) { name = name.replace(/[\[]/, “\\[“).replace(/[\]]/, “\\]”); var regex = new RegExp(“[\\?&]” + name + “=([^&#]*)”), results = regex.exec(location.search); return results === null ? “” : decodeURIComponent(results[1].replace(/\+/g, ” “)); } Plain Text

Using Multiple Clickthrough URLs

By appending a URL escaped landing page to the click tag URL, our system will track the click and redirect the request to the given landing page.

var clickTag = getParameterByName() +
encodeURIComponent();

Different landing pages can be used for different actions.

Using Multiple Clickthrough URLs

By appending a URL escaped landing page to the click tag URL, our system will track the click and redirect the request to the given landing page.

var clickTag = getParameterByName() +
encodeURIComponent();

Different landing pages can be used for different actions.

function getParameterByName(name) { name = name.replace(/[\[]/, “\\[“).replace(/[\]]/, “\\]”); var regex = new RegExp(“[\\?&]” + name + “=([^&#]*)”), results = regex.exec(location.search); return results === null ? “” : decodeURIComponent(results[1].replace(/\+/g, ” “)); } Plain Text

Using the Click-Tracking Parameter

When the advertisement is clicked on, the creative must direct the user to the correct click tag page in a new window.

Sample Creative HTML using ClickTAG

The following code block shows one way to retrieve and implement a creative with a clickthrough URL that has been specified in the DSP.

In this example, a single image is wrapped with an anchor tag which, when clicked, opens a new window with the address stored in the creative’s clickTAG URL query parameter. The URL to open the window with is stored in window.clickTAG at line 11.

A creative may use any number of ways to open a new window to that address on click. This is one just one example.

<html>
<head>
<script type="text/javascript" charset="utf-8">
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/,
"\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" :
decodeURIComponent(results[1].replace(/\+/g, " "));
}
var clickTAG = getParameterByName("clickTAG");
//At this point, the value for the clickthrough URL
is stored in the variable "window.clickTAG"
//clickTAGs are case-sensitive, so make sure
TAG/Tag/tag is uniform throughout the creative and any
supporting files
</script>
</head><body>
<a
href="javascript:window.open(window.clickTAG);
void(0);">
<img src="clickme.jpg"/>
</a>
</body>
</html>

We could be great together

Connect with one of our Keynes Partners to learn more about what we do

Get Connected

Recent Posts

Are you ready for the Games to begin?

Are you ready for the Games to begin?

Read More
Keynes Digital Named to Inc.’s Annual Best Workplaces List

Keynes Digital Named to Inc.’s Annual Best Workplaces List

Read More
Want to Benefit From CTV Advertising?

Want to Benefit From CTV Advertising?

Read More
Channel Challengers: Viewers vs Networks

Channel Challengers: Viewers vs Networks

Read More
Channeling Success: Mastering Ad Tracking on Streaming TV

Channeling Success: Mastering Ad Tracking on Streaming TV

Read More
Super Bowl LVIII Ads Steal the Spotlight

Super Bowl LVIII Ads Steal the Spotlight

Read More
Is Google’s Cookie Deprecation Eating at You? There are Sweeter Treats Ahead.

Is Google’s Cookie Deprecation Eating at You? There are Sweeter Treats Ahead.

Read More
Decisioned Media, A CTV Buying Dream

Decisioned Media, A CTV Buying Dream

Read More
Get out of line and get into Connected TV

Get out of line and get into Connected TV

Read More
Black Friday V Cyber Monday: The Results Are In

Black Friday V Cyber Monday: The Results Are In

Read More
Keynes Digital Spotted on Inc. 5000 Red Carpet

Keynes Digital Spotted on Inc. 5000 Red Carpet

Read More
Keynes Digital & Dstillery’s Partnership

Keynes Digital & Dstillery’s Partnership

Read More
Keynes Digital is listed in Inc 5000

Keynes Digital is listed in Inc 5000

Read More
The Current’s Hot Seat with Keynes Digital CEO Dan Larkman

The Current’s Hot Seat with Keynes Digital CEO Dan Larkman

Read More
How a Richard Branson Comment Motivated a Connected TV Pioneer

How a Richard Branson Comment Motivated a Connected TV Pioneer

Read More
International Women’s Day Theme is “DigitALL”

International Women’s Day Theme is “DigitALL”

Read More
Connected TV: Audience Targeting vs Content Targeting

Connected TV: Audience Targeting vs Content Targeting

Read More
CTV Breaks Records for 2022’s Black Friday & Cyber Monday

CTV Breaks Records for 2022’s Black Friday & Cyber Monday

Read More
Wellness in the Workplace

Wellness in the Workplace

Read More
Is Netflix Shifting to Ad-Supported TV?

Is Netflix Shifting to Ad-Supported TV?

Read More
And 2021s CTV winner goes to… The viewers!

And 2021s CTV winner goes to… The viewers!

Read More
Connected TV’s Impact on Paid Media Channels

Connected TV’s Impact on Paid Media Channels

Read More
“Digital Champions” with Dan Larkman

“Digital Champions” with Dan Larkman

Read More
TV Advertising in Streaming Services

TV Advertising in Streaming Services

Read More
Programmatic Digest & Dan Larkman

Programmatic Digest & Dan Larkman

Read More
Q2’20 Cord-Cutters vs Q2’21 Stackers

Q2’20 Cord-Cutters vs Q2’21 Stackers

Read More
Traditional Ad Agencies in a Digital World

Traditional Ad Agencies in a Digital World

Read More
Digital TV Terminology Cheat Sheet

Digital TV Terminology Cheat Sheet

Read More
Cross Device : Newest Attribution QA : Keynes Digital

Cross Device : Newest Attribution QA : Keynes Digital

Read More
In-Store Consumer Trends During COVID

In-Store Consumer Trends During COVID

Read More
IAB’s Data Transparency on Marketers

IAB’s Data Transparency on Marketers

Read More
5 Reasons to Switch to Keynes Digital

5 Reasons to Switch to Keynes Digital

Read More
What Impact Will iOS14 Have on Digital Advertising?

What Impact Will iOS14 Have on Digital Advertising?

Read More
Who is 2020s Clear Cut Winner?

Who is 2020s Clear Cut Winner?

Read More
Keynes’ Reporting UI

Keynes’ Reporting UI

Read More
Read More