Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1679 connectés 

  FORUM HardWare.fr
  Programmation
  HTML/CSS

  [RESOLU] Erreurs HTML

 



 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

[RESOLU] Erreurs HTML

n°2055581
alex91650
Posté le 09-02-2011 à 20:02:12  profilanswer
 

Bonjour :hello:,
Je suis actuellement en train de faire ma première page en HTML/CSS dans le cadre de mes études en DUT Info 1ère année. En utilisant le validator, j'obtiens plusieurs erreurs :

 


Code HTML :

Spoiler :

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">

 

<head>
<title>Les Simpson : Le film</title>
<link rel="stylesheet" href="style1.css" media="screen"
type="text/css" />  
</head>

 

<body>

 

<div class="header">
<h1 align="center">Les Simpson : Le film (2007) <a name="haut"></a> </h1>
</div>

 

<div  class="menu">
<h2 align="center">Menu</h2>
<ul >
    <li>Tous les films</li>
    <li><a href="#Fichetechnique">Fiches techniques</a></li>
    <li><a href="#Lefilm">Le Film</a>
    <ul>
        <li><a href="#Résumé">Résumé</a></li>
        <li><a href="#Distribution">Distribution</a></li>
    </ul></li>
    <li><a href="#Séances">Séances</a></li>
    <li><a href="#Récompenses">Récompenses et nominations</a></li>
</ul>
</div>

 

<div class="contenu">
<h2>Fiche technique <a name="Fichetechnique"></a></h2>

 


<h3>Titres</h3>
<p><img src="Simpsons_poster.png" alt="Le film" /></p>
<ul>
    <li><em><strong>Titre original :</em> The Simpsons Movie</strong></li>
    <li><em><strong>Titre français :</em> Les Simpson : Le film</strong></li>
</ul>

 

<h3>Production</h3>
<ul>
    <li><em><strong>Réalisation :</em> David Silverman</strong></li>
    <li><em><strong>Scénario :</em> Matt Groening, James L. Brooks, Jon Vitti, Mike Scully, Al Jean, Ian Maxtone-
    Graham, David Mirkin, Mike Reiss, Matt Selman, John Swartzwelder</strong></li>
    <li><em><strong>Musique :</em> Hans Zimmer</strong></li>
    <li><em><strong>Production :</em> James L. Brooks, Matt Groening, Al Jean, Mike Scully et Richard Sakai (20th
    Century Fox, Gracie Films, AKOM)</strong></li>
    <li><em><strong>Genre :</em> Animation, Comédie</strong></li>
</ul>
<p><a href="#haut">Remonter</a></p>

 

<h2>Le film <a name="Lefilm"></a></h2>

 

<h3>Résumé<a name="Résumé"></a></h3>
<p>Après une pollution du lac de Springfield provoquée par Homer Simpson avec les déjections d'un cochon
qu'il a adopté, le gouvernement américain décide que la ville entière est devenue une menace pour
l'environnement du pays et recouvre donc Springfield d'un immense dôme de verre dans l'intention d'y
éradiquer toute forme de vie. La famille se voit donc obligée de déménager en Alaska...</p>

 

<h3>Distribution <a name="Distribution"></a></h3>

 

<table align="center">
<tr>
    <th>Personnage</th>
    <th>Voix originale</th>
    <th>Voix française</th>
</tr>
<tr>
    <td class="fondgrisfoncé"><img src="Homer.jpg" alt="Homer Simpson" /><br/>Homer Simpson</td>
    <td class="fondgrisfoncé"><img src="DanCastellaneta.jpg" alt="DanCastellaneta" /><a href="http://fr.wikipedia.org/wiki/Dan_Castellaneta"><br/>Dan Castelleneta</td>
    <td class="fondgrisfoncé"><a href="http://fr.wikipedia.org/wiki/Philippe_Peythieu">Philippe Peythieu</td>
</tr>
<tr>
    <td class="fondgrisclair"><img src="Marge.png" alt="Marge Simpson" /><p>Marge Simpson</p></td>
    <td class="fondgrisclair">Julie Kavner</td>
    <td class="fondgrisclair">Véronique Augereau</td>
</tr>
<tr>
    <td class="fondgrisfoncé">Bart Simpson</td>
    <td class="fondgrisfoncé">Nancy Cartwright</td>
    <td class="fondgrisfoncé">Joëlle Guigui</td>
</tr>
<tr>
    <td class="fondgrisclair">Lisa Simpson</td>
    <td class="fondgrisclair">Yeardley Smith</td>
    <td class="fondgrisclair">Aurélia Bruno</td>
</tr>
</table>

 

<p><a href="distribution.html">Toute la distribution</a></p>
<p><a href="#haut">Remonter</a></p>

 

<h2>Séances <a name="Séances"></a></h2>

 

<table align="center" border="3">

 

<tr>
    <th rowspan="2">Cinéma</th>
    <th colspan="2">Lundi - Mardi - Mercredi - Jeudi - Vendredi</th>
    <th colspan="4">Samedi - Dimanche</th>
</tr>
<tr>
    <th colspan="2">Après-midi - Soir</th>
    <th>Matin</th>
    <th>Après-midi - Soir</th>
</tr>
<tr>
    <td class="fondgrisfoncé">Le 6 néma (Paris 6)</td>
    <td class="fondgrisfoncé" colspan="2">17h30 - 19h15 - 22h10</td>
    <td class="fondgrisfoncé">10h05 - 12h10</td>
    <td class="fondgrisfoncé">17h30 - 19h15 - 22h10</td>
</tr>
<tr>
    <td class="fondgrisclair">Das Gran Nécran (Aachen, Ger)</td>
    <td class="fondgrisclair">Saal 1 : 17h30 - 19h15 - 22h10</td>
    <td class="fondgrisclair">Saal 2 : 17h30 - 19h15 - 22h10</td>
    <td class="fondgrisclair">10h05 - 12h10</td>
    <td class="fondgrisclair">17h30 - 19h15 - 22h10</td>
</tr>
<tr>
    <td class="fondgrisfoncé">Le Sètième Art (Sète)</td>
    <td class="fondgrisfoncé" colspan="2">17h30 - 19h15 - 22h10</td>
    <td class="fondgrisfoncé" colspan="4">Pas de séances le week-end</td>
</tr>
<tr>
    <td class="fondgrisclair">Le 7 néma (Paris 7)</td>
    <td class="fondgrisclair">17h30 - 19h15 - 22h10</td>
    <td class="fondgrisclair">17h30 - 19h15 - 22h10</td>
    <td class="fondgrisclair">10h05 - 12h10</td>
    <td class="fondgrisclair">17h30 - 19h15 - 22h10</td>
</tr>
</table>

 

<p><a href="#haut">Remonter</a></p>

 

<p><a href="seances.html">Toutes les séances</a></p>

 

<h2>Récompenses et nominations <a name="Récompenses"></a></h2>
<ul>
    <li><a href="http://www.britishcomedyawards.com/">British Comedy Awards</a> : Best Comedy Film</li>
    <li>Kids' Choice Awards : Meilleur film</li>
    <li>Golden Globe : Meilleur film d'animation (nommé)</li>
    <li>Annie Awards : Meilleur film d'animation (nommé), Meilleur réalisateur pour le cinéma (nommé),
    Meilleur scénario pour le cinéma (nommé) et Meilleure performance vocale pour le cinéma
    (nommé)</li>
</ul>
<p><a href="#haut">Remonter</a></p>
</div>

 

<div class="footer">
<p><em>Cinésite - © Prénom Nom, 2011 - Fait avec les mains.<em>
<a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10"
alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a></p>
</div>

 

</body>

 

</html>

 


Erreur :

Spoiler :

  Validation Output: 19 Errors

 

  1. Error Line 13, Column 13: there is no attribute "align"

 

     <div  align="center" class="header">

 

     ✉

 

     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. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.
   2. Error Line 18, Column 11: there is no attribute "align"

 

     <h2 align="center">Menu</h2>

 

     ✉

 

     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. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.
   3. Error Line 39, Column 38: end tag for "strong" omitted, but OMITTAG NO was specified

 

      <li><em><strong>Titre original :</em> The Simpsons Movie</strong></li>

 

     ✉

 

     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 39, Column 10: start tag was here

 

      <li><em><strong>Titre original :</em> The Simpsons Movie</strong></li>

 

  5. Error Line 39, Column 66: end tag for element "strong" which is not open

 

      <li><em><strong>Titre original :</em> The Simpsons Movie</strong></li>

 

     ✉

 

     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.
   6. Error Line 40, Column 38: end tag for "strong" omitted, but OMITTAG NO was specified

 

      <li><em><strong>Titre français :</em> Les Simpson : Le film</strong></li>

 

     ✉

 

     You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
   7. Info Line 40, Column 10: start tag was here

 

      <li><em><strong>Titre français :</em> Les Simpson : Le film</strong></li>

 

  8. Error Line 40, Column 69: end tag for element "strong" which is not open

 

      <li><em><strong>Titre français :</em> Les Simpson : Le film</strong></li>

 

     ✉

 

     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 45, Column 35: end tag for "strong" omitted, but OMITTAG NO was specified

 

      <li><em><strong>Réalisation :</em> David Silverman</strong></li>

 

     ✉

 

     You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
  10. Info Line 45, Column 10: start tag was here

 

      <li><em><strong>Réalisation :</em> David Silverman</strong></li>

 

 11. Error Line 45, Column 60: end tag for element "strong" which is not open

 

      <li><em><strong>Réalisation :</em> David Silverman</strong></li>

 

     ✉

 

     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 46, Column 32: end tag for "strong" omitted, but OMITTAG NO was specified

 

      <li><em><strong>Scénario :</em> Matt Groening, James L. Brooks, Jon Vitti, Mik…

 

     ✉

 

     You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
  13. Info Line 46, Column 10: start tag was here

 

      <li><em><strong>Scénario :</em> Matt Groening, James L. Brooks, Jon Vitti, Mik…

 

 14. Error Line 47, Column 74: end tag for element "strong" which is not open

 

      Graham, David Mirkin, Mike Reiss, Matt Selman, John Swartzwelder</strong></li>

 

     ✉

 

     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.
  15. Error Line 48, Column 31: end tag for "strong" omitted, but OMITTAG NO was specified

 

      <li><em><strong>Musique :</em> Hans Zimmer</strong></li>

 

     ✉

 

     You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
  16. Info Line 48, Column 10: start tag was here

 

      <li><em><strong>Musique :</em> Hans Zimmer</strong></li>

 

 17. Error Line 48, Column 52: end tag for element "strong" which is not open

 

      <li><em><strong>Musique :</em> Hans Zimmer</strong></li>

 

     ✉

 

     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.
  18. Error Line 49, Column 34: end tag for "strong" omitted, but OMITTAG NO was specified

 

      <li><em><strong>Production :</em> James L. Brooks, Matt Groening, Al Jean, Mik…

 

     ✉

 

     You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
  19. Info Line 49, Column 10: start tag was here

 

      <li><em><strong>Production :</em> James L. Brooks, Matt Groening, Al Jean, Mik…

 

 20. Error Line 50, Column 42: end tag for element "strong" which is not open

 

      Century Fox, Gracie Films, AKOM)</strong></li>

 

     ✉

 

     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.
  21. Error Line 51, Column 29: end tag for "strong" omitted, but OMITTAG NO was specified

 

      <li><em><strong>Genre :</em> Animation, Comédie</strong></li>

 

     ✉

 

     You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
  22. Info Line 51, Column 10: start tag was here

 

      <li><em><strong>Genre :</em> Animation, Comédie</strong></li>

 

 23. Error Line 51, Column 57: end tag for element "strong" which is not open

 

      <li><em><strong>Genre :</em> Animation, Comédie</strong></li>

 

     ✉

 

     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.
  24. Error Line 65, Column 14: there is no attribute "align"

 

     <table align="center">

 

     ✉

 

     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. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.
  25. Error Line 73, Column 164: end tag for "a" omitted, but OMITTAG NO was specified

 

     …href="http://fr.wikipedia.org/wiki/Dan_Castellaneta"><br/>Dan Castelleneta</td>

 

     ✉

 

     You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
  26. Info Line 73, Column 83: start tag was here

 

     …ellaneta.jpg" alt="DanCastellaneta" /><a href="http://fr.wikipedia.org/wiki/Da…

 

 27. Error Line 74, Column 106: end tag for "a" omitted, but OMITTAG NO was specified

 

     …<a href="http://fr.wikipedia.org/wiki/Philippe_Peythieu">Philippe Peythieu</td>

 

     ✉

 

     You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
  28. Info Line 74, Column 28: start tag was here

 

      <td class="fondgrisfoncé"><a href="http://fr.wikipedia.org/wiki/Philippe_Peyth…

 


 


     
 

 

Merci de votre aide ;).


Message édité par alex91650 le 10-02-2011 à 12:08:44
mood
Publicité
Posté le 09-02-2011 à 20:02:12  profilanswer
 

n°2055610
billgatesa​nonym
Posté le 09-02-2011 à 21:31:52  profilanswer
 

Quelle erreur vous pose un problème ?
Essayons d'y aller petit à petit.
 
Par exemple, pour la première erreur, le message semble clair.
Vous utiliser align..., alors que align...  n'existe plus pour <div...>.
 
Voyez la liste des attributs permis, par exemple sur le site w3schools qui donne une bonne vision pour débuter :
http://www.w3schools.com/tags/tag_DIV.asp
Il y est indiqué :
Deprecated. Use styles instead.
Specifies the alignment of the content inside a div element TF

TF à la fin signifie que c'est valable pour T=Transitional, ou F=Frameset, mais pas avec Strict que vous avez spécifié dans la ligne du DOCTYPE.

Message cité 1 fois
Message édité par billgatesanonym le 09-02-2011 à 21:36:06
n°2055621
gatsu35
Blablaté par Harko
Posté le 09-02-2011 à 22:08:17  profilanswer
 

Et dans le nom des classes ou des id il est interdit de mettre des accents, ou c'est surtout très déconseillé :)


---------------
Blablaté par Harko
n°2055654
alex91650
Posté le 10-02-2011 à 06:44:06  profilanswer
 

billgatesanonym a écrit :

Quelle erreur vous pose un problème ?
Essayons d'y aller petit à petit.

 

Par exemple, pour la première erreur, le message semble clair.
Vous utiliser align..., alors que align...  n'existe plus pour <div...>.

 

Voyez la liste des attributs permis, par exemple sur le site w3schools qui donne une bonne vision pour débuter :
http://www.w3schools.com/tags/tag_DIV.asp
Il y est indiqué :
Deprecated. Use styles instead.
Specifies the alignment of the content inside a div element TF

TF à la fin signifie que c'est valable pour T=Transitional, ou F=Frameset, mais pas avec Strict que vous avez spécifié dans la ligne du DOCTYPE.


Merci beaucoup. Je vais y jeter un œil. C'est sympa. Mon fichier [édit] CSS [/édit] quant à lui n'a aucunes erreurs. C'est déjà ça. Je reposterai après avoir supprimé quelques erreurs du fichier .html.

 

Merci.


Message édité par alex91650 le 10-02-2011 à 12:07:18
n°2055655
gatsu35
Blablaté par Harko
Posté le 10-02-2011 à 07:27:46  profilanswer
 

pourquoi dis  tu que ton fichier n'a aucune erreur alors que le validateur du W3C t'en trouve à la pelle ?


---------------
Blablaté par Harko
n°2055748
alex91650
Posté le 10-02-2011 à 12:02:37  profilanswer
 

Merci de ton aide je n'ai plus aucunes erreurs. J'ai crée une classe pour centrer le texte dans une feuille de style en CSS. Et je l'ai appelé dans ma balise <table> etc.

 

Mes autres erreurs étaient notamment des erreurs de croisements de balises qui du coup étaient mal fermées.

 

Merci :jap:

n°2055749
alex91650
Posté le 10-02-2011 à 12:04:04  profilanswer
 

gatsu35 a écrit :

pourquoi dis  tu que ton fichier n'a aucune erreur alors que le validateur du W3C t'en trouve à la pelle ?


J'ai oublie de dire qu'il s'agissait de mon fichier .CSS qui était sans erreurs. Autant pour moi :jap:


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  HTML/CSS

  [RESOLU] Erreurs HTML

 

Sujets relatifs
[html] Message d'erreur sur mon siteerreur de compilation( cygwin)
Condition Javascript/HTML[Html / Script]
formulaire html et JSErreur d'analyse XML
Erreur dans mon code HTML ? 
Plus de sujets relatifs à : [RESOLU] Erreurs HTML


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR