[HTML] Validator Fehler

Dieses Thema im Forum "Webdesign" wurde erstellt von 7h1nk, 28. August 2010 .

Schlagworte:
Status des Themas:
Es sind keine weiteren Antworten möglich.
  1. 28. August 2010
    Validator Fehler

    Guden Jungs,
    habe da folgendes Problem, ich muss in einer HTML Seite Fehler finden (Regeln von HTML 4.01) und dachte ich habe alle gefunden aber wenn ich die Datei validiere zeigt er mir 2 Fehler an.Am besten ich zeig euch mal denn Quellcode mit Fehler und danach meine bearbeitung

    Quellcode mit Fehler

    1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.01 Transitional//EN" "http://www.w3.org/TR/html4/DTD/loose.dtd">
    2. <HTML>
    3. <head>
    4. <titel></titel>
    5. <meta name="author" content="">
    6. </head>
    7. <body>
    8. <h2>Hier entsteht eine <strong> (X)HTML-Datei</h2>
    9. <p>Herzlich<br>Willkommen!</p>
    10.<hr>
    11.<img src="bild.gif">
    12.</body></HTML>

    So Fehler sind meiner Meinung nach in den Zeilen (Meine bearbeitung)
    1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/DTD/loose.dtd">
    2.<html> (es muss doch alles klein geschrieben werden oder?)
    4. <titel>Aufgabe 1</titel> (es muss ein Titel angegeben werden ?)
    5.<meta name="author" content="author"> (es muss content angegeben werden ?????)
    8. <h2>Hier entsteht eine <strong> (X)HTML-Datei </strong></h2>(es fehlt der Endtag von <strong>)
    11. <img src="bild.gif" alt="bild=> (es muss ein alternativ Pfad angegeben werden falls das bild nicht verfügbar ist?)
    12.</body></html> (wie schon in Zeile 2 es muss alles klein geschrieben werden)

    So Jungs ich hoffe ihr könnt mir sagen ob ich das alles richtig gemacht habe so und WO der fehler liegt????Hier sind noch die 2 Fehler laut Validator

    1. {bild-down: http://validator.w3.org/images/info_icons/error.png}
      Line 4, Column 7: element "TITEL" undefined <titel></titel>
      You have used the element named above in your document, but the document type you are using does not define an element of that name. This error is often caused by:
      • incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Frameset" document type to get the "<frameset>" element),
      • by using vendor proprietary extensions such as "<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the desired effect instead).
      • by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case).
    2. {bild-down: http://validator.w3.org/images/info_icons/error.png}
      Line 6, Column 7: end tag for "HEAD" which is not finished </head>
      Most likely, you nested tags and closed them in the wrong order. For example <p><em>...</p> is not acceptable, as <em> must be closed before <p>. Acceptable nesting is: <p><em>...</em></p>
      Another possibility is that you used an element which requires a child element that you did not include. Hence the parent element is "not finished", not complete. For instance, in HTML the <head> element must contain a <title> child element, lists require appropriate list items (<ul> and <ol> require <li>; <dl> requires <dt> and <dd>), and so on.
    MFG 7h1nk
     
  2. 28. August 2010
    AW: Validator Fehler

    <title>

    der zweite fehler kommt auf grund des ersten.

    zudem:
    - doctype falsch (html 3.01 aber html 4 dtd --- ähm html 3.01 ?)
    - </strong> fehlt
    - <img> benötigt ein alt="" attribut.
     
  3. 28. August 2010
    AW: Validator Fehler

    So jetzt mal der Code wie er sein soll:

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/DTD/loose.dtd">
    <html>
    <head>
    <titel> Aufgabe 1</titel>
    <meta name="author" content="author">
    </head>
    <body>
    <h2>Hier entsteht eine <strong> (X)HTML-Datei </strong></h2>
    <p>Herzlich<br>Willkommen!</p>
    <hr>
    <img src="bild.gif" alt="bild">
    </body></html>

    trotzdem werden mir folgende fehler angezeigt

    1. Error Line 4, Column 7: element "TITEL" undefined

    <titel> Aufgabe 1</titel>

    ?

    You have used the element named above in your document, but the document type you are using does not define an element of that name. This error is often caused by:
    * incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Frameset" document type to get the "<frameset>" element),
    * by using vendor proprietary extensions such as "<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the desired effect instead).
    * by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case).
    2. Error Line 6, Column 7: end tag for "HEAD" which is not finished

    </head>

    ?

    Most likely, you nested tags and closed them in the wrong order. For example <p><em>...</p> is not acceptable, as <em> must be closed before <p>. Acceptable nesting is: <p><em>...</em></p>

    Another possibility is that you used an element which requires a child element that you did not include. Hence the parent element is "not finished", not complete. For instance, in HTML the <head> element must contain a <title> child element, lists require appropriate list items (<ul> and <ol> require <li>; <dl> requires <dt> and <dd>), and so on.


    jetzt meine frage warum???? titel und head sind doch definiert????
     
  4. 28. August 2010
    AW: Validator Fehler

    liest du auch das was Murdoc schreibt?
    Das heißt title nicht titel.

    Spoiler
    PHP:
    <! DOCTYPE html  PUBLIC  "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/DTD/loose.dtd" >
    <
    html >
    <
    head >
    <
    title Aufgabe 1 </ title >
    <
    meta name = "author"  content = "author" >
    </
    head >
    <
    body >
    <
    h2 > Hier entsteht eine  < strong > ( X ) HTML - Datei  </ strong ></ h2 >
    <
    p > Herzlich < br > Willkommen !</ p >
    <
    hr >
    <
    img src = "bild.gif"  alt = "bild" >
    </
    body ></ html >
     
  5. 28. August 2010
    AW: Validator Fehler

    Lass dir deine Seite doch direkt richtig validieren da gibt es doch extra ein Haken den du anklicken kannst.
     
  6. 3. September 2010
    AW: Validator Fehler

    Also tut mir leid, die Lösungen sind gepostet und man kann erwarten das du vllt. nur im Ansatz auf SELFHTML schaust....


    ~closed~
     
  7. Video Script

    Videos zum Themenbereich

    * gefundene Videos auf YouTube, anhand der Überschrift.