Making YouTube’s embed code XHTML 1.0 Strict
YouTube is great for sharing videos. However, when you want to embed those videos on your own website, it can be difficult to validate the ’embed code’ that they give you, especially when you are using the ‘XHTML 1.0 Strict’ doctype.
Google now gives you the option of ‘iframes’ or the old ’embed’ code. Despite the iframe option being made available for the HTML5 specification, you’ll still find they don’t validate in ‘XHTML 1.0 Strict’! How frustrating.
Well, there is a way of changing the old ’embed’ code to make it compliant. Here is the code to make your YouTube videos validate correctly: Continue reading “Making YouTube’s embed code XHTML 1.0 Strict”