Horst-Martin Schwarz: validierungs Fehler

Bei der Validierung meiner Seite habe ich folgende Fehlermeldung erhalten, die ich nicht verstehe:

Below are the results of attempting to parse this document with an SGML parser.

1. Line 16, column 3: document type does not allow element "H2" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag

<h2>Für Windows XP</h2>
     ^

Betrifft:
  1: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
   2: <html>
   3: <head>
   4:   <meta http-equiv="content-type"
   5:  content="text/html; charset=ISO-8859-15">
   6:   <title>Miniaturansicht dauerhaft speichern- Horst-Martin Schwarz</title>
   7: </head>
   8: <body vlink="#ff0000" alink="#000088" link="#0000ff"
   9:  style="color: rgb(255, 255, 255); background-color: rgb(51, 0, 51);">
  10: <div style="text-align: center;"><a href="index.html"
  11:  style="color: rgb(51, 51, 255);">Zurück</a><br>
  12: </div>
  13: <h1 style="color: rgb(255, 0, 0); text-align: left;">Miniaturansicht
  14: dauerhaft speichern - Tipp von [ MVP] Sven Maehl</h1>
  15: <span style="color: rgb(255, 0, 0);">                          
  16: <h2>Für Windows XP</h2>

Was mus ich da ändern?

  1. hallo,

    15: <span style="color: rgb(255, 0, 0);">                          
      16: <h2>Für Windows XP</h2>
    Was mus ich da ändern?

    Es fehlt wahrscheinlich ein </span>. Außerdem ist dringend zu überlegen, was die vielen   sollen und ob es dafür nicht eine bessere Lösung gibt.

    Grüße aus Berlin

    Christoph S.

  2. Hallo,

    8: <body vlink="#ff0000" alink="#000088" link="#0000ff"
       9:  style="color: rgb(255, 255, 255); background-color: rgb(51, 0, 51);">

    Nimm da die veralteten Farb-Attribute (vlink, alink, link) raus.
    Oder ergaenze - wenn schon - auch die beiden fehlden Farben (text, bgcolor).

    http://www.w3.org/2003/07/30-color

    Zudem wuerde ich saemtlichen Inline-Styles wegmachen und stattdessen
    alles CSS ueber einen STYLE-Bereich im HEAD oder - besser - ueber
    eine externe CSS-Datei definieren.

    15: <span style="color: rgb(255, 0, 0);">                          
      16: <h2>Für Windows XP</h2>

    Mach die sinnlosen   weg.

    Was mus ich da ändern?

    Du willst falsch verschachteln:
    <span><h2>blabla</h2></span>
    ist nicht erlaubt.
    SPAN ist ein Inline-Element, H2 ein Block-Level-Element.

    Nimm - wenn schon - <div> statt <span>.
    Meist ist nichtmal das notwendig. Du kannst auch h2 direkt mit CSS formatieren.

    Gruesse,

    Thomas