XHTML-Validator - Viele Fehler - Dringende Hilfe gesucht ;)

Moin Leute,

als ich heute meinen Blog aufgesetzt habe musste ich durch den W3 Validator leider feststellen, dass dieser viele Fehler enthält.
Jetzt meine Frage an euch: Wie bekomme ich diese doch sehr zahlreichen Fehler weg und wo finde ich die Datei(en), die ich bearbeiten muss?
Programmiersprachen kann ich leider keine.
Bin also auf eure Hilfe angewiesen, Danke schonmal im Voraus! : )

[ol]
[li] http://validator.w3.org/images/info_icons/error.png Line 5, Column 71: end tag for „meta“ omitted, but OMITTAG NO was specified <meta name=„viewport“ content=„width=device-width; initial-scale=1.0“> :email: [/li] You may have neglected to close an element, or perhaps you meant to „self-close“ an element, that is, ending it with „/>“ instead of „>“.
[li] http://validator.w3.org/images/info_icons/info.png Line 5, Column 1: start tag was here <meta name=„viewport“ content=„width=device-width; initial-scale=1.0“>[/li][li] http://validator.w3.org/images/info_icons/error.png Line 27, Column 90: required attribute „type“ not specified …www.alltagsnews.de/wp-content/themes/itheme2/js/css3-mediaqueries.js"> :email: [/li] The attribute given above is required for an element that you’ve used, but you have omitted it. For instance, in most HTML and XHTML document types the „type“ attribute is required on the „script“ element and the „alt“ attribute is required for the „img“ element.
Typical values for type are type=„text/css“ for and type=„text/javascript“ for .
[li] http://validator.w3.org/images/info_icons/error.png Line 67, Column 7: required attribute „type“ not specified <style> .recentcomments a{display:inline !import… :email: [/li] The attribute given above is required for an element that you’ve used, but you have omitted it. For instance, in most HTML and XHTML document types the „type“ attribute is required on the „script“ element and the „alt“ attribute is required for the „img“ element.
Typical values for type are type=„text/css“ for and type=„text/javascript“ for .
[li] http://validator.w3.org/images/info_icons/warning.png Line 178, Column 19: character „&“ is the first character of a delimiter but occurred as data !window.jQuery && document.write('<script type=„text/javascript“ src="http:/… :email: [/li] This message may appear in several cases:
[ul]
[li]You tried to include the „<“ character in your page: you should escape it as „<“[/li][li]You used an unescaped ampersand „&“: this may be valid in some contexts, but it is recommended to use „&“, which is always safe.[/li][li]Another possibility is that you forgot to close quotes in a previous tag.[/li][/ul]

[li] http://validator.w3.org/images/info_icons/warning.png Line 178, Column 20: character „&“ is the first character of a delimiter but occurred as data !window.jQuery && document.write('<script type=„text/javascript“ src="http:/… :email: [/li] This message may appear in several cases:
[ul]
[li]You tried to include the „<“ character in your page: you should escape it as „<“[/li][li]You used an unescaped ampersand „&“: this may be valid in some contexts, but it is recommended to use „&“, which is always safe.[/li][li]Another possibility is that you forgot to close quotes in a previous tag.[/li][/ul]

[li] http://validator.w3.org/images/info_icons/error.png Line 178, Column 147: document type does not allow element „script“ here …www.alltagsnews.de/wp-content/themes/itheme2/themify/js/jquery.js"></script>‚) :email: [/li] The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements – such as a „style“ element in the „body“ section instead of inside „head“ – or two elements that overlap (which is not allowed).
One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML’s rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML’s „self-closing“ tags for „meta“ and „link“ in the „head“ section of a HTML document may cause the parser to infer the end of the „head“ section and the beginning of the „body“ section (where „link“ and „meta“ are not allowed; hence the reported error).
[li] http://validator.w3.org/images/info_icons/warning.png Line 178, Column 148: character „<“ is the first character of a delimiter but occurred as data …www.alltagsnews.de/wp-content/themes/itheme2/themify/js/jquery.js"></script>‘) :email: [/li] This message may appear in several cases:
[ul]
[li]You tried to include the „<“ character in your page: you should escape it as „<“[/li][li]You used an unescaped ampersand „&“: this may be valid in some contexts, but it is recommended to use „&“, which is always safe.[/li][li]Another possibility is that you forgot to close quotes in a previous tag.[/li][/ul]

[li] http://validator.w3.org/images/info_icons/error.png Line 180, Column 33: document type does not allow element „script“ here <script type=‚text/javascript‘> :email: [/li] The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements – such as a „style“ element in the „body“ section instead of inside „head“ – or two elements that overlap (which is not allowed).
One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML’s rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML’s „self-closing“ tags for „meta“ and „link“ in the „head“ section of a HTML document may cause the parser to infer the end of the „head“ section and the beginning of the „body“ section (where „link“ and „meta“ are not allowed; hence the reported error).
[li] http://validator.w3.org/images/info_icons/error.png Line 191, Column 31: document type does not allow element „script“ here <script type=‚text/javascript‘> :email: [/li] The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements – such as a „style“ element in the „body“ section instead of inside „head“ – or two elements that overlap (which is not allowed).
One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML’s rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML’s „self-closing“ tags for „meta“ and „link“ in the „head“ section of a HTML document may cause the parser to infer the end of the „head“ section and the beginning of the „body“ section (where „link“ and „meta“ are not allowed; hence the reported error).
[/ol]

Teil 2 der Fehlerausgabe:

[ol]
[li] http://validator.w3.org/images/info_icons/warning.png Line 192, Column 17: character „&“ is the first character of a delimiter but occurred as data !window.jQuery && document.write('<script type=„text/javascript“ src="http://w:email: [/li] This message may appear in several cases:

[ul]
[li]You tried to include the „<“ character in your page: you should escape it as „<“[/li][li]You used an unescaped ampersand „&“: this may be valid in some contexts, but it is recommended to use „&“, which is always safe.[/li][li]Another possibility is that you forgot to close quotes in a previous tag.[/li][/ul]

[li] http://validator.w3.org/images/info_icons/warning.png Line 192, Column 18: character „&“ is the first character of a delimiter but occurred as data !window.jQuery && document.write('<script type=„text/javascript“ src="http://w:email: [/li] This message may appear in several cases:

[ul]
[li]You tried to include the „<“ character in your page: you should escape it as „<“[/li][li]You used an unescaped ampersand „&“: this may be valid in some contexts, but it is recommended to use „&“, which is always safe.[/li][li]Another possibility is that you forgot to close quotes in a previous tag.[/li][/ul]

[li] http://validator.w3.org/images/info_icons/error.png Line 192, Column 145: document type does not allow element „script“ here …www.alltagsnews.de/wp-content/themes/itheme2/themify/js/jquery.js"></script>') :email: [/li] The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements – such as a „style“ element in the „body“ section instead of inside „head“ – or two elements that overlap (which is not allowed).
One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML’s rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML’s „self-closing“ tags for „meta“ and „link“ in the „head“ section of a HTML document may cause the parser to infer the end of the „head“ section and the beginning of the „body“ section (where „link“ and „meta“ are not allowed; hence the reported error).

[li] http://validator.w3.org/images/info_icons/warning.png Line 192, Column 146: character „<“ is the first character of a delimiter but occurred as data …www.alltagsnews.de/wp-content/themes/itheme2/themify/js/jquery.js"></script>') :email: [/li] This message may appear in several cases:

[ul]
[li]You tried to include the „<“ character in your page: you should escape it as „<“[/li][li]You used an unescaped ampersand „&“: this may be valid in some contexts, but it is recommended to use „&“, which is always safe.[/li][li]Another possibility is that you forgot to close quotes in a previous tag.[/li][/ul]

[li] http://validator.w3.org/images/info_icons/error.png Line 194, Column 105: document type does not allow element „script“ here …„http://www.alltagsnews.de/wp-content/themes/itheme2/js/jcarousel.js> :email: [/li] The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements – such as a „style“ element in the „body“ section instead of inside „head“ – or two elements that overlap (which is not allowed).
One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML’s rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML’s „self-closing“ tags for „meta“ and „link“ in the „head“ section of a HTML document may cause the parser to infer the end of the „head“ section and the beginning of the „body“ section (where „link“ and „meta“ are not allowed; hence the reported error).

[li] http://validator.w3.org/images/info_icons/error.png Line 195, Column 31: document type does not allow element „script“ here <script type=„text/javascript“> :email: [/li] The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements – such as a „style“ element in the „body“ section instead of inside „head“ – or two elements that overlap (which is not allowed).
One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML’s rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML’s „self-closing“ tags for „meta“ and „link“ in the „head“ section of a HTML document may cause the parser to infer the end of the „head“ section and the beginning of the „body“ section (where „link“ and „meta“ are not allowed; hence the reported error).

[li] http://validator.w3.org/images/info_icons/error.png Line 231, Column 7: end tag for „script“ omitted, but OMITTAG NO was specified </body> :email: [/li] You may have neglected to close an element, or perhaps you meant to „self-close“ an element, that is, ending it with „/>“ instead of „>“.

[li] http://validator.w3.org/images/info_icons/info.png Line 191, Column 1: start tag was here <script type=‚text/javascript‘>[/li][li] http://validator.w3.org/images/info_icons/error.png Line 231, Column 7: end tag for „script“ omitted, but OMITTAG NO was specified </body> :email: [/li] You may have neglected to close an element, or perhaps you meant to „self-close“ an element, that is, ending it with „/>“ instead of „>“.

[li] http://validator.w3.org/images/info_icons/info.png Line 177, Column 3: start tag was here <script type=‚text/javascript‘>[/li][/ol]

ja lies doch die meldungen ^^

Sorry, aber ich kann keine Programmiersprachen ;D
Und die Datei, in der der Quelltext meiner Wordpressseite steht, finde ich auch nicht -.-"

HTML ist keine Programmiersprache, folglich programmierst Du nichts und musst auch keine Programmiersprache zusätzlich lernen.

Die Fehlermeldungen sind eindeutig. Wenn dir deutsche Meldungen lieber sind, schau dir mal HTML / XHTML / XML / WML Validator an.

Mein Hauptproblem ist nur immer die Dateien zu finden, die ich abändern muss.
Welche sind das denn?

Hi,
ich hab jetzt doch durchs Durchforsten der Dateien 2 Fehler beseitigen können.
Bleiben noch 10 -.-"
Hier komme ich nicht weiter:

!window.jQuery && document.write('[U] Ich erhalte die Meldung "Das Element script ist an dieser Stelle nicht erlaubt". Wie kann ich diesen Fehler beseitigen?

Wahrscheinlich, indem du den JS-Quellcode in HTML-Kommentar-Tags einkleidest.

<script type='text/javascript'> //<!-- !window.jQuery && document.write('<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/themify/js/jquery.js"> … //--> </script>

Habe das aber gerade nicht getestet.

Hat perfekt funktioniert, Danke!
Habe mittlerweile nur noch 8 Fehler, die behoben werden müssen.
Hat jemand eine Idee, wie ich anhand der Zeilenangabe der Fehler die richtigen Zeilen in den Dateien finde?!
Ich muss ja immer alle .php-Dateien des Templates durchforsten, wenn ich einen Fehler finden will der vom Validator erkannt wurde…
z.B. dieser hier:

Zeile 67
Fehler: Im Element ‚style‘ ist das Attribut type vorgeschrieben, welches aber fehlt.
Fehlerstelle: .recentcomments a{display:inline !imp

Allerdings kann ich diese Stelle nirgendwo finden! Woran liegt das?

Analysiert wird die fertige HTML-Seite, die bei WordPress aus mehreren Templates und auch teilweise PHP-Code dynamisch zusammengebaut wird. Das geschieht aber serverseitig, davon bekommt der W3C-Validator nichts mit, kann also nur die Zeilenangabe in der fertigen Datei angeben.

Finden musst du die richtigen Stellen leider selbst.

Wenn du nicht exakt die angezeigte Stelle findest, versuche nach dem „Kontext“ zu suchen. Beispiel: Du suchst einen -Tag, der in der fertigen Seite im -Tag steht. Im Template findest du aber nur … und dazwischen vielleicht irgendwelchen PHP-Code. In diesem Fall wird der -Tag durch diesen PHP-Code generiert.

Hm,
ich habe nun alles auf 4 Fehler reduzieren können.
Kann mir jemand bei diesen letzten 4 Fehlern behilflich sein?
Die bekomm ich einfach nicht weg.
Fehler: HTML / XHTML / XML / WML Validator

Im Element ‚style‘ ist das Attribut type vorgeschrieben, welches aber fehlt.

Das ist die Geschichte, die du nicht findest, nehme ich an?

Im Code steht dazu nur , das könnte also auch raus.

Ich könnte mir vorstellen, dass der Abschnitt von einem Plugin dynamisch generiert wird oder so, wenn du ihn nicht im Template findest. Mehr lässt sich dazu so nicht sagen.

Beim Verwenden von eingebetteten Ereignissen (Event-Handler) muss die verwendete Scriptsprache in einen Meta-Tag
()
und/oder im HTTP-Header (Content-Script-Type: text/javascript) mitgeteilt werden.
Weitergehende Informationen finden Sie hier.

Hier könntest du einfach das angegebene meta-Element in das head-Element des Templates hinzufügen. Aber ehrlichgesagt scheint mir da der Validator etwas pingelig zu sein. Das habe ich so noch nie gesehen.

Zur Behebung der beiden anderen Fehler siehe meinen Post in #10. Das hatte geklappt?

Ja, das hat wunderbar geklappt :slight_smile:
Der Fehler mit dem meta-Element wird mir im w3-Validator garnicht angezeigt (), also lasse ich den mal weg.
Bleibt noch der - Fehler, der leider weiterhin besteht und zu dem ich auch in den versch. php-Dateien nichts finden kann -.-"
Ich habe schon alles durchforstet und es scheint so, als ob dieser Codeteil generiert wird.
Auf diesen generierten Code kann man wohl keinen Einfluss nehmen, oder?

Kann man schon, aber dazu müsstest du dann die Software „hacken“, also downstream (bei dir als „Endnutzer“) verändern. Sowas ist meist sinnlos, da es bei einem offiziellen Update wieder mit der unveränderten Variante überschrieben wird, falls der Hersteller es nicht bei sich auch geändert hat.

Sowas ist üblicherweise ein Fall für einen Bugreport.

Alles klar, das ist schade :frowning:
Danke trotzdem für die gute Hilfe, immerhin habe ich nun nur noch einen Fehler (auch wenn dieser nicht behebbar ist). :wink: