Partage
  • Partager sur Facebook
  • Partager sur Twitter

W3C quelques erreurs !

Sujet résolu
Anonyme
    4 mai 2006 à 22:52:17

    Bonjour :
    Je suis encore débutant c'est mon premier site et la je vais valider ma page XHTML et que vois je ? 9 erreurs j'ai chercher car, si je trouve deux d'entres elles je trouve les autres mais je n'ai rien trouver et c'est pourquoi je poste ici !
    Il y a deux types d'erreurs, il y a une erreur sur des balises à chaque fois il me souligne le même élément comme ça :

    Citation : W3C

    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >


    J'ai beau chercher je ne sais pas comment résoudre cette erreur !
    Et la deuxième et du type comme ça :

    Citation : WC

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/


    Alors voilà avant d'aller chercher une corde pour abréger mes souffrances j'ai préféré venir demander :p
    PS : Est ce que ça change quelque chose la validation si il y a du code PHP ?
    Merci d'avance !
    • Partager sur Facebook
    • Partager sur Twitter
      4 mai 2006 à 23:31:44

      Lut

      Le plus simple serait de mettre le lien vers ta page qu'on puisse la valider pour voir nous même les erreurs....
      • Partager sur Facebook
      • Partager sur Twitter
      Anonyme
        4 mai 2006 à 23:58:34

        Alors voici la page :

        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
        <head>
        <title>Fire_Web_SdZ - Design</title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <link rel="stylesheet" media="screen" type="text/css" title="Fire_Web_SdZ" href="css/design.css" />

        </head>
        <body>
        <div id="en_tete">

        </div>

        <div id="affichage_menu">
                <?php
                include("menu/menu.php");
                ?>

        </div>



        <?php include("menu/menu_horizontal.php"); ?>
        <div id="affichage_corps">
        <p>Ici le corps du site !</p>
         <p>Ici il y aura les news</p>
        </div>
        <p>
        <div id="footer">
        </div>
        </body>
        </html>

        et voici les erreur :

        1. Error Line 15 column 10: "DOCTYPE" declaration not allowed in instance.

        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/

        2. Error Line 16 column 57: document type does not allow element "html" here.

        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >

        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).

        3. Error Line 24 column 35: document type does not allow element "div" here; missing one of "button", "map", "object", "ins", "del", "noscript" start-tag.

        <p><div id="affichage_menu_en_tete"></div></p>

        The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

        One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").


        4. Error Line 25 column 35: document type does not allow element "div" here; missing one of "button", "map", "object", "ins", "del", "noscript" start-tag.

        <p><div class="affichage_menu">

        5. Error Line 30 column 11: end tag for "p" omitted, but OMITTAG NO was specified.

        </body>

        You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

        6. Info Line 25 column 5: start tag was here.

        <p><div class="affichage_menu">

        7. Error Line 35 column 2: "DOCTYPE" declaration not allowed in instance.

        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/

        8. Error Line 36 column 57: document type does not allow element "html" here.

        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >

        9. Error Line 51 column 16: document type does not allow element "div" here; missing one of "button", "map", "object", "ins", "del", "noscript" start-tag.

        <div id="footer">

        10. Error Line 53 column 6: end tag for "p" omitted, but OMITTAG NO was specified.

        </body>

        11. Info Line 50 column 0: start tag was here.

        <p>


        Voilà ! Merci pour ceux qui m'aideront :p
        • Partager sur Facebook
        • Partager sur Twitter
          5 mai 2006 à 3:01:50

          Salut,

          Un lien aurais ete plus pratique.
          1- et 2-
          Tu doit avoir un doctype dans ton fichier "menu.php", supprime le.
          1 seul doctype par page html.
          En plus ton doctype est faux. Meme s'il passe a la validation.
          http://www.w3.org/QA/2002/04/valid-dtd-list.html

          3- un <div> ne peut pas etre contenue dan un <p>

          Pour le reste c'est le mme probleme, 1 seul doctype par page.

          @+
          • Partager sur Facebook
          • Partager sur Twitter
          Anonyme
            5 mai 2006 à 9:29:07

            Merci à toi kabuto_fr grâce à ton aide j'ai pu régler ces problèmes et maintenant ma page est valide ! Je t'en remercie ! :)
            Hé hé je ne suis pas encore passer pour ma CSS, lol je ne le fais pas encore mdr ! Mais dans la logique c'est plus simple non ?
            • Partager sur Facebook
            • Partager sur Twitter

            W3C quelques erreurs !

            × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
            × Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
            • Editeur
            • Markdown