Need help with iframe
I'm trying to display a YouTube video that is the trailer for a film tour that a nonprofit is hosting. I go to video on YouTube, click share and then click embed. I get the following "iframe code" that I put inside a <p> tag on our webpage. But this does not work.
<p align="center"><iframe width="560" height="315" src="//www.youtube.com/embed/P4pcbMr1hMY?rel=0" frameborder="0" allowfullscreen></iframe></p>
Is there something I must set or change to allow the use of iframes? I don't know if it is relevant, but I'm using XHTML 1.0 Transitional. Any help would be appreciated.
I'm not a professional programmer, just a volunteer with the nonprofit that I work with, so comments in the simplest language would be appreciated.
Thank you in advance.
I believe your problem is with allowfullscreen. allowFullScreen is not a valid attribute of the iframe tag. Even if it was, you need to have a value and the value needs to be in quotes. This should be a class like class="youtube-player fullscreen".
<iframe title="YouTube video player" class="youtube-player" type="text/html" width="560" height="315" src="http://www.youtube.com/embed/P4pcbMr1hMY?rel=0" frameborder="0" allowFullScreen></iframe></p>