Ad tags are used for many purposes in display advertising:
These tags are all essentially the same in structure: they are all requests for content of a certain size and type from a certain URL. The content is either a creative or another ad tag and it may be returned immediately in one step or after multiple steps (an auction, redirects, etc.) each with its own tag. An ad tag may look very long and complicated if information about the ad call is included in the tag itself, or it might be very short and simple if ad call information is stored in the server to which the tag's URL is pointed.
An ad tag has two parts:
The purpose of the code is to tell the browser how to display the ad (or other content) that they get from the URL request. For example, the HTML
<iframe> tag tells the browser to open a mini browser window of a specified size inside the current window. This way the ad content cannot expand beyond the size specified and "take over" the screen.
For example, here's a Xandr ad tag that a publisher would use to auction an impression.
This is what the different parts of the tag are doing:
src=tells the browser to retrieve content from the URL http://ib.adnxs.com/ttj?id=1234
id=1234is the ID that Xandr has assigned to this ad tag. This allows information about the ad tag, such as ad size or reserve price for the ad, to be stored on the impression bus rather than on the page itself. This way the information can be changed at any time without requiring a new tag.
document.write('<iframe frameborder="0" width="160" height="600" marginheight="0" marginwidth="0" target="_blank" scrolling="no" src="http://ad.yieldmanager.com/st?ad_type=iframe&ad_size=160x600§ion=560122&m6li=1302146"></iframe>');
iframe frameborder="0" width="160" height="600"tells the browser to open a 160x600 iframe.
src="http://ad.yieldmanager.com/st?ad_type=iframe&ad_size=160x600§ion=560122&m6li=1302146" tells the browser to deposit specific content from the Yield Manager ad server into the iframe.
The Yield Manager URL does not point to an actual creative image file, because the Yield Manager ad server makes a dynamic decision about which image to pass to the browser. This URL's query string (everything after the "?") gives Yield Manager information that will help it decide which creative to pass back.
Most people dealing with ad tags (publishers, who need tags to put on their inventory pages, and advertisers, who may use tags to direct a browser to their creative) aren't hand building tags; they are inputting their page information or creatives into their ad server's user interface, which creates a properly formatted ad tag for them.
There are many permutations of ad tag syntax depending on what the tag is doing and whether the ad tag info is on the page or in a server.
A publisher ensures that the ad is an iframe.
A Google AdSense tag
In the NOSCRIPT section, the HREF link is the landing page of the ad and the SRC is the ad itself.