Wie man HTML-embed-code von YouTube W3C-konform?

Hier ist ein Beispiel für den Einbettungscode eines Youtube-Video:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
   <title>I AM YOUR DOCUMENT TITLE REPLACE ME</title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <meta http-equiv="Content-Style-Type" content="text/css">
</head>
<body>
   <div>

<object width="1280" height="750">
    <param name="movie" value="https://www.youtube-nocookie.com/v/WZ-1lfammjk?fs=1&amp;hl=en_US&amp;rel=0"></param>
    <param name="allowFullScreen" value="true"></param>
    <param name="allowscriptaccess" value="always"></param>
    <embed src="https://www.youtube-nocookie.com/v/WZ-1lfammjk?fs=1&amp;hl=en_US&amp;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="1280" height="750"></embed>
</object>

   </div>
</body>
</html>

Habe ich dieses durchgehen des W3C-HTML 4.01 Strict-validator, und bekam folgenden Fehler:

Line 13, Column 115: end tag for element "PARAM" which is not open

Line 14, Column 55: end tag for element "PARAM" which is not open

Line 15, Column 59: end tag for element "PARAM" which is not open

Line 16, Column 16: there is no attribute "SRC"

Line 16, Column 98: there is no attribute "TYPE"

Line 16, Column 148: there is no attribute "ALLOWSCRIPTACCESS"

Line 16, Column 173: there is no attribute "ALLOWFULLSCREEN"

Line 16, Column 186: there is no attribute "WIDTH"

Line 16, Column 200: there is no attribute "HEIGHT"

Line 16, Column 205: element "EMBED" undefined

Was kann ich tun um dies zu beheben? Ich habe nur wenig Erfahrung, so ausführliche Antworten wäre toll. Danke!

  • Sie gehört wird. Haben Sie überprüft? Was hat der validator meckern?
  • Die meisten von uns aufgehört Validierung vor einer Weile durch fleckige Unterstützung von HTML5 und CSS3, wie lange dein code funktioniert in jedem browser, die Sie unterstützen, dann who cares?
  • Was ist doctype? validator.w3.org kann Ihnen sagen, ob es...
  • Gerade überprüft, ich bearbeitet die Frage zu gehören, die Fehler vom W3C, die überprüft mein HTML-fragment auf HTML 4.01 strict.
InformationsquelleAutor hpy | 2011-02-10
Schreibe einen Kommentar