Jump to content
Sign in to follow this  
theprogrammeur

Problème de validation

Rate this topic

Recommended Posts

Bonjour

J'essaie depuis quelques temps de valider une page en XHTML 1.1 et ce, sans succès.

Voici les 4 dernières erreurs qui subsitents:

  1. Line 21, Column 106: document type does not allow element "input" here; missing one of "ins", "del", "h1", "h2", "h3", "h4", "h5", "h6", "p", "div", "address", "fieldset" start-tag....length="255" value="" accesskey="4" />

    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>").
  2. Line 22, Column 83: document type does not allow element "input" here; missing one of "ins", "del", "h1", "h2", "h3", "h4", "h5", "h6", "p", "div", "address", "fieldset" start-tag....=&quot;http://URL.ext" />

    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>").
  3. Line 23, Column 103: document type does not allow element "input" here; missing one of "ins", "del", "h1", "h2", "h3", "h4", "h5", "h6", "p", "div", "address", "fieldset" start-tag..../rechercher.gif" name="ok" value="" />

    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. Line 24, Column 10: end tag for "form" which is not finished. </form>

    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, in HTML the <head> element must contain a <title> child element, lists (ul, ol, dl) require list items (li, or dt, dd), and so on.

Voici la partie concernée par ces erreurs:

<div id="haut">
<div id="search">
<form method="get" action="http://www.google.com/search">
<input name="q" id="q" type="text" class="input_rech" size="14" maxlength="255" value="" accesskey="4" />
<input type="hidden" name="sitesearch" value="http://URL.ext" />
<input type="image" src="http://URL.ext/images/rechercher.gif" name="ok" value="" />
</form>
</div>
</div>

Où se trouvent les problèmes?

Merci d'avance.

Edited by Dudu

Share this post


Link to post
Share on other sites

En amont. On peux voir l'intégralité de la page?

Share this post


Link to post
Share on other sites
En amont. On peux voir l'intégralité de la page?

Bein sur :)

Petite explication, c'est une page d'erreurs au cas où la BDD serait out.

CODE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"

&quot;http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

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

<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />

<meta name="robots" content="noindex" />

<meta name="description" content="Erreur SQL" />

<title>Theprogrammeur-Apprenez à programmer en un instant</title>

<link rel="stylesheet" type="text/css" href="includes/style.css" />

<link rel="stylesheet" type="text/css" href="includes/news.css" />

</head>

<body>

<div id="page">

<!--Début de la bannière et du champ de recherche-->

<div id="top">

<div id="header"></div>

</div>

<div id="haut">

<div id="search">

<form method="get" action=&quot;http://www.google.com/search">

<input name="q" id="q" type="text" class="input_rech" size="14" maxlength="255" value="" accesskey="4" />

<input type="hidden" name="sitesearch" value=&quot;http://URL.ext" />

<input type="image" src="images/rechercher.gif" name="ok" value="" />

</form>

</div>

</div>

<!--Fin de la bannière et du champ de recherche-->

<div class="centre"><h1>Serveur SQL indisponible</h1></div>

Le serveur SQL est temporairement indisponible. Veuillez réessayer dans quelques instants.

<!--Fin du contenu, début du footer-->

<!--Affichage de la barre au dessus du footer-->

<div id="bas"></div>

<!--Début du footer, fin de la barre-->

<div id="bottom">

<a rel="license" href=&quot;http://creativecommons.org/licenses/by-nc-nd/3.0/">

<img alt="Creative Commons License" style="border-width:0" src=&quot;http://creativecommons.org/images/public/somerights20.png" />

</a>

Sauf mention contraire, le contenu de cette page est sous licence

<a rel="license" href=&quot;http://creativecommons.org/licenses/by-nc-nd/3.0/"> Creative Commons</a>

</div><!--Fin du "bottom"-->

</div><!--Fin du <div id="page">-->

</body>

</html>

Merci pour votre aide

P.S.:Le validateur m'a demandé de changer l'extention en ".xhtml", ce que j'ai fait, mais alors, le design à quelques petits problèmes. Pourquoi?

Share this post


Link to post
Share on other sites

Salut,

Essayes:

<form method="get" action="http://www.google.com/search">
<p><input name="q" id="q" type="text" class="input_rech" size="14" maxlength="255" value="" accesskey="4" /></p>
<p><input type="hidden" name="sitesearch" value="http://URL.ext" /></p>
<p><input type="image" src="images/rechercher.gif" name="ok" value="" /></p>
</form>

Edited by Dan

Share this post


Link to post
Share on other sites

Salut

La méthode de ghost est la bonne.

Profites-en également pour baliser tes textes (par exemple dans des balises de paragraphes eux-aussi), car pour l'instant ils sont "dans le vide" au beau milieu de balises <div> parfaitement dépourvues de sens sémantique.

Donc quitte à vouloir écrire de l'XHTML 1.1 pur et dur, autant essayer d'être un minimum conforme ;)

PS: le validateur ne vérifie pas la conformité. Une page absurde avec des balises bien imbriquées passera quand même...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...