Skip to:

Re: how to embed YouTube-Video into main Blog ?

The embed element is deprecated in XHTML 1.0. Only Netscape needed it (R.I.P.).

This element will invalidate your markup. But then so will a lot of other WP output.

YouTube video links are troublesome, but once you get it figured it’s easy to knock up a template where you can just paste-in the URL. If your site always shows videos at the same size, write a simple PHP function that accepts the ID of the video as a parameter (in the snippet below, thats ‘uOzrZMhf7Ig’).

Here’s an example I know works:

<object width="425" height="344" type="application/x-shockwave-flash" data="">

<param name="movie" value="" />

<param name="allowFullScreen" value="true" />

<param name="allowscriptaccess" value="always" />


The data attribute on the object is required. The allowFullScreen parameter is required if you use the &fs=1 (enable full-screen button) query arg.

Notice also that the query args are escaped.

A very useful page – YouTube APIs and Tools – YouTube Embedded Parameters.


Skip to toolbar