Requirements for banners
You can upload an image banner or HTML5 banner.
Technical requirements for image banners
Full version of yandex.com, new Yandex Browser tab | Mobile version of yandex.com | |
---|---|---|
Size in pixels | 1456 × 180 | 640 × 134 |
Maximum file size | 1 МБ | 512 KB |
Format | JPG, PNG or GIF |
Full version of yandex.com, new Yandex Browser tab | Mobile version of yandex.com | |
---|---|---|
Size in pixels | 1456 × 180 | 640 × 134 |
Maximum file size | 1 МБ | 512 KB |
Format | JPG, PNG or GIF |
Technical requirements for HTML5 banners
HTML5 banners must be ZIP files that contain one HTML file and JavaScript, JSON, CSS, JPEG, GIF, PNG, or SVG files.
Full version of yandex.com, new Yandex Browser tab | ||
---|---|---|
Size in pixels | 1456 × 180 | |
Maximum archive size | 1 МБ |
Full version of yandex.com, new Yandex Browser tab | ||
---|---|---|
Size in pixels | 1456 × 180 | |
Maximum archive size | 1 МБ |
HTML5 banners aren't placed on the mobile version of the ya.ru website.
The archive and files used in the banner must meet the following requirements:
The file and directory names can only contain Latin letters, digits, and the characters
-._~
.All links in an HTML5 banner must be relative and lead to other files in the archive.
The archive can contain up to 20 files. Include source code from JavaScript, CSS, and SVG in the HTML file and combine all bitmaps into a single file (a sprite atlas).
The maximum size of the index.html file in the archive must be under 150 KB.
The contents of the __MACOSX folders and the .DS_Store and Thumbs.db files will be ignored in the archive. These are the operating system's auxiliary files which are not necessary for the HTML5 banner to work.
A click on the banner opens the page specified in the Link to site field, a mobile app (if installed), or the app's page in an app store (if the app isn't installed). Banner clicks must open this page by calling the
yandexHTML5BannerApi.getClickURLNum(1)
method.<a id="click_area" href="#" target="_blank">...</a> // after the "<a href ...></a>" element, // assign its href attribute as follows: <script> document.getElementById("click_area").href = yandexHTML5BannerApi.getClickURLNum(1); </script>
- The HTML5 banner size must be specified in the content attribute of the meta tag. See the example below:
<meta name="ad.size" content="width=1456,height=180">
External calls to Yandex-hosted JavaScript libraries are allowed. If an HTML5 banner uses a different library, include it in the archive source code.