Share with
your colleagues!

High-contrasting 1px borders around ads

Written by Roy
Jan 2, 2023 • 2 min read
PDF Version
Download instantly chevron_right Knowledge Base chevron_right
HTML5 & Ad Tags
PDF Version
Download instantly

Most publishers require ads to have clear contrasting borders. It's typically a black 1px wide line around all 4 edges. In this article I'll explain why such a border is required and how you can detect it automatically.

Why do creatives have high contrasting borders?

These are the main reasons:

  1. To distinguish. Ads with a black border will help to clearly distinguish the ad from the rest of the content, making it easier for the user to identify the content as an ad.
  2. Hierachy. Natually, people are hard-wired to be attracted to something that stands out. A black border does exactly that job. It helps to understand that it's a separate entity, and thus something to click on if considerd useful.
  3. To prevent blending. If an ad with a white background doesn't have a border, the ad's content may blend in with the main content on the page. This has undesirable effects if the user clicks on elements on the ad with the intention to learn more and stay on the publisher's page. This also leads to accidental clicks, having a detrimental effect on CTR.
  4. To meet IAB standards. Ad standards like the IAB's Display Advertising guidelines recommend that ads have a black border for the reasons here above. Publishers may adhere to these guidelines and therefore require all ads to have high-contrasting borders.

Any example?

Take these two ads for instance. Which one stands out, doesn't blend with the main content of this page, and is obviously an ad?


Without a doubt, the right ad is indistinguishable an ad that can be clicked on. The left ad leaves room for confusion. As the user's online attention span is limited, this ad misses opportunities and most likely has a lower CTR.

How to detect high-contrasting borders?

These are the 3 ways to detect borders around ads:

  1. Manual verification. Open the ad in a browser. If it's a JavaScript based ad, you can run it on an empty HTML test page. Give it the extension .html and open it in your browser. For HTML5 ads, open the index.html file.
  2. Border detector. Copy/paste the ad tag to this free online Creative Border Detector. If it's an HTML5 creative, use this border detector.
  3. Ad validation API. Use this ad validation API to automatically detect the borders of ads, and reject the ad in your further logic if it doesn't have one.


Black borders around ads are commonly required by publishers to help the ad stand out from the main content, make it more noticible to users and prevent blending of the ad with other elements on the page.

Download this article as PDF?

No time to read the whole article? Download a free PDF version of this article for later:


To link to this article, please use:

External Resources

More from