…or what to use instead of
iframe in XHTML Strict pages.
I have added some kayak.com ads the other night, to the archive pages related to traveling. These ads are actually full-featured search snippets that allows you to directly search kayak.com database. Very handy things.
Sadly, they are written the old-fashion way, with quirks mode in mind, and worse yet - they are writing nested table tag soup directly into the page - no
iframe thingie, like Google AdSense is doing. Thus, when my CSS files got applied to it, the snippet fell apart.
Luckily, the snippet always opens a new window, thus I quickly coded in an iframe in which the snippet is displayed. Which was all dandy…apart from the fact that my pages are XHTML 1.0 Strict, in which
iframe is banned element. Jolly.
Correct way to include another HTML page into another is by
object. The element which only purpose is to insert any foreign object into nice and structured web page.