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.