1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2011
    Rep Power

    Embed Tag - Should I...

    Hi, i am working on a site at the moment and i need to use the <embed> tag for YouTube videos, rather than <object> or <iframe> as both <object> or <iframe> are causing conflicts with other scripts when i view my site on an iphone or ipad.

    A - is the <embed> tag ok to you use

    B - which is newer <embed> or <object>

    Thanks in advance for your help...
  2. #2
  3. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    USA (verifiably)
    Rep Power
    Yes, it's fine to use <embed> (current HTML5 working draft). However, it won't validate as HTML 4.01 or XHTML 1.x.

    It doesn't really make a difference which is newer, but I think <embed> might be slightly older than <object>.

    P.S. I'm curious, why did you post this in the CSS forum instead of the HTML forum?
    Spreading knowledge, one newbie at a time.

    Learn CSS. | PHP includes | HTML Validator | CSS validator

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).

IMN logo majestic logo threadwatch logo seochat tools logo