annalein214: w3c Validierung - no doctype found

Hallo,

ich wollte meine Seite kontrollieren und stellte fest, dass der Validator viele Fehler auswirft:

No DOCTYPE found, and unknown root element. Aborting validation.
The DOCTYPE Declaration was not recognized or is missing.
Unable to Determine Parse Mode!
No Character Encoding Found! Falling back to UTF-8.

Ich habe aber einen Doctype gesetzt und die Kodierung utf-8 gewählt und alle Seiten im Editor als solche gespeichert.

Hier mein Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html" charset="utf-8" />
  <meta name="title" content="Annaleins Website" />
  <meta name="subject" content="Tipps für Linux und Mac OS X Leopard" />
  <meta name="keywords" content="X11, Linux, Ubuntu, Xfce, Xubuntu" />
  <meta name="description" content="Tipps für Linux und Mac OS X Leopard" />
  <meta name="language" content="de" />
  <meta name="robots" content="index,follow" />
  <title>Annaleins Website</title>
  <link rel="stylesheet" type="text/css" href="style.css" />
    <style type="text/css">
      /* ... hier sind dateispezifische Formate erlaubt ... */
    </style>
</head>
<!-- ********* Layout ********************************************************** -->

<body>
<div id="outline">
  <img src="images/gradient.jpg" alt="" height="400pt" width="100%" border="0" />  <!-- Füge das Hintergrundbild ein -->
<div id="title">                                                                   <!-- Füge den Titel ein -->
  <?php
  include "menu.php";                                                              // Datei enthält Array für Navigation
  for ($x=1; $x<7; $x++) {                                                         // Rufe die 5 möglichen Array Zeilen auf
     $getdoc = substr($_GET['doc'], 0, 3) ;
 $file_doc = substr($file[$x], 0, 3) ;
      if ( $getdoc==$file_doc ) {                                                     // Picke die gewünschte Zeile aus dem Array
         echo "<h4>Annaleins Homepage - $name[$x] </h4>";}                        // Schreibe den dynamischen Titel
     else {  }; };                                                                 // Mache für die restlichen Zeilen nichts

if ($_GET['doc']=='') {
         echo "<h4>Annaleins Homepage - Home </h4>";}   ?></div>             <!-- Titel fuer Startseite da dort doc='' -->

<!-- ***Navigation********************************************************* -->

<ul id="navigation">

<?php
  include "menu.php";                                                             // Binde das Menü ein
  for ($x=1; $x<7; $x++) {                                                        // Erste Navigationsebene
      echo "<li style='list-style: none; font-size: 14pt; font-weight: bold;'> <a href='index.php?doc=$file[$x]'>$name[$x]</a> <ul>";
 $getdoc = substr($_GET['doc'], 0, 3) ;
 $file_doc = substr($file[$x], 0, 3) ;
      if ( $getdoc==$file_doc ) {                                            // zweite Navigationsebene
          for ($z=1; $z<10; $z++) {
             if ($x==1) { echo "<li style='list-style: none;'> <a href='index.php?doc=$file1[$z]'>$name1[$z]</a> </li>"; }
      if ($x==2) { echo "<li style='list-style: none;'> <a href='index.php?doc=$file2[$z]'>$name2[$z]</a> </li>"; }
             if ($x==3) { echo "<li style='list-style: none;'> <a href='index.php?doc=$file3[$z]'>$name3[$z]</a> </li>"; }                               if ($x==4) { echo "<li style='list-style: none;'> <a href='index.php?doc=$file4[$z]'>$name4[$z]</a> </li>"; }                 if ($x==5) { echo "<li style='list-style: none;'> <a href='index.php?doc=$file5[$z]'>$name5[$z]</a> </li>"; } ;
 echo "</ul>" }; } ;
      echo "</ul></li>"; } ?> </ul>

<!-- ********* Content ************************************************** -->

<div id="text">
  <?php
       // echo "GET-DOC " ; echo $_GET['doc']; echo " getdoc "; echo $getdoc ; echo " file-doc "; echo $file_doc ;
    if ($_GET['doc']=='') { /*echo "0";*/
 include "content/start.inc";}                                              // Füge Startseite ein wenn doc=''
    else { // echo $_GET['doc'];                                                   // Füge passende Inhaltsseite ein
 include "content/" .$_GET['doc']. ".inc"; }; ?> </div>

<!-- ***** Ende Seiteninhalt ******************************************** -->
    </div>
  </body>
</html>

Ich bin für Hilfe super dankbar. Liebe Grüße Anna.

  1. Hi,

    habe noch die URL vergessen.

    http://obirap.homeunix.org/~annalein/

    für Interessierte...

    Kritik und Kommentare sind immer willkommen!

    Gruß Anna.

    1. auf

      http://obirap.homeunix.org/~annalein/

      erwartet mich nur:

      Parse error: syntax error, unexpected '}', expecting ',' or ';' in /home/annalein/public_html/index.php on line 43

      1. Sorry, hatte da für ein paar Minuten einen Fehler drinnen, bis ich ihn bemerkt habe. Die Seite wird nun angezeigt.

        Ich habe den Serverseitigen Code gepostet, weil ich dachte dass der Fehler sowieso irgendwo im Kopf der Seite liegt.

        Sorry, dass ich die URL nicht richtig gepostet habe.

        Also die html Datei zeigt folgendes:

        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
        <html>
        <head>
          <meta http-equiv="Content-Type" content="text/html" charset="utf-8" />
          <meta name="title" content="Annaleins Website" />
          <meta name="subject" content="Tipps für Linux und Mac OS X Leopard" />
          <meta name="keywords" content="X11, Linux, Ubuntu" />
          <meta name="description" content="Tipps für Linux und Mac OS X Leopard, sowie Vorlesungsmitschriften." />
          <meta name="language" content="de" />
          <meta name="robots" content="index,follow" />
          <title>Annaleins Website</title>
          <link rel="stylesheet" type="text/css" href="style.css" />
            <style type="text/css">
              /* ... hier sind dateispezifische Formate erlaubt ... */
            </style>
        </head>
        <!-- ********* Layout ******************************************************* -->

        <body>
        <div id="outline">
          <img src="images/gradient.jpg" alt="" height="400pt" width="100%" border="0" />  <!-- Füge das Hintergrundbild ein -->
        <div id="title">                                                                   <!-- Füge den Titel ein -->
          <h4>Annaleins Homepage - Uni </h4></div>             <!-- Titel fuer Startseite da dort doc='' -->

        <!-- ********* Navigation ******************************************************* -->

        <ul id="navigation">

        <li style='list-style: none; font-size: 14pt; font-weight: bold;'> <a href='index.php?doc=start'>Home</a> <ul></ul></li><li style='list-style: none; font-size: 14pt; font-weight: bold;'> <a href='index.php?doc=uni/start'>Uni</a> <ul><li style='list-style: none;'> <a href='index.php?doc=uni/physik'>Physik</a> </li></ul><li style='list-style: none;'> <a href='index.php?doc=uni/bauing'>Bauing.</a> </li></ul><li style='list-style: none;'> <a href='index.php?doc='></a> </li></ul><li style='list-style: none;'> <a href='index.php?doc='></a> </li></ul><li style='list-style: none;'> <a href='index.php?doc='></a> </li></ul><li style='list-style: none;'> <a href='index.php?doc='></a> </li></ul><li style='list-style: none;'> <a href='index.php?doc='></a> </li></ul><li style='list-style: none;'> <a href='index.php?doc='></a> </li></ul><li style='list-style: none;'> <a href='index.php?doc='></a> </li></ul></ul></li><li style='list-style: none; font-size: 14pt; font-weight: bold;'> <a href='index.php?doc=mac/start'>Leopard</a> <ul></ul></li><li style='list-style: none; font-size: 14pt; font-weight: bold;'> <a href='index.php?doc=linux/start'>Ubuntu</a> <ul></ul></li><li style='list-style: none; font-size: 14pt; font-weight: bold;'> <a href='index.php?doc=web/start'>Homepage</a> <ul></ul></li><li style='list-style: none; font-size: 14pt; font-weight: bold;'> <a href='index.php?doc=todo'>To Do </a> <ul></ul></li> </ul>

        <!-- ********* Content ********************************************************* -->

        <div id="text">

        <h2>Mitschriften</h2>
        <p>Ich verfasse die Vorlesungmitschriften mit dem Programm <a href="http://de.wikipedia.org/wiki/LyX">Lyx</a>, also mit der Layoutsprache <a href="http://de.wikipedia.org/wiki/LaTeX">LaTex</a>. <br />
        Das Programm ist leistungsfähiger und stabiler als Word und kann Formeln perfekt darstellen. Es ist für alle Betriebssysteme verfügbar. <br />
        </p>
         </div>

        <!-- ***** Ende Seiteninhalt**************************************************** -->
            </div>
          </body>
        </html>

        1. Hello out there!

          Sorry, hatte da für ein paar Minuten einen Fehler drinnen, bis ich ihn bemerkt habe. Die Seite wird nun angezeigt.

          Und "No DOCTYPE found" nicht mehr.

          Aber immer noch "No Character Encoding Found"

          <meta http-equiv="Content-Type" content="text/html" charset="utf-8" />

          So nicht, sondern

          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

          Das erklärt auch "there is no attribute 'charset'."

          Viel Erfolg bei der Berichtigung der anderen Fehler!

          See ya up the road,
          Gunnar

          --
          „Und [dieses Forum] soll […] auch ein Fachforum bleiben und kein Psychologieforum werden.“ (Kirsten Evers)
          1. Hallo,»» Hello out there!

            Sorry, hatte da für ein paar Minuten einen Fehler drinnen, bis ich ihn bemerkt habe. Die Seite wird nun angezeigt.

            Und "No DOCTYPE found" nicht mehr.

            Allerdings habe ich in der Zwischenzeit am Kopf nix geändert. Hatte nur in der Navigation was gemacht. Hmm seltsam.

            Aber immer noch "No Character Encoding Found"

            <meta http-equiv="Content-Type" content="text/html" charset="utf-8" />

            So nicht, sondern

            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

            Das erklärt auch "there is no attribute 'charset'."

            Habe das geändert aber es gibt immernoch "No Character Encoding Found" aus.

            Viel Erfolg bei der Berichtigung der anderen Fehler!

            Danke, die meisten scheinen in den meta Tags zu stecken. Verstehe echt nicht was ich da alles falsch gemacht haben soll...

            Gruß, Anna.

            1. Hallo annalein!

              Habe das geändert aber es gibt immernoch "No Character Encoding Found" aus.

              Ja, Du hast verschlimmbessert ;)

              Du hast nicht, wie von Gunnar empfohlen:

              <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

              sondern:

              <meta http-equiv="Content-Type" content="text/html; charset="UTF-8" />
              ............................................................^

              Viele Grüße aus Frankfurt/Main,
              Patrick

              --

              _ - jenseits vom delirium - _
              [link:hatehtehpehdoppelpunktslashslashwehwehwehpunktatomicminuseggspunktcomslash]
              Nichts ist unmöglich? Doch!
              Heute schon gegökt?
            2. Hello out there!

              Allerdings habe ich in der Zwischenzeit am Kopf nix geändert. Hatte nur in der Navigation was gemacht. Hmm seltsam.

              Offenbar hast du dein PHP-Script berichtigt, das vorher nicht das ausgab, was du dachtest.

              <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

              Habe das geändert

              Aber nicht richtig! (Gänsefüßchen)

              Danke, die meisten scheinen in den meta Tags zu stecken. Verstehe echt nicht was ich da alles falsch gemacht haben soll...

              Einige Meldungen sollten nach Korrektur des Fehlers weg sein.

              See ya up the road,
              Gunnar

              --
              „Und [dieses Forum] soll […] auch ein Fachforum bleiben und kein Psychologieforum werden.“ (Kirsten Evers)
    2. Hello out there!

      http://obirap.homeunix.org/~annalein/
      für Interessierte...

      für Interessierte: http://forum.de.selfhtml.org/hilfe/bedienung.htm#verweise-einbinden

      Schau dir doch mal den generierten HTML-Code an!

      See ya up the road,
      Gunnar

      --
      „Und [dieses Forum] soll […] auch ein Fachforum bleiben und kein Psychologieforum werden.“ (Kirsten Evers)
  2. Yerf!

    No DOCTYPE found, and unknown root element. Aborting validation.
    The DOCTYPE Declaration was not recognized or is missing.
    Unable to Determine Parse Mode!
    No Character Encoding Found! Falling back to UTF-8.

    Ich habe aber einen Doctype gesetzt und die Kodierung utf-8 gewählt und alle Seiten im Editor als solche gespeichert.

    Hier mein Code:

    Das ist der serverseitige PHP-Code. Der Validator überprüft aber das, was als HTML beim Client ankommt und mein Browser zeigt mir nur:

      
    <br />  
    <b>Parse error</b>:  syntax error, unexpected '}', expecting ',' or ';' in <b>/home/annalein/public_html/index.php</b> on line <b>43</b><br />  
    
    

    Gruß,

    Harlequin

    --
    <!--[if IE]>This page is best viewed with a webbrowser. Get one today!<![endif]-->