Partage
  • Partager sur Facebook
  • Partager sur Twitter

problèmes avec le validateur

Sujet résolu
    9 avril 2006 à 16:57:51

    bonjour

    j essai de corriger les erreur de norme w3c et là je suis bloqué :p

    il me dit sa

    Line 10 column 44: document type does not allow element "script" here; assuming missing "body" start-tag


    et voici le code

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
            <head>
                                    <title><?php echo $titre ?></title>
                    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />
                    <meta http-equiv="Content-Style-Type" content="text/css" />
                    <meta http-equiv="Content-Language" content="fr" />
                    <link rel="stylesheet" media="screen" type="text/css" title="Design d'origine" href="css/original.css" />
                    </head>
                    <script src="js/horloge.js" type="text/js"></script>
                    <body OnLoad="namosw_init_clock('type2', 2,'type7', 7)">
    contenu
    </body>
    </html>

    • Partager sur Facebook
    • Partager sur Twitter
      9 avril 2006 à 17:06:06

      le script javascript doit être entre les balise <head> !
      donc normalement tu aurais dû mettre :

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
              <head>
                                      <title><?php echo $titre ?></title>
                      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />
                      <meta http-equiv="Content-Style-Type" content="text/css" />
                      <meta http-equiv="Content-Language" content="fr" />
                      <link rel="stylesheet" media="screen" type="text/css" title="Design d'origine" href="css/original.css" />
                      <script src="js/horloge.js" type="text/js"></script>
                      </head>
                      <body OnLoad="namosw_init_clock('type2', 2,'type7', 7)">
      contenu
      </body>
      </html>


      je viens de tester, tu à d'autre Erreur :

      # Error Line 11 column 29: there is no attribute "OnLoad".

      <body OnLoad="namosw_init_clock('type2', 2,'type7', 7)">

      You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. 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 "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

      This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

      How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute.


      # Error Line 12 column 0: character data is not allowed here.

      contenu

      You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include putting text directly in the body of the document without wrapping it in a container element (such as a <p>aragraph</p>) or forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes).
      • Partager sur Facebook
      • Partager sur Twitter
        9 avril 2006 à 17:08:50

        merci et je sais pour les autres erreur mais celle la me preocupper
        • Partager sur Facebook
        • Partager sur Twitter
          9 avril 2006 à 17:23:06

          # Error Line 12 column 0: character data is not allowed here.
          j aime bien les caracteres a la colonne 0 :p:p
          • Partager sur Facebook
          • Partager sur Twitter
            9 avril 2006 à 17:35:26

            ouai :D par contre quelqu un peut maider pour l autre erreur svp

            # Error Line 11 column 29: there is no attribute "OnLoad".

            <body OnLoad="namosw_init_clock('type2', 2,'type7', 7)">

            You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. 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 "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

            This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

            How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute.
            • Partager sur Facebook
            • Partager sur Twitter
              9 avril 2006 à 17:43:02

              je pense que body ne peux pas supporter de onload, ou peut etre pas, en plus l'anglais c'est pas mon fort !
              • Partager sur Facebook
              • Partager sur Twitter
                10 avril 2006 à 8:39:31

                j ai trouvé si sa peut vous interessé il ne faut pas mettre de majuscules dans onload
                • Partager sur Facebook
                • Partager sur Twitter

                problèmes avec le validateur

                × 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