Partage
  • Partager sur Facebook
  • Partager sur Twitter

javascript et validation W3C

problemes

Sujet résolu
    20 février 2006 à 23:48:19

    salut les zéros! je fais appel avous pour un souci:
    j'ai souvent des problèmes pour valider mes site en xhtml 1.1 lorsque je rajoute des script en javascript par exemple pour ces erreurs là qu'est ce que je dois faire:

    Citation : W3C validator

    This page is not Valid XHTML 1.1!

    Below are the results of checking this document for XML well-formedness and validity.

    1. Error Line 9 column 17: there is no attribute "language".

    <script language="javascript" type="text/javascript">

    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;
    2. Error Line 118 column 4: character data is not allowed here.

    analyse mesure frequentation internet par <img width="39" height="25" src="h

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

    &#9993;
    3. Error Line 118 column 154: document type does not allow element "img" here; missing one of "ins", "del", "h1", "h2", "h3", "h4", "h5", "h6", "p", "div", "address", "fieldset" start-tag.

    ...05&amp;p=" alt="Analyse d'audience" />

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

    &#9993;
    4. Error Line 119 column 14: end tag for "noscript" which is not finished.

    </noscript></a>

    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 e

    • Partager sur Facebook
    • Partager sur Twitter
      20 février 2006 à 23:52:29

      Redondance :
      <script type="text/javascript">
      suffit amplement.
      Pour les erreurs 2 et 3, tu as l'air d'avoir oublié d'utiliser un block.
      Pour l'erreur 4, l'explication donnée est amplement suffisante.
      Il peut aussi arriver qu'une erreur crée d'autres erreurs en cascade.

      A part ça, il est très peu probable que le XHTML 1.1 soit adapté dans ton cas : XHTML 1.0 strict suffit amplement.
      • Partager sur Facebook
      • Partager sur Twitter
        20 février 2006 à 23:59:53

        pour la premiere erreur c bon j'ai corrigé c'etait bien ça pour la 2 et 3 en fait si j'ai bien compris mon script ne peu pas etre contenu dans une balise <p></p> mais il doit etre dans une div c ça?
        pour la 4 je suis pas sur d'avoir saisi: une des balise ne serai pas fermé c ça?
        • Partager sur Facebook
        • Partager sur Twitter
          21 février 2006 à 0:05:17

          salut,

          <img width="39" height="25" src="h , il faut que tu repasse le css en ligne de cette façon <img style="width:39px;height:25px;" src=" ...
          et que tu mette ton image dans une balise de type block, par exemple un <p> ou un <div>
          a plus
          • Partager sur Facebook
          • Partager sur Twitter

          fan de pluxml je suis cuisinier et codeur amateur. Des thèmes pour pluxml ? Oui

            21 février 2006 à 0:14:49

            merci pour m'avoir eclairer merci egalement à elentar mon site est maintenant valid xhtml 1.1
            • Partager sur Facebook
            • Partager sur Twitter

            javascript et validation W3C

            × 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