xhtmlembedw3c-validationxhtml-transitional

Element "embed" undefined, XHTML 1.0 Transitional (W3C)


I am trying to validate my page as XHTML 1.0 Transitional (W3C). And I have the following error: element "embed" undefined + there is no attribute "src", there is no attribute "quality", there is no attribute "width" there is no attribute "height", there is no attribute "align", there is no attribute "bgcolor", there is no attribute "name"

please see the source code:

<embed src="<?php info(template_directory); ?>/images/top-flash.swf"
    quality="high" bgcolor="#000099"
    width="960" height="362"
    name="flash" align="left"
    allowScriptAccess="sameDomain"
    allowFullScreen="false"
    wmode="transparent"
    type="application/x-shockwave-flash"
    pluginspage="http://www.macromedia.com/go/getflashplayer"
    vspace="0" hspace="0"
    style="padding:0; margin:0;" />

Please help me to pass this validation.


Solution

  • As @MichaelWagner has stated, element is really "not defined in XHTML 1.0 Transitional standard". However, another solution could be to not changing the doctype, but changing the embed to object. Thus Your code for including a .swf file could look like this:

    <object type="application/x-shockwave-flash" data="TEMPLATE_DIRECTORY/images/top-flash.swf" width="960" height="362" name="flash" align="left" style="padding:0; margin:0;">
        <param name="movie" value="TEMPLATE_DIRECTORY/images/top-flash.swf" />
        <param name="allowScriptAccess" value="sameDomain" />
        <param name="allowfullscreen" value="false" />
        <param name="bgcolor" value="#000099" />
        <param name="quality" value="high" />
        <param name="wmode" value="transparent" />
        <a href="http://get.adobe.com/flashplayer/">Get Adobe Flash Player</a>
    </object>
    

    Results in: This document was successfully checked as XHTML 1.0 Transitional!

    The following transformations apply (from embed to object):

    Don't forget to change TEMPLATE_DIRECTORY/images/top-flash.swf to the original <?php info(template_directory); ?>/images/top-flash.swf