5568 sujets

Sémantique web et HTML

Salut à tous,
je débute en css et j'ai plein de pb de validation de ma page
Voici mon 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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>TopTactic - Aidon-nous les uns les autres !</title>
<link href="style-index.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">
<!--
window.onload=montre;
function montre(id) {
var d = document.getElementById(id);
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
	}
if (d) {d.style.display='block';}
}
//-->
</script>

</head>

<body>
<!-- zone de recherche rapide et de connexion -->
<DIV id="haut">
<table cellpadding="0" cellspacing="0">
  <tr>
    <td valign="bottom">
	<form action="" method="get" >
	<ul>
		<li>Recherche rapide</li>
		<li><input type="text" size="50" /><a href="#" class="lien"><img src="images/puce.gif" hspace="5" />Ok</a></li>
	</ul>
	</form>	
	</td>
    <td width="50%" align="right">
	<form action="" method="get" >
	<ul>	
		<li>Connexion </li>
		<li><input type="text" value="Mail" size="30" onfocus="value=''" /><input type="password" value="pass" size="15" onfocus="value=''"/></li>
		<li><input name="" type="checkbox" value="" />Mémoriser</li>
		<li class="marge2"><a href="#" class="lienPt">Mot de passe oublié ?</a> <a href="#" class="lien"><img src="images/puce.gif" hspace="5" />S'identifier</a> <a href="#" class="lien"><img src="images/puce.gif" hspace="5" />S'inscrire</a></li>
	</ul>
	</form>
	</td>
  </tr>
</table>
</DIV>
<!-- FIN zone de recherche rapide et de connexion -->

<!-- conteneur général -->
<div id="general">

	<!-- conteneur de la partie centrale -->
	<div id="conteneur">
	<!-- Menu  -->
	<dl id="menu">
		<!-- catégorie 1 -->
		<dt onmouseover="javascript:montre('smenu1');" onmouseout="javascript:montre();">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
  			<tr>
    			<td width="19%"><img src="images/accueil/pictos/picto_aide.gif" alt="aide" width="60" height="65" /></td>
    			<td width="81%" valign="bottom" class="marge"><a href="#">Service &agrave; la personne / Garde d'enfants</a></td>
  			</tr>
		</table>
		</dt>
			<!-- services de la catégorie 1 -->
			<dd id="smenu1" onmouseover="javascript:montre('smenu1');" onmouseout="javascript:montre();">
				<ul>
					<li><a href="#">Garde d'enfants / Sorties d'école / Baby-sitting</a></li>
					<li><a href="#">Assistance aux personnes agées / malades / handicapées</a></li>
					<li><a href="#">Ménage / Repassage / Retouches couture</a></li>
				</ul>
			</dd>
			<!-- FIN services de la catégorie 1 -->
		<!-- FIN catégorie 1 -->
		
		<!-- catégorie 2 -->	
		<dt onmouseover="javascript:montre('smenu2');" onmouseout="javascript:montre();">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
  			<tr>
    			<td width="19%"><img src="images/accueil/pictos/picto_entretien.gif" alt="aide" width="60" height="65" /></td>
    			<td width="81%" valign="bottom" class="marge"><a href="#">Entretien / Bricolage / R&eacute;paration</a></td>
  			</tr>
		</table>
		</dt>
			<!-- services de la catégorie 2 -->			
			<dd id="smenu2" onmouseover="javascript:montre('smenu2');" onmouseout="javascript:montre();">
				<ul>
					<li><a href="#">Assistance Informatique / Vidéo / Son</a></li>
					<li><a href="#">Bricolage / Travaux d'entretien</a></li>
					<li><a href="#">Installation d'électroménager / Montage de meuble</a></li>
				</ul>
			</dd>	
			<!-- FIN services de la catégorie 2 -->
		<!-- FIN catégorie 2 -->
		
		<!-- catégorie 3 -->
		<dt onmouseover="javascript:montre('smenu3');" onmouseout="javascript:montre();">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
  			<tr>
    			<td width="19%"><img src="images/accueil/pictos/picto_logement.gif" alt="aide" width="60" height="65" /></td>
    			<td width="81%" valign="bottom" class="marge"><a href="#">Logement / Habitation / Immobilier</a></td>
  			</tr>
		</table>
		</dt>
			<!-- services de la catégorie 3 -->
			<dd id="smenu3" onmouseover="javascript:montre('smenu3');" onmouseout="javascript:montre();">
				<ul>
					<li><a href="#">Location vide</a></li>
					<li><a href="#">Commerces / Bureaux / Boutiques</a></li>
					<li><a href="#">Autres services immobiliers...</a></li>
				</ul>
			</dd>
			<!-- FIN services de la catégorie 3 -->
		<!-- FIN catégorie 3 -->
		
		<!-- catégorie 4 -->
		<dt onmouseover="javascript:montre('smenu4');" onmouseout="javascript:montre();">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
  			<tr>
    			<td width="19%"><img src="images/accueil/pictos/picto_mission.gif" alt="aide" width="60" height="65" /></td>
    			<td width="81%" valign="bottom" class="marge"><a href="#">Missions / Freelance / Jobs</a></td>
  			</tr>
		</table>
		</dt>
			<!-- services de la catégorie 4 -->
			<dd id="smenu4" onmouseover="javascript:montre('smenu4');" onmouseout="javascript:montre();">
				<ul>
					<li><a href="#">Communication / Création / Traductions</a></li>
					<li><a href="#">Administratif / Secrétariat / Organisation</a></li>
					<li><a href="#">Autres missions...</a></li>
				</ul>
			</dd>
			<!-- FIN services de la catégorie 4 -->
		<!-- FIN catégorie 4 -->
			
		<!-- catégorie 5 -->			
		<dt onmouseover="javascript:montre('smenu5');" onmouseout="javascript:montre();">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
  			<tr>
    			<td width="19%"><img src="images/accueil/pictos/picto_loisirs.gif" alt="aide" width="60" height="65" /></td>
    			<td width="81%" valign="bottom" class="marge"><a href="#">Loisirs / Bien-&ecirc;tre / Beaut&eacute;</a></td>
  			</tr>
		</table>
		</dt>
			<!-- services de la catégorie 5 -->
			<dd id="smenu5" onmouseover="javascript:montre('smenu5');" onmouseout="javascript:montre();">
				<ul>
					<li><a href="#">Coiffure / Manucure / Pédicure</a></li>
					<li><a href="#">Massages / Relaxation</a></li>
					<li><a href="#">Astrologie / Tarot / Voyance</a></li>
				</ul>
			</dd>
			<!-- FIN services de la catégorie 5 -->
		<!-- FIN catégorie 5 -->
			
		<!-- catégorie 6 -->			
		<dt onmouseover="javascript:montre('smenu6');" onmouseout="javascript:montre();">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
  			<tr>
    			<td width="19%"><img src="images/accueil/pictos/picto_cours.gif" alt="aide" width="60" height="65" /></td>
    			<td width="81%" valign="bottom" class="marge"><a href="#">Cours / Formation / Soutien scolaire</a></td>
  			</tr>
		</table>
		</dt>
			<!-- services de la catégorie 6 -->
			<dd id="smenu6" onmouseover="javascript:montre('smenu6');" onmouseout="javascript:montre();">
				<ul>
					<li><a href="#">Cours de musique / instruments / chant</a></li>
					<li><a href="#">Atelier de peinture / Dessin / Sculture</a></li>
					<li><a href="#">Cours par correspondance</a></li>
				</ul>
			</dd>	
			<!-- FIN services de la catégorie 6 -->
		<!-- FIN catégorie 6 -->	
		
		<!-- catégorie 7 -->
		<dt onmouseover="javascript:montre('smenu7');" onmouseout="javascript:montre();">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
  			<tbody>
			<tr>
    			<td width="19%"><img src="images/accueil/pictos/picto_depot.gif" alt="aide" width="60" height="65" /></td>
    			<td width="81%" valign="bottom" class="marge"><a href="#">D&eacute;pot/vente produits</a></td>
  			</tr>
			</tbody>
		</table>
		</dt>
			<!-- services de la catégorie 7 -->
			<dd id="smenu7" onmouseover="javascript:montre('smenu7');" onmouseout="javascript:montre();">
				<ul>
					<li><a href="#">Animaux / Accessoires</a></li>
					<li><a href="#">Audio / Vidéo / Photo</a></li>
					<li><a href="#">Tout le sport</a></li>
				</ul>
			</dd>
			<!-- FIN services de la catégorie 7 -->
		<!-- FIN catégorie 7 -->	
			
		<!-- catégorie 8 -->
		<dt onmouseover="javascript:montre('smenu8');" onmouseout="javascript:montre();">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
  			<tr>
    			<td width="19%"><img src="images/accueil/pictos/picto_reseau.gif" alt="aide" width="60" height="65" /></td>
    			<td width="81%" valign="bottom" class="marge"><a href="#">R&eacute;seau social</a></td>
  			</tr>
		</table>
		</dt>
			<!-- services de la catégorie 8 -->
			<dd id="smenu8" onmouseover="javascript:montre('smenu8');" onmouseout="javascript:montre();">
				<ul>
					<li><a href="#">Business partenaire</a></li>
					<li><a href="#">Enchanges linguistiques</a></li>
					<li><a href="#">Trouver l'âme soeur</a></li>
				</ul>
			</dd>
			<!-- FIN services de la catégorie 8 -->
		<!-- FIN catégorie 8 -->
	</dl>
	<!-- fin Menu  -->
	</div>
	<!-- FIN conteneur de la partie centrale -->

</div>
<!-- FIN conteneur général -->

<!-- pied de page -->
<DIV id="pied">
	<ul>
		<li>&nbsp;Choix de la langue&nbsp;</li>
		<li><a href="#">fr</a></li>
		<li><a href="#">en</a></li>
		<li><a href="#">es</a></li>
		<li><a href="#">da</a></li>
		<li><a href="#">de</a></li>
		<li><a href="#">it</a></li>
		<li><a href="#">nl</a></li>
		<li><a href="#">pt</a></li>
		<li><a href="#">fi</a></li>
		<li><a href="#">su</a></li>
	</ul>
</DIV>
<!-- FIN pied de page -->

</body>
</html>


Et voici les erreurs qui me sont renvoyées :

Result: Failed validation, 14 errors  
File: upload://Form Submission 
Encoding: utf-8 
Doctype: XHTML 1.0 Transitional 
Root Namespace:  http://www.w3.org/1999/xhtml  

Note: The Validator XML support has some limitations. 

This page is not Valid XHTML 1.0 Transitional!
Below are the results of checking this document for XML well-formedness and validity. 

Error Line 25 column 8: there is no attribute "id".
<DIV id="haut">
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. 
 

Error Line 25 column 14: element "DIV" undefined.
<DIV id="haut">
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. 



Error Line 32 column 101: required attribute "alt" not specified.
...mg src="images/puce.gif" hspace="5" />Ok</a></li>
The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element. 

Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>. 



Error Line 42 column 138: required attribute "alt" not specified.
...img src="images/puce.gif" hspace="5" />S'identifier</a> <a href="#" class="li


Error Line 42 column 220: required attribute "alt" not specified.
...img src="images/puce.gif" hspace="5" />S'inscrire</a></li>


Error Line 60 column 64: document type does not allow element "table" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.
...dth="100%" border="0" cellspacing="0" cellpadding="0">
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>"). 



Error Line 80 column 64: document type does not allow element "table" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.
...dth="100%" border="0" cellspacing="0" cellpadding="0">


Error Line 100 column 64: document type does not allow element "table" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.
...dth="100%" border="0" cellspacing="0" cellpadding="0">


Error Line 120 column 64: document type does not allow element "table" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.
...dth="100%" border="0" cellspacing="0" cellpadding="0">
 

Error Line 140 column 64: document type does not allow element "table" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.
...dth="100%" border="0" cellspacing="0" cellpadding="0">


Error Line 160 column 64: document type does not allow element "table" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.
...dth="100%" border="0" cellspacing="0" cellpadding="0">
 

Error Line 180 column 64: document type does not allow element "table" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.
...dth="100%" border="0" cellspacing="0" cellpadding="0">


Error Line 202 column 64: document type does not allow element "table" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.
...dth="100%" border="0" cellspacing="0" cellpadding="0">


Error Line 228 column 14: element "DIV" undefined.
<DIV id="pied">



Please help me Smiley biggol
Modifié par Legna (28 Apr 2006 - 12:46)
Salut

Les messages sont simples (mais peut-être ne lis-tu pas l'anglais...)

<DIV> les balises doivent être en minuscules en XHTML...

les images doivent avoir un alt="quelque chose" pour être valides...

Au moins un alt="" où quelque chose est rien Smiley cligne

Quand aux tables, elle ne doivent pas être dans un DT (balise bloc dans une balise inline)
Bonjour,

Permettez-moi de me joindre à vous, mais il semble que malgré l'utilisation de balise majuscule et semble t'il d'une structure correcte, n'y a t'il pas beaucoup de tableau ?
Cela ressemble à 'très première' vue à de la mise en page...

(Mais attention, je n'ai pas approfondis du tout... Vraiment un survol du code...).

G.
Legna a écrit :
C good Smiley cligne
tout fonctionne comme il fo, j'ai viré mes tablo et c conforme....
merci bcp

Ce problème est donc résolu ?