Rechercher : dans
Par :

Validation W3C

Dernière réponse le 24 sep 2008 à 09:56:35 Pat42, le 17 jun 2008 à 18:40:27 
 Signaler ce message aux modérateurs

Bonjour,

Le W3C, je ne connais pas...
Je viens de créer un petit site
Je le passe au validateur... et il m'indique :

This page is not Valid XHTML 1.0 Transitional!
Result: Failed validation, 11 Errors


Ce qui me surprend c'est qu'il donne des erreurs bidons :-(

Line 6, Column 156: end tag for "meta" omitted, but OMITTAG NO was specified.
…ère, rhone, ain, drome, puy-de-dome">✉
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

Line 6, Column 0: start tag was here.
<meta name="description" content="Location de structure gonflable, louer un chât

Line 7, Column 126: end tag for "meta" omitted, but OMITTAG NO was specified.
…s, rhône, isere, loire, haute-loire">✉
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

Line 7, Column 0: start tag was here.
<meta name="keywords" content="chateau, gonflable, structure, location, louer, r

Line 8, Column 39: end tag for "meta" omitted, but OMITTAG NO was specified.
<meta name="author" content="château" >✉
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

Line 8, Column 0: start tag was here.
<meta name="author" content="château" >




C'est à chaque fois des ">" ou "<" ...... or dans mon code j'ai bien fermé toutes les balises
D'ou ca viens ?


1- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 -<html xmlns="http://www.w3.org/1999/xhtml">
3- <head>
4- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
5- <title>Location chateau gonflable, structure gonflable </title>
6- <meta name="description" content="Location de structure gonflable, louer un château gonflable en loire, haute-loire, isère, rhone, ain, drome, puy-de-dome">
7- <meta name="keywords" content="chateau, gonflable, structure, location, louer, rhone-alpes, rhône, isere, loire, haute-loire">
8- <meta name="author" content="château" >
9-
10- <link href="chateau.css" rel="stylesheet" type="text/css" />
</head>

Pas doué le gugus :-( vous devez vous dire :-)

Merci de votre réponse

Configuration: Windows XP
Internet Explorer 7.0

1

X-Fan, le 17 jun 2008 à 18:42:43
  • +1

Tu as oublié de mettre un / à la fin de tes balises meta pour spécifier qu'elles s'auto-ferment.

Par exemple, un retour de ligne qui est <br>, si tu veux que ça soit validable, il faut écrire <br />. Ajoute des / juste avant le > de fermeture à tous tes meta.

EDIT: C'est pas forcément que t'es pas doué, mais si tu veux que ton code valide, va falloir y mettre l'effort car il y a pleins de petits détails chiant comme ça. Des heures de plaisirs en perspective (surtout si tu as appris à coder avant que ces normes ne soient répandues et donc pas habitué du tout à les utiliser. Ça prend un certain temps avant que ça ne deviennent automatique mais ça fini par venir si tu t'y accroches). "Can't we learn from history, why's it such a mystery?"

Répondre à X-Fan

2

Pat42, le 17 jun 2008 à 18:47:08

Merci de ta réponse X-Fan, je vais le faire de ce pas.
Bonne soirée

Répondre à Pat42

3

X-Fan, le 17 jun 2008 à 18:49:35

Reviens nous voir si ça marche pas (mais ce sera surement un début).

Bonne soirée?? Ahah, plutôt bon midi et bon appétit :P
Je vais bientôt aller à ma pause du diner moi. La soirée c'est dans 6 longues heures. Chanceux de français, déjà fini le taff pour aujourd'hui ^^ "Can't we learn from history, why's it such a mystery?"

Répondre à X-Fan

4

Pat42, le 17 jun 2008 à 19:01:40

Merci de tout coeur...
J'ai trouvé un </p> tout seul qui se promenait et c'est tout bon

This Page Is Valid XHTML 1.0 Transitional!
Result: Passed validation

Tu dis dans 6 heures !! t'es en Amerique ?

A+

Répondre à Pat42

5

X-Fan, le 17 jun 2008 à 19:03:39

Canada ^^

Maintenant, fait la valider "strict" pour voir si ça marche toujours hihihi :)
A+ "Can't we learn from history, why's it such a mystery?"

Répondre à X-Fan

6

Pat42, le 17 jun 2008 à 19:07:31

Je l'ai fait par : http://validator.w3.org/

C'est quoi validation strict : ??

Répondre à Pat42

7

X-Fan, le 17 jun 2008 à 19:11:11

Il y a deux types de validation. Transitional et Strict. Strict est encore plus méchant que Transitional sur les normes. ^^
Disons que Strict ne laisse passer aucune erreur alors que Transitional permet plus de truc. Enfin, de ce que je me rappelle. Mais si tu valides Transitional, t'as l'autre ou bien t'es proche. Enfin bref, beaucoup de monde valide juste Transitional (beaucoup beaucoup hein) et c'est mieux que rien. ^^ "Can't we learn from history, why's it such a mystery?"

Répondre à X-Fan

8

Pat42, le 17 jun 2008 à 19:26:04

Merci pour l'info
Pour le moment on va rester en transitionnel :-)
Bon appetit :-)

Répondre à Pat42

9

X-Fan, le 17 jun 2008 à 20:02:44

Merci,
Bonne continuation :) "Can't we learn from history, why's it such a mystery?"

Répondre à X-Fan

10

Pat42, le 17 jun 2008 à 20:46:31

En faite dans mon site j'ai 3 pages + une en php

la 2em ya probleme :-(

Line 76, Column 15: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.
<legend align=top> <span class="Style1 Style3"><strong><u>DEMANDE DE DEVIS</u✉

Line 183, Column 10: end tag for "fieldset" omitted, but OMITTAG NO was specified.
</form>✉
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

Line 75, Column 1: start tag was here.
<fieldset> Line 76, Column 15: XML Parsing Error: AttValue: " or ' expected.
<legend align=top> <span class="Style1 Style3"><strong><u>DEMANDE DE DEVIS</u✉

Line 76, Column 15: XML Parsing Error: attributes construct error.
<legend align=top> <span class="Style1 Style3"><strong><u>DEMANDE DE DEVIS</u✉

Line 76, Column 15: XML Parsing Error: Couldn't find end of Start Tag legend line 76.
<legend align=top> <span class="Style1 Style3"><strong><u>DEMANDE DE DEVIS</u✉

Line 76, Column > 80: XML Parsing Error: Opening and ending tag mismatch: fieldset line 75 and legend.
…le3"><strong><u>DEMANDE DE DEVIS</u></strong></span> </legend>…


Le code


75-<fieldset>
76- <legend align=top> <span class="Style1 Style3"><strong><u>DEMANDE DE
DEVIS</u></strong></span> </legend>
77- <br /> <br />
78- <label><strong>Nom</strong>.........
79- <input name="Nom" type="text" id="Nom" size="40" maxlength="40" />



Je crois que j'ai trouvé un truc.... faut pas mettre deux styles sans span class... mais le reste :-(

A+

Répondre à Pat42

11

RAD ZONE, le 17 jun 2008 à 21:00:28

Je regarde apres le match aussi ;-))
♣ La plus grande erreur que puisse faire un homme est d'avoir peur d'en faire une. ♣

Répondre à RAD ZONE

12

X-Fan, le 17 jun 2008 à 21:17:06

Pourquoi t'as mis <span class="Style1 Style3"> ??? c'est quoi Style1 et Style3? "Can't we learn from history, why's it such a mystery?"

Répondre à X-Fan

13

Pat42, le 17 jun 2008 à 21:50:20

Salut


Ca y est.. j'ai modifié : suis resté avec style3...

c'est:

.Style3 {
color: #990000;
font-size: 16px;
}


Plus rien vers la ligne 76.. maintenant c'est vers la ligne 80 :-(

Line 80, Column 15: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.
<legend align=top> <span class="Style3"><strong><u>DEMANDE DE DEVIS</u></stro✉

Line 187, Column 10: end tag for "fieldset" omitted, but OMITTAG NO was specified.
</form>✉
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

Line 79, Column 1: start tag was here.
<fieldset> Line 80, Column 15: XML Parsing Error: AttValue: " or ' expected.
<legend align=top> <span class="Style3"><strong><u>DEMANDE DE DEVIS</u></stro✉

Line 80, Column 15: XML Parsing Error: attributes construct error.
<legend align=top> <span class="Style3"><strong><u>DEMANDE DE DEVIS</u></stro✉

Line 80, Column 15: XML Parsing Error: Couldn't find end of Start Tag legend line 80.
<legend align=top> <span class="Style3"><strong><u>DEMANDE DE DEVIS</u></stro✉

Line 80, Column > 80: XML Parsing Error: Opening and ending tag mismatch: fieldset line 79 and legend.
…trong><u>DEMANDE DE DEVIS</u></strong></span> </legend>…



Le code c'est :
79- <fieldset>
80- <legend align=top> <span class="Style3"><strong><u>DEMANDE DE DEVIS</u></strong></span>
</legend>
81- <br /> <br />
82- <label><strong>Nom</strong>.........
83- <input name="Nom" type="text" id="Nom" size="40" maxlength="40" />

Enfin c'est pas trop important cette validation mais enfin puisqu'on y est !
Merci

Répondre à Pat42

14

Pat42, le 17 jun 2008 à 21:50:27

Salut


Ca y est.. j'ai modifié : suis resté avec style3...

c'est:

.Style3 {
color: #990000;
font-size: 16px;
}


Plus rien vers la ligne 76.. maintenant c'est vers la ligne 80 :-(

Line 80, Column 15: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.
<legend align=top> <span class="Style3"><strong><u>DEMANDE DE DEVIS</u></stro✉

Line 187, Column 10: end tag for "fieldset" omitted, but OMITTAG NO was specified.
</form>✉
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

Line 79, Column 1: start tag was here.
<fieldset> Line 80, Column 15: XML Parsing Error: AttValue: " or ' expected.
<legend align=top> <span class="Style3"><strong><u>DEMANDE DE DEVIS</u></stro✉

Line 80, Column 15: XML Parsing Error: attributes construct error.
<legend align=top> <span class="Style3"><strong><u>DEMANDE DE DEVIS</u></stro✉

Line 80, Column 15: XML Parsing Error: Couldn't find end of Start Tag legend line 80.
<legend align=top> <span class="Style3"><strong><u>DEMANDE DE DEVIS</u></stro✉

Line 80, Column > 80: XML Parsing Error: Opening and ending tag mismatch: fieldset line 79 and legend.
…trong><u>DEMANDE DE DEVIS</u></strong></span> </legend>…



Le code c'est :
79- <fieldset>
80- <legend align=top> <span class="Style3"><strong><u>DEMANDE DE DEVIS</u></strong></span>
</legend>
81- <br /> <br />
82- <label><strong>Nom</strong>.........
83- <input name="Nom" type="text" id="Nom" size="40" maxlength="40" />

Enfin c'est pas trop important cette validation mais enfin puisqu'on y est !
Merci

Répondre à Pat42

15

RAD ZONE, le 17 jun 2008 à 23:02:20

On peux avoir le code complet de la page ! ?

RAD
♣ La plus grande erreur que puisse faire un homme est d'avoir peur d'en faire une. ♣

Répondre à RAD ZONE

16

X-Fan, le 17 jun 2008 à 23:05:08

Ouai, ça aiderais surement de l'avoir au complet. Car ça ne coince pas forcément à l'endroit inscrit par le validateur. Une balise mal mise ailleurs peut tout faire bugger la suite pour le validateur.

"Can't we learn from history, why's it such a mystery?"

Répondre à X-Fan

17

Pat42, le 17 jun 2008 à 23:09:32

Oui je le mets mais j'arrive pas à capturer le numero des lignes dans dreamweaver !
Precedement j'avais rentré les numeros à la main:

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Animation gonflable loire et rhone</title>
<meta name="description" content="Animation gonflable , saut enfants, loire , rhone"/>
<meta name="keywords" content="Animation, enfants, sauts, rhône, isere, loire, haute-loire"/>
<meta name="author" content="château" />

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

<style type="text/css">
<!--
#Layer2 {
position:absolute;
left:134px;
top:40px;
width:600px;
height:600px;
z-index:1;
}
.Style3 {
color: #990000;
font-size: 16px;
}

#Layer3 {
position:absolute;
left:634px;
top:981px;
width:101px;
height:48px;
z-index:2;
}
.Style4 {
color: #CC0000;
font-size: 16;
}
-->
</style>
<script type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' .\n'; }
} if (errors) alert('Avant envoi, veuillez compléter:\n'+errors);
document.MM_returnValue = (errors == '');
}
//-->
</script>
</head>

<body>
<div id="conteneur">
<div id="header"><img src="Bandeau-Chateaux-gonflables.jpg" alt="Location chateau gonflable" width="850" height="298" /></div>

<div id="corps1">

<div id="Layer2">

<form method="post" action="formmail.php" name="formulaire">
<fieldset>
<legend align=top> <span class="Style3"><strong><u>DEMANDE DE DEVIS</u></strong></span> </legend>
<br /> <br />
<label><strong>Nom</strong>.........
<input name="Nom" type="text" id="Nom" size="40" maxlength="40" />
</label>
<br />
<br />
<label><strong>Prenom</strong>....
<input name="Prénom" type="text" id="Prénom" size="40" maxlength="40" />
</label>
<br />
<br />
<label><strong>e-mai</strong>l.......
<input name="e-mail" type="text" id="e-mail" size="40" maxlength="40" />
</label>
<br />
<br />
<label><strong>Société</strong>.....
<input name="Société" type="text" id="Société" size="40" maxlength="40" />
</label>
<br />
<br />
<label><strong>Adresse</strong>....
<input name="Adresse" type="text" id="Adresse" size="40" maxlength="40" />
</label>
<br />
<br />
<label><strong>Code Postal</strong>.......
<input name="Code Postal" type="text" id="Code-Postal" size="5" maxlength="5" />
</label>
<br />
<br />
<label><strong>Ville</strong>...........
<input name="Ville" type="text" id="Ville" size="40" maxlength="40" />
</label>
<br />
<br />
<label><strong>Tél</strong>.............
<input name="Téléphone" type="text" id="Téléphone" size="10" maxlength="10" />
</label>
<br />
<br />
<br />
<strong>Animation</strong> ........

<label>
<input type="radio" name="Lieu" value="Interieur" />
Intérieur</label>

<label>
<input type="radio" name="Lieu" value="Exterieur" />
Extérieur</label>
<br />
<br />
<label><strong>Date de l'animation</strong>..............
<input name="Date animation" type="text" id="Date-animation" size="40" maxlength="40" />
</label>
<br />
<br />
<label><strong>Horaire intervention</strong> : .......Début
<input name="Horaire début" type="text" id="Horaire-début" size="2" maxlength="2" />
</label>
h .....
<label>Fin
<input name="horaire fin" type="text" id="horaire-fin" size="2" maxlength="2" />
</label>
h<br />
<br />
<strong>Lieu ..
<label>Nom de la ville</label>
</strong>
<label>............ </label>
<strong>
<label>
<input name="Lieu" type="text" id="Lieu" size="40" maxlength="40" />
</label>
</strong><br />
<br />
<strong>Votre choix....... </strong>
<p>
<label>
<input type="radio" name="Type de chateau : " value="3.6m X 3.6m" />
Château 3.6m X 3.6m</label>
<br />
<label>
<input type="radio" name="Type de chateau : " value="4.6m X 5.6m" />
Château 5.5m X 4.6m</label>
<br />
<label>
<input type="radio" name="Type de chateau : " value="les 2 chateaux" />
Les deux châteaux</label>
<br />
</p>
<label><strong><u>Commentaire</u></strong><br />
<br/>
<textarea name="Commentaires" cols="70" rows="10" id="Commentaires">Un petit message.. c'est ici !</textarea>
</label>
<br />
<br />
<br />
<label>
<input name="Submit" type="submit" onclick="MM_validateForm('Nom','','R','Prénom','','R','e-mail','','R','Adresse','','R','Code Postal','','R');MM_validateForm('Nom','','R','Prénom','','R','e-mail','','R','Adresse','','R','Code Postal','','R','0','','R','Téléphone','','R','Date animation','','R','Horaire début','','R','horaire fin','','R','1','','R');return document.MM_returnValue" value="Envoyer" />
</label>
<br />
<br />
<br />
<fieldset/>
</form>
</div>
<div class="Style4" id="Layer3"><a href="index.html">Retour à l’index</a> </div>
</div>
</div>
</body>
</html>

Merci

Répondre à Pat42

18

X-Fan, le 17 jun 2008 à 23:23:38

Fieldset se ferme </fieldset> et non comme ça : <fieldset/>

Aussi, pourquoi tu mets les inputs dans les label? Il ne donne pas de faute pour ça mais c'est pas trop trop logique O_O
Et dernier truc, si tu veux faire vraiment valider, ajoute des " où il faut comme <legend align=top> devrait être <legend align="top">

Essaie déjà ça ;) "Can't we learn from history, why's it such a mystery?"

Répondre à X-Fan

19

Pat42, le 17 jun 2008 à 23:29:52

Salut,

Merci d'avoir jeté un coup d'oeil,.. les inputs dans les label... c'est le code de dreamweaver .
J'ai fait tes changements... je vais voir à combien je redescend de fautes :-)

Répondre à Pat42

20

X-Fan, le 17 jun 2008 à 23:31:10

Ou bien combien de plus tu en prends LOL :P

Et voilà, encore une fois, on voit que Dreamweaver c'est bordel comme logiciel. Pourquoi tout le monde ne jure que par lui??!! "Can't we learn from history, why's it such a mystery?"

Répondre à X-Fan
Collection CommentÇaMarche.net