Aller au contenu

Erreur w3c incompréhensibles...


Sujets conseillés

Bonjour à toutes et tous,

alors voilà comme spécifié dans le titre, je me retrouve avec des Erreurs de validation aberrantes.

Voici les erreurs :

Validation Output: 17 Errors

1. Error Line 91, Column 11: end tag for "td" omitted, but OMITTAG NO was specified

</div>

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

2. Info Line 63, Column 5: start tag was here

<td>

3. Error Line 91, Column 11: end tag for "tr" omitted, but OMITTAG NO was specified

</div>

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

4. Info Line 62, Column 3: start tag was here

<tr>

5. Error Line 91, Column 11: end tag for "table" omitted, but OMITTAG NO was specified

</div>

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 61, Column 2: start tag was here

<table align="center" border="0" cellpadding="0" cellspacing="0" width="1000" …

7. Error Line 94, Column 11: end tag for element "div" which is not open

</div></div>

The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

If this error occurred in a script section of your document, you should probably read this FAQ entry.

8. Error Line 94, Column 17: end tag for element "div" which is not open

</div></div>

The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

If this error occurred in a script section of your document, you should probably read this FAQ entry.

9. Error Line 95, Column 5: end tag for element "tr" which is not open

</tr>

The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

If this error occurred in a script section of your document, you should probably read this FAQ entry.

10. Error Line 96, Column 10: end tag for element "td" which is not open

</td>

The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

If this error occurred in a script section of your document, you should probably read this FAQ entry.

11. Error Line 97, Column 16: end tag for element "table" which is not open

</table><div id="footer">

The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

If this error occurred in a script section of your document, you should probably read this FAQ entry.

12. Error Line 103, Column 6: end tag for element "div" which is not open

</div>

The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

If this error occurred in a script section of your document, you should probably read this FAQ entry.

13. Error Line 91, Column 11: Opening and ending tag mismatch: td line 63 and div

</div>

14. Error Line 94, Column 11: Opening and ending tag mismatch: tr line 62 and div

</div></div>

15. Error Line 94, Column 17: Opening and ending tag mismatch: table line 61 and div

</div></div>

16. Error Line 95, Column 5: Opening and ending tag mismatch: div line 49 and tr

</tr>

17. Error Line 96, Column 10: Opening and ending tag mismatch: center line 48 and td

</td>

18. Error Line 97, Column 16: Opening and ending tag mismatch: body line 47 and table

</table><div id="footer">

19. Error Line 103, Column 6: Opening and ending tag mismatch: html line 2 and div

</div>

20. Error Line 104: Extra content at the end of the document

</center>

Pourtant il me semble que tout est ok dans la représentation HTML. Cependant j'ai un doute car mes pages sont en PHP ou je fais des include() pour mon header et mon footer...

voici ce que le page complète retourne une fois interprétée et transcrite en 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">
<head>
<title>Espace Emploi</title>
<link rel="icon" type="image/png" href="img/ico.png" />
<link href="css/styles_emploi.css" rel="stylesheet" type="text/css" />
<meta name="keywords" lang="fr" content="motcle1,mocle2" />
<meta name="description" content="Description de ma page web." />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta http-equiv="Content-Language" content="fr" />

<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="alternate" type="application/rss+xml" title="RSS General" href="rss/rss.xml" />

<script language="JavaScript" type="text/javascript">
<!--
function sexe()
{
with(document.poster)
{
var i = 1;
for(i=0,i<="2",i++)
{
var test = prompt(i);
if(document.inscription.sexe[i].checked == true)
{
if(msg.createTextRange)
{
var text;
msg.focus(msg.caretPos);
msg.caretPos = document.inscription.selection.createRange().duplicate();
msg.value = document.sexe[i].value;
}
else
{
msg.value = document.sexe[i].value;
}
}
}
}
}
-->
</script>



</head>
<body>
<center>
<div style="width:1000px;">
<div style="width:1000px; margin-top:21px;">
<div id="linksmall" align="right"><a href="index.html" target="_self" style="padding-left:10px;"><img src="img/home.png" height="10" border="0" alt="Accueil" title="Accueil"/></a> <a href="contact.php" target="_self" style="padding-left:10px;"><img src="img/mail.png" border="0" height="10" alt="Nous contacter" title="Nous contacter"/></a> <a href="rss/rss.xml" target="_self" style="padding-left:10px;padding-right:21px;"><img src="img/rssicon.png" alt="s'abonner au flux RSS" width="10" height="10" border="0" title="s'abonner au flux RSS"/></a>

</div>
</div>

<div id="navlink">
<div class="header">
</div>
<div align="right" class="Style4" style="padding-top:35px;height:94px; margin-right:50px;"><strong>Espace Emploi</strong>
</div>
</div>

<table align="center" border="0" cellpadding="0" cellspacing="0" width="1000" style="margin-top:0;background:url(img/fondemploi.jpg);">
<tr>
<td>
<div id="cadre_connexion">
<form action="login.php" method="post"> <img src="img/membres.png" width="17" height="18" align="middle" alt="" />  <span class="Style2">E-mail :  </span><label><input type="text" name="email" class="field2" id="email" size="18" style="border:0;"/></label>
     <span class="Style2"> Mot de passe :  </span><label><input type="password" class="field2" id="password" name="password" size="15" style="border:0;" /></label>
     <input type="submit" class="field2" id="submit" value="ok" />
     <a href="lostpass.php"><span class="Style2"><u>Mot de passe oublié ?</u></span></a></form></div>
<div class="right"><div id="cadre_espace"><span class="Style2"><a href="espace_candidats.php">Espace Candidats</a></span></div>  <div id="cadre_espace2"><span class="Style2"><a href="espace_employeurs.php">Espace Employeurs</a></span></div></div><br /><br />

<div style="width:950px;" id="left"><div align="left" class="Style10">Bienvenue sur l'espace emploi de Weblobsdesigner.<br />
<br />
Cette espace a été créé pour faciliter la recherche d'emploi sur la région de l'Aube mais également les démarches de recrutement de candidats pour les entreprisess.<br />
<br />
Les professionnels pourront consulter facilement et rapidemant les fiches de nos membres et accéder aux CV déposés préalablement par les candidats. Une messagerie interne sera relié prochainement à chaque comptes créés afin de permettre aux professionnels de rentrer en contact avec les candidats. <br />
<br />
Un espace Candidats et un espace Employeurs sont disponibles ci-dessous. Les Professionnels souhaitant créé un compte et déposer des offres se devront d'être en posséssion d'un N° SIRET. Chaque numéro sera vérifié pour enrayer toute arnaque ou fausses offres d'emploi. Une liste complète des candidats sera mise à leur disposition par catégories de métiers recherchés. L'inscription est très rapide et ne prend que quelques minutes.
<br />
<br />

Les demandeurs, pourront déposer leur CV en ligne (autant qu'ils le souhaitent) afin de faciliter leurs recherches ainsi que leur affichage auprès des professionnels. Des aides et des propositions de formations pourront régulièrement être envoyées aux candidats souhaitant acquérir de nouvelles compétences ou les renforcer. Il est conseillé aux candidats de régulièrement surveiller leur boite de messagerie interne au site, pour savoir si un employeur lui aurait laisser un message, en attendant que la messagerie soit reliée aux différentes adresses mail de chacun des candidats. Les mails restent disponibles sur les fiches des candidats et les employeurs peuvent les utiliser pour leurs recrutements.
<br />
<br />
Bonne recherche.<br />
<br />
<br />
<br />
L'équipe Weblobsdesigner
</div>

</div><br /><br />
<div class="left">
<div id="cadrecandidats" align="center"><span class="Style3">Espace Candidats</span><br /><br /><div style="margin-left:10px;" class="text3"><p> - Consultez les offres</p><p>- Déposez un CV</p><p> - Déposez une annonce<br /><i>(destinée aux particuliers)</i></p></div><div id="btinscript"><a href="inscription_candidats.php" target="_self">M'inscrire</a></div></div></div>
</div>
<div class="right_cadre">

<div id="cadrecandidats2" align="center"><span class="Style3">Espace Employeurs</span><br /><br /><div style="margin-left:10px;" class="text3"><p> - Consultez les profiles des candidats</p><p> - Consultez leurs cv</p><p>- Déposez une offre d'emploi</p><br /></div><div id="btinscript2"><a href="#" target="_self">M'inscrire</a></div></div></div>
</div></div>
</tr>
</td>
</table><div id="footer">
<div class="logo">

</div>
<div align="right" style="height:22px; padding-top:40px;"><span class="footer_spacer"></span><a href="index.php" target="_self" style="height:22px;">Accueil</a><span class="footer_spacer"></span><a href="../site_map/sitemap.html" target="_self" style="height:22px;">Plan du site</a> <span class="footer_spacer"></span><a href="../notre_societe.html" target="_self" style="height:22px;">Nous ?</a><span class="footer_spacer"></span><a href="mentions.hmtl">Mentions Légales</a> <span class="footer_spacer"></span><a href="../rss/rss.xml" target="_self" style="height:22px;"><img src="img/rss_icon.png" alt="S'abonner au Flux rss" border="0" align="middle" title="S'abonner au Flux rss" /></a><span class="spacer"></span>
</div>
</div>
</div>
</center>

</body>
</html>

Alors si quelqu'un a une petite idée sur la manière de résoudre ça parce que là moi je bloque...

Dès qu'il y a une <table></table> tout foire...

Merci d'avance pour vos interventions ;)

Lien vers le commentaire
Partager sur d’autres sites

Ben tu fermes un </div> de trop là où il ne faut pas, c'est exactement ce qu'il te dit. Et un peu plus loin tu as inversé le </td> et le </tr>.

Le plus simple: formate ton HTML de façon à toujours avoir les <xxx> et </xxx> seuls sur une ligne, au même "niveau" (avec autant d'espaces avant). Ca rendra le problème évident.

Par exemple:


<html>
<head>
<title>
truc
</title>
</head>
<body>
<div>
<div>
<table>
<tr>
<td>
toto
</td>
</tr>
</table>
</div>
</div>
</body>
</html>

Au fait, une table à une seule cellule, pour quoi faire?

Jacques.

Lien vers le commentaire
Partager sur d’autres sites

Tu utilises également un doctype XHTML avec une balise <center>, qui est dépréciée depuis pas mal de temps, et est une atrocité sémantique.

Tu peux très bien utiliser le CSS pour centrer ta première div. D'ailleurs, pourquoi mettre le CSS dans les attributs des balises, plutôt que dans un fichier à part ?

Lien vers le commentaire
Partager sur d’autres sites

Je rajoute que tu sembles vouloir positionner tes différents div avec un saut de ligne <br />. Cette balise n'a clairement pas ce rôle. Il est plus propre, léger, logique et plus juste d'utiliser les propriétés CSS telles que les marges externes (margin)!

Lien vers le commentaire
Partager sur d’autres sites

  • 2 semaines plus tard...

Et le quarté gagnant... :P

Je rajouterais donc à mon tour qu'il ne sert franchement à rien de vouloir valider la bonne imbrication de ses balises au validateur w3c, si c'est pour avoir de la divite-à-gogo et les aberrations sémantiques qui vont avec.

Je m'explique:

Ça:

<div id="navlink">
<div class="header">
</div>
<div align="right" class="Style4" style="padding-top:35px;height:94px; margin-right:50px;"><strong>Espace Emploi</strong>
</div>
</div>

ou encore ça:

<div class="right"><div id="cadre_espace"><span class="Style2"><a href="espace_candidats.php">Espace Candidats</a></span></div>  <div id="cadre_espace2"><span class="Style2"><a href="espace_employeurs.php">Espace Employeurs</a></span></div></div><br /><br />

<div style="width:950px;" id="left"><div align="left" class="Style10">Bienvenue sur l'espace emploi de Weblobsdesigner.<br />
<br />

c'est une catastrophe :huh:

La balise <div> c'est pour définir de grands blocs globaux dans ta page, afin de les positionner (par exemple, l'en-tête, la colonne de gauche, la colonne de droite, le milieu, et le pied-de-page). Mais c'est certainement pas pour y coller du texte tel quel dedans, sans balises-enfants intermédiaires telles que <p> par exemple.

La divite, c'est la maladie du <div>, l'utilisation abusive d'une balise incomprise par beaucoup de webmasters. Non ce n'est pas une balise fourre-tout, son homologue <span> non plus d'ailleurs.

Un peu de sémantique, que diable ! Sinon ça ne sert à rien de valider, et tant qu'à faire il est moins pire de faire de la mise en page en tableau que de la divite, franchement...

J'ai coutume de dire que 5 <div> dans une page c'est un grand maximum, et encore je compte large. Je connais très peu de pages web qui auraient besoin de plus.

PS: Bienvenue sur le Hub, néanmoins. On mord un peu, mais en fait on est sympas :D

Lien vers le commentaire
Partager sur d’autres sites

Veuillez vous connecter pour commenter

Vous pourrez laisser un commentaire après vous êtes connecté.



Connectez-vous maintenant
×
×
  • Créer...