If you’re on YouTube or Vimeo and click an Embed button to get the code to embed a video on your site or on your blog, you might notice something new: the code they give you is a simple 1-line iframe, rather than the long, complicated object and embed tags.
Years ago, people predicted that iframes would go the way of the dodo, but developers still find them useful. The reason YouTube and Vimeo are now using them is that the iPad and iPhone don’t support Flash, and that’s the format these videos are coded in. But when you insert an iframe, the video sharing service can insert something more compatible. The iframe code also has the advantage of being a lot more simple, and it’s easier to re-size the video to fit your web page.
If you still need the old method for backwards compatibility, both sites let you click a button to get the legacy code.