Partage
  • Partager sur Facebook
  • Partager sur Twitter

Validation Xhtml impossible

(fautes dans les balises données par le SDZ)

Sujet résolu
    26 juillet 2006 à 1:44:59

    Bonsoir, il y a deja un sujet de ce type, mais la réponse donnée n'est pas bonne, et mon DOCTYPE n'est pas le même :

    Citation : html


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
    <head>
    <LINK REL="SHORTCUT ICON" HREF="http://site.formol.free.fr/images/notes/favicon.ico">
    </head>
    <head>
    <title>€-Tuning <?if (!empty($title)) echo' - '.$title;?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <link rel="stylesheet" media="screen" type="text/css" title="design" href="e-tuning.css" />
    </head>
    <body>




    Et ensuite, voici ce que me dit le W3C:

    PS: j'ai choisis le DOCTYPE transition, mais même avec celui donnée par le SDZ, c'est pareille...



    Citation : W3C

    # Error Line 4 column 10: there is no attribute "REL".

    <LINK REL="SHORTCUT ICON" HREF="http://site.formol.free.fr/images/notes/favicon.

    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.

    &#9993;
    # Error Line 4 column 31: there is no attribute "HREF".

    <LINK REL="SHORTCUT ICON" HREF="http://site.formol.free.fr/images/notes/favicon.

    &#9993;
    # Error Line 4 column 84: element "LINK" undefined.

    ...mol.free.fr/images/notes/favicon.ico">

    You have used the element named above in your document, but the document type you are using does not define an element of that name. 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 "Frameset" document type to get the "<frameset>" element),
    * by using vendor proprietary extensions such as "<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the desired effect instead).
    * by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case.

    &#9993;
    # Error Line 5 column 6: end tag for "LINK" omitted, but OMITTAG NO was specified.

    </head>

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

    &#9993;
    # Info Line 4 column 0: start tag was here.

    <LINK REL="SHORTCUT ICON" HREF="http://site.formol.free.fr/images/notes/favicon.

    # Error Line 5 column 6: end tag for "head" which is not finished.

    </head>

    Most likely, You nested tags and closed them in the wrong order. For example <p><em>...</p> is not acceptable, as <em> must be closed before <p>. Acceptable nesting is: <p><em>...</em></p>

    Another possibility is that you used an element which requires a child element that you did not include. Hence the parent element is "not finished", not complete. For instance, <head> generally requires a <title>, lists (ul, ol, dl) require list items (li, or dt, dd), and so on.

    &#9993;
    # Error Line 6 column 8: document type does not allow element "head" here.

    <head>

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



    Comment regler ce problémme ?
    Merci par avance :)
    • Partager sur Facebook
    • Partager sur Twitter
      26 juillet 2006 à 1:51:04

      Salut,
      Déjà, il faut ne faut pas de balises en majuscule (comme ton LINK) ;) :
      <link rel="shortcut icon" href="http://site.formol.free.fr/images/notes/favicon.ico" />

      Ensuite, il ne faut qu'un seul <head> :)
      Et il faut aussi refermer tes balises (<link>, <html> et <body>) ;)
      Tu devrais avoir moins d'erreurs avec ce code:
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
      <head>
      <link rel="shortcut icon" href="http://site.formol.free.fr/images/notes/favicon.ico" />
      <title>€-Tuning <?if (!empty($title)) echo' - '.$title;?></title>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
      <link rel="stylesheet" media="screen" type="text/css" title="design" href="e-tuning.css" />
      </head>
      <body>
      </body>
      </html>

      @+
      • Partager sur Facebook
      • Partager sur Twitter
        26 juillet 2006 à 1:57:44

        Merci, mais à prioris, ya encore plein d'erreur^^
        il à un problémme avec tous mes "<" et ">"


        Citation : W3C ERROR

        # Error Line 3 column 85: document type does not allow element "link" here; assuming missing "head" start-tag.

        ...ol.free.fr/images/notes/favicon.ico"/>

        &#9993;
        # Error Line 4 column 5: document type does not allow element "head" here.

        <head>

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

        &#9993;
        # Error Line 9 column 5: document type does not allow element "body" here.

        <body>

        &#9993;
        # Error Line 44 column 6: "head" not finished but containing element ended.

        </html>

        &#9993;
        # Error Line 44 column 6: end tag for "head" omitted, but OMITTAG NO was specified.

        </html>

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

        &#9993;
        # Info Line 3 column 0: start tag was here.

        <link rel="shortcut icon" href="http://site.formol.free.fr/images/notes/favicon.

        # Error Line 44 column 6: end tag for "html" which is not finished.

        </html>

        Most likely, You nested tags and closed them in the wrong order. For example <p><em>...</p> is not acceptable, as <em> must be closed before <p>. Acceptable nesting is: <p><em>...</em></p>

        Another possibility is that you used an element which requires a child element that you did not include. Hence the parent element is "not finished", not complete. For instance, <head> generally requires a <title>, lists (ul, ol, dl) require list items (li, or dt, dd), and so on.



        Tous les problémmes sont avec les "<" et ">"
        je peux tout de même pas les changer ^^
        • Partager sur Facebook
        • Partager sur Twitter
          26 juillet 2006 à 2:01:51

          Salut,
          C'est bizarre, j'ai testé mon code sur le site du W3C et il me dit qu'il est valide o_O
          • Partager sur Facebook
          • Partager sur Twitter
            26 juillet 2006 à 2:03:33

            ta essayé exactement ca :


            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
            <link rel="shortcut icon" href="http://site.formol.free.fr/images/notes/favicon.ico"/>
            <head>
            <title>E-Tuning</title>
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
            <link rel="stylesheet" media="screen" type="text/css" title="design" href="e-tuning.css" />
            </head>
            <body>

            </body>
            </html>





            ???
            Sur http://validator.w3.org/ ???
            • Partager sur Facebook
            • Partager sur Twitter
              26 juillet 2006 à 2:09:37

              Salut,
              J'ai testé le code que je t'avais donné.
              Par contre, pour ton code (celui que tu viens de donner :p ), c'est vrai qu'il n'est pas valide :( . Avec celui-là à la place ca devrait être bon :) :
              <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
              <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
              <head>
              <link rel="shortcut icon" href="http://site.formol.free.fr/images/notes/favicon.ico"/>
              <title>E-Tuning</title>
              <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
              <link rel="stylesheet" media="screen" type="text/css" title="design" href="e-tuning.css" />
              </head>
              <body>

              </body>
              </html>
              • Partager sur Facebook
              • Partager sur Twitter
                26 juillet 2006 à 2:12:25

                Merci Merci et encore Merci :)

                j'espere que mon site, au finale, sera valide ^^

                Je ne fait pas une V2 pour rien :p

                encore uen fosi MERCI :)
                • Partager sur Facebook
                • Partager sur Twitter
                  26 juillet 2006 à 2:22:09

                  De rien :)
                  N'oublie pas de mettre ton sujet en "Résolu" ^^ (lien en bas de la page ;) )
                  • Partager sur Facebook
                  • Partager sur Twitter

                  Validation Xhtml impossible

                  × 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