Results 1 to 2 of 2

Thread: Need help with iframe

  1. #1
    Join Date
    Feb 2007

    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.


  2. #2
    Join Date
    Aug 2013
    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>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center