While YouTube has featured the iFrame embed capability for about six months now, they’ve quietly promoted this method to be the primary embed format, all in an effort to further the transition to HTML 5 protocols.
Until recently, the standard embed format used the object tag, like so:
<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/wsZ8h9_X-A4?fs=1&hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/wsZ8h9_X-A4?fs=1&hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>
But now, when a user depresses the embed button, they are greeted with this:
<iframe title="YouTube video player" class="youtube-player" type="text/html" width="640" height="390" src="http://www.youtube.com/embed/UcnEIgmq8iw" frameborder="0" allowFullScreen></iframe>
As indicated, the ability to use iFrame embeds has been around since July of 2010, but the change in default embed format reveals YouTube’s preference for an HTML 5 world. Users can still use the orginal <object>-based embeds by selecting the “Use old embed code” selection if desired.
In terms of compatibility, at least one WordPress blogger -- the author of this post -- indicates their blog’s backend stripped the iFrame tag out, making the new style unusable. Granted, the iFrame removal could be because of any number of WordPress plugins -- the SEO plugin is one suspect -- nevertheless, there are some compatibility issues with YouTube’s new format.
Considering iFrames aren’t necessarily SEO-friendly to begin with, something the ReelSEO blog discusses here, perhaps the WordPress bloggers of the world should continue using the old embed style, or perhaps disable their SEO plugins.
More from ReelSEO:
And with that, YouTube is firmly in the HTML 5 corner, although, they are kind enough to throw a bone to those who prefer the old embed format.
I’m looking at you, WordPress bloggers.