0

I've gotten the following code :

<object type="application/x-shockwave-flash" style="width:420px; height:240px;" data="http://www.youtube.com/v/zOETaUx3c4o?color2=FBE9EC&amp;version=3">
        <param name="movie" value="http://www.youtube.com/v/zOETaUx3c4o?color2=FBE9EC&amp;version=3" />
        <param name="allowFullScreen" value="true" />
        <param name="allowscriptaccess" value="always" />
        </object><div style="font-size: 0.8em"><a href="http://www.tools4noobs.com/online_tools/youtube_xhtml/"></a></div>

It currently works on Google Chrome and the video does play. However, when doing validation I am being given an error and I can't seem to resolve the issue. Does anyone have any idea why I'm receiving such an error :

Line 92, Column 152: document type does not allow element "object" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "address", "fieldset", "ins", "del" start-tag …40px;" data="http://www.youtube.com/v/zOETaUx3c4o?color2=FBE9EC&version=3">

Thanks

Rob
  • 14,746
  • 28
  • 47
  • 65
user3339333
  • 129
  • 1
  • 5
  • 1
    You can’t have `object` as a direct child of `body` in XHTML Strict – and the error message already tells you what kind of elements you could try and wrap around it … – CBroe Feb 28 '14 at 20:09
  • Sorry...new to XHTML... So do I remove object or just add additional elements that are allowed as the primary one? – user3339333 Feb 28 '14 at 20:36
  • 1
    Well removing the `object` will not result in much video embedding, don’t you think …? – CBroe Feb 28 '14 at 20:37
  • Why do you need XHTML 1.0 Strict? I mean, not that I'm opposed to the use of XHTML, but it has very specific rules that have no basis in reality, and you can just use a HTML5 file and be done with it. (HTML5 does not have this silly rule that `body` or `form` or `blockquote` can't contain phrasing content.) – Mr Lister Mar 01 '14 at 15:49

0 Answers0