Convertir html en xmtml et le valider en w3c

Fermé
remy76 Messages postés 904 Date d'inscription jeudi 11 janvier 2007 Statut Membre Dernière intervention 5 janvier 2013 - 4 juil. 2007 à 12:35
Dalida Messages postés 6728 Date d'inscription mardi 14 mai 2002 Statut Contributeur Dernière intervention 11 janvier 2016 - 15 nov. 2007 à 02:40
Bonjour,
Je cherche à traduire une page html en xhtml mais j'ai quelques problèmes de saut de ligne.

Pouvez vous me dire pourquoi ça fait ça et si j'ai bien mis ce qu'il faut pour le xhtml.

Dans un deuxième temps, je voudrais valider ma page en w3c mais apparement il y a beaucoup d'erreurs, pouvez vous me dire ce que je dois modifier ?

Merci de prendre le temps de m'aider et de m'expliquer ce qui va pas.

Voici ma page html :
http://www.lesloges76.com/pages/accueil.htm

Voici ma page modifié en xhtml :
http://www.lesloges76.com/pages/accueil2.htm

Voici le code de la page html :
<html>
<head>
<title>Les Loges Informatique</title>
</head>
<body background = "../images/fond.jpg">
<center>
<img border = "0" src = "../images/haut/accueil.gif" width = "600" height = "60">
<br>
<b>Site non officiel de la commune des Loges, créé par l'association "Les Loges Informatique".</b><br>
<br>
<table width = "50%" border = "1" style = "border-collapse: collapse;">
<tr>
<td bgcolor = "#800080"><marquee><i><b><font color = "#FF3300">Le site vient d'être complètement modifié. Il se peut qu'il y ai des problèmes d'affichages, qui seront rapidement corrigés !</marquee></td>
</tr>
</table>
<br>
<table border = "1" style = "border-collapse: collapse;" bordercolor = "#800080" width = "90%">
<tr>
<td colspan = "7" bgcolor = "#800080"> </td>
</tr>
<tr>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "31%" bgcolor = "#000000"><center><img border = "0" src = "../images/acceuil/panneau.jpg" width = "250" height = "190"></td>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "30%" bgcolor = "#000000"><center><img border = "0" src = "../images/acceuil/permis.jpg" width = "250" height = "190"></td>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "31%" bgcolor = "#000000"><center><img border = "0" src = "../images/acceuil/14juillet.jpg" width = "250" height = "190"></td>
<td width = "2%" bgcolor = "#800080"> </td>
</tr>
<tr>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "31%" bgcolor = "#000000" valign = "top"><center><font color = "#FFFF00" size = "4">Les Loges (76790) charmante commune de 1046 habitants est située à 3 Kms de la mer entre Etretat (6 Kms) et Fécamp (11 Kms) en Seine-Maritime en Haute-Normandie.
</td>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "30%" bgcolor = "#000000" valign = "top"><center><font color = "#FFFF00" size = "4">Félicitation aux écoliers de Gerville qui ont tous obtenu, mardi 26 juin, le permis piéton, et bravo à la directrice de Gerville et à la gendarmerie de Fécamp pour cette opération de sensibilisation !
</td>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "31%" bgcolor = "#000000" valign = "top"><center><font color = "#FFFF00" size = "4">6h30 : Réveil en fanfare.

14h : Nombreux jeux sur le parking de la salle des fêtes.
21h15 : Concert de la fanfare sur le parking de la salle des fêtes.
22h45 : Retraite aux flambeaux.
23h : Feu d'artifice sur le parking de la salle des fêtes.
</td>
<td width = "2%" bgcolor = "#800080"> </td>
</tr>
<tr>
<td colspan = "7" bgcolor = "#800080"> </td>
</tr>
<tr>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "31%" bgcolor = "#000000"><center><img border = "0" src = "../images/acceuil/moisson.jpg" width = "250" height = "190"></td>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "30%" bgcolor = "#000000"><center><img border = "0" src = "../images/acceuil/remiselivre.jpg" width = "250" height = "190"></td>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "31%" bgcolor = "#000000"><center><img border = "0" src = "../images/acceuil/florian.jpg" width = "250" height = "190"></td>
<td width = "2%" bgcolor = "#800080"> </td>
</tr>
<tr>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "31%" bgcolor = "#000000" valign = "top"><center><font color = "#FFFF00" size = "4">10h : Procession d'ouverture, office religieux "Messe de la Moisson". 11h45 : Procession et bénédiction des tracteurs agricoles. 12h30 : Mini concert public par la fanfare des Loges. A partir de 13h : Repas champêtre. Toute la journée : Exposition de matériel agricole, marché artisanal, groupe folklorique, expositions diverses,...
</td>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "30%" bgcolor = "#000000" valign = "top"><center><font color = "#FFFF00" size = "4">Comme chaque année, des livres ont été remis aux enfants du RPI par les Maires, les élus et le SIVOS.<br><br>
Les enfants ont fait pour l’occasion un petit spectacle pour leurs parents.
</td>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "31%" bgcolor = "#000000" valign = "top"><center><font color = "#FFFF00" size = "4">L'association "Les Loges Informatique" remercie Florian, pour l'aide qu'il a apporté pour refaire le site lors de son stage et pour ces cours très instructifs !
</td>
<td width = "2%" bgcolor = "#800080"> </td>
</tr>
<tr>
<td colspan = "7" bgcolor = "#800080"> </td>
</tr>
<tr>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "31%" bgcolor = "#000000"><center><img border = "0" src = "../images/acceuil/asso.jpg" width = "250" height = "190"></td>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "30%" bgcolor = "#000000"><center><img border = "0" src = "../images/acceuil/eglise.jpg" width = "250" height = "190"></td>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "31%" bgcolor = "#000000"><center><img border = "0" src = "../images/acceuil/rando.jpg" width = "250" height = "190"></td>
<td width = "2%" bgcolor = "#800080"> </td>
</tr>
<tr>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "31%" bgcolor = "#000000" valign = "top"><center><font color = "#FFFF00" size = "4">Le site est mis à la disposition de tous par l'association "Les Loges Informatique".<br><br>N'hésitez pas à nous contacter si vous avez des messages ou des annonces à faire passer, des photos ou des dates de manifestations à afficher,...ou si vous souhaitez participer à la vie du site (rédiger des articles, prendre des photos,...).
</td>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "30%" bgcolor = "#000000" valign = "top"><center><font color = "#FFFF00" size = "4">Dimanche 22 juillet à 9h30<br>(6ème ordinaire)<br><br>
Mercredi 15 août à 9h30<br>
(Assomption)<br><br>
Dimanche 26 août à 10h30<br>
(Fête de la moisson)<br><br>
Dimanche 23 septembre à 9h30<br>
(24ème ordinaire) </td>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "31%" bgcolor = "#000000" valign = "top"><center><font color = "#FFFF00" size = "4">Randonnée Nocturne<br><br>
Départ le vendredi 6 juillet à 21h30 à la gare des Loges pour un parcours de 6,5 kms.<br><br>
150 personnes maxi.<br>
Réservation au 02.35.28.51.01 et 02.35.29.77.31<br>
<td width = "2%" bgcolor = "#800080"> </td>
</tr>
<tr>
<td colspan = "7" bgcolor = "#800080"> </td>
</tr>
</table>
<br>
<br>

</body>
</html>





Voici le code de la page xtml :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

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

<?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">
<head>
<title>Les Loges Informatique</title>
<meta http-equiv="Content-Type" content="text/HTML; charset=iso-8859-1" />
</head>

<body background = "../images/fond.jpg">
<center>
<img border = "0" src = "../images/haut/accueil.gif" width = "600" height = "60">
<br><br />
<b>Site non officiel de la commune des Loges, créé par l'association "Les Loges Informatique".</b><br><br />
<br><br />
<table width = "50%" border = "1" style = "border-collapse: collapse;">
<tr>
<td bgcolor = "#800080"><marquee><i><b><font color = "#FF3300">Le site vient d'être complètement modifié. Il se peut qu'il y ai des problèmes d'affichages, qui seront rapidement corrigés !</marquee></td>
</tr>
</table>
<br><br />
<table border = "1" style = "border-collapse: collapse;" bordercolor = "#800080" width = "90%">
<tr>
<td colspan = "7" bgcolor = "#800080"> </td>
</tr>
<tr>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "31%" bgcolor = "#000000"><center><img border = "0" src = "../images/acceuil/panneau.jpg" width = "250" height = "190"></td>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "30%" bgcolor = "#000000"><center><img border = "0" src = "../images/acceuil/permis.jpg" width = "250" height = "190"></td>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "31%" bgcolor = "#000000"><center><img border = "0" src = "../images/acceuil/14juillet.jpg" width = "250" height = "190"></td>
<td width = "2%" bgcolor = "#800080"> </td>
</tr>
<tr>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "31%" bgcolor = "#000000" valign = "top"><center><font color = "#FFFF00" size = "4">Les Loges (76790) charmante commune de 1046 habitants est située à 3 Kms de la mer entre Etretat (6 Kms) et Fécamp (11 Kms) en Seine-Maritime en Haute-Normandie.
</td>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "30%" bgcolor = "#000000" valign = "top"><center><font color = "#FFFF00" size = "4">Félicitation aux écoliers de Gerville qui ont tous obtenu, mardi 26 juin, le permis piéton, et bravo à la directrice de Gerville et à la gendarmerie de Fécamp pour cette opération de sensibilisation !
</td>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "31%" bgcolor = "#000000" valign = "top"><center><font color = "#FFFF00" size = "4">6h30 : Réveil en fanfare.

14h : Nombreux jeux sur le parking de la salle des fêtes.
21h15 : Concert de la fanfare sur le parking de la salle des fêtes.
22h45 : Retraite aux flambeaux.
23h : Feu d'artifice sur le parking de la salle des fêtes.
</td>
<td width = "2%" bgcolor = "#800080"> </td>
</tr>
<tr>
<td colspan = "7" bgcolor = "#800080"> </td>
</tr>
<tr>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "31%" bgcolor = "#000000"><center><img border = "0" src = "../images/acceuil/moisson.jpg" width = "250" height = "190"></td>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "30%" bgcolor = "#000000"><center><img border = "0" src = "../images/acceuil/remiselivre.jpg" width = "250" height = "190"></td>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "31%" bgcolor = "#000000"><center><img border = "0" src = "../images/acceuil/florian.jpg" width = "250" height = "190"></td>
<td width = "2%" bgcolor = "#800080"> </td>
</tr>
<tr>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "31%" bgcolor = "#000000" valign = "top"><center><font color = "#FFFF00" size = "4">10h : Procession d'ouverture, office religieux "Messe de la Moisson". 11h45 : Procession et bénédiction des tracteurs agricoles. 12h30 : Mini concert public par la fanfare des Loges. A partir de 13h : Repas champêtre. Toute la journée : Exposition de matériel agricole, marché artisanal, groupe folklorique, expositions diverses,...
</td>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "30%" bgcolor = "#000000" valign = "top"><center><font color = "#FFFF00" size = "4">Comme chaque année, des livres ont été remis aux enfants du RPI par les Maires, les élus et le SIVOS.<br><br /><br><br />
Les enfants ont fait pour l’occasion un petit spectacle pour leurs parents.
</td>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "31%" bgcolor = "#000000" valign = "top"><center><font color = "#FFFF00" size = "4">L'association "Les Loges Informatique" remercie Florian, pour l'aide qu'il a apporté pour refaire le site lors de son stage et pour ces cours très instructifs !
</td>
<td width = "2%" bgcolor = "#800080"> </td>
</tr>
<tr>
<td colspan = "7" bgcolor = "#800080"> </td>
</tr>
<tr>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "31%" bgcolor = "#000000"><center><img border = "0" src = "../images/acceuil/asso.jpg" width = "250" height = "190"></td>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "30%" bgcolor = "#000000"><center><img border = "0" src = "../images/acceuil/eglise.jpg" width = "250" height = "190"></td>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "31%" bgcolor = "#000000"><center><img border = "0" src = "../images/acceuil/rando.jpg" width = "250" height = "190"></td>
<td width = "2%" bgcolor = "#800080"> </td>
</tr>
<tr>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "31%" bgcolor = "#000000" valign = "top"><center><font color = "#FFFF00" size = "4">Le site est mis à la disposition de tous par l'association "Les Loges Informatique".<br><br /><br><br />N'hésitez pas à nous contacter si vous avez des messages ou des annonces à faire passer, des photos ou des dates de manifestations à afficher,...ou si vous souhaitez participer à la vie du site (rédiger des articles, prendre des photos,...).
</td>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "30%" bgcolor = "#000000" valign = "top"><center><font color = "#FFFF00" size = "4">Dimanche 22 juillet à 9h30<br>(6ème ordinaire)<br /><br><br /><br><br />
Mercredi 15 août à 9h30<br><br />
(Assomption)<br><br />
Dimanche 26 août à 10h30<br><br />
(Fête de la moisson)<br><br />
Dimanche 23 septembre à 9h30<br><br />
(24ème ordinaire) </td>
<td width = "2%" bgcolor = "#800080"> </td>
<td width = "31%" bgcolor = "#000000" valign = "top"><center><font color = "#FFFF00" size = "4">Randonnée Nocturne<br><br /><br><br />
Départ le vendredi 6 juillet à 21h30 à la gare des Loges pour un parcours de 6,5 kms.<br><br /><br><br />
150 personnes maxi.<br><br />
Réservation au 02.35.28.51.01 et 02.35.29.77.31<br><br />
<td width = "2%" bgcolor = "#800080"> </td>
</tr>
<tr>
<td colspan = "7" bgcolor = "#800080"> </td>
</tr>
</table>
<br><br />
<br><br />

</body>
</html>



Voici les erreurs pour le W3C :

http://validator.w3.org/...
A voir également:

4 réponses

gryzzly Messages postés 4608 Date d'inscription lundi 7 novembre 2005 Statut Contributeur Dernière intervention 24 octobre 2020 1 335
4 juil. 2007 à 13:16
pour rémy :

le validateur t'explique précisément ou sont les fautes !! il suffit de lire !!

et si tu ne sais pas ce que ca veut dire, recherche google !

exple :
# Error  Line 3 column 2: DTDs other than base allowed only if CONCUR YES or EXPLICIT YES.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

# Error Line 3 column 10: document type "html" already defined.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

# Error Line 5 column 2: DTDs other than base allowed only if CONCUR YES or EXPLICIT YES.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"

# Error Line 5 column 10: document type "html" already defined.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"

# Error Line 11 column 2: "DOCTYPE" declaration not allowed in instance.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"


recherche google:
https://www.google.fr/search?q=DTDs+other+than+base+allowed+only+if+CONCUR+YES+or+EXPLICIT+YES&gws_rd=ssl

premier lien :
This eror can happens when 2 DTDs are declared in a page.

Solution:

Remove one of the declaration. 


et oh.. comme par hasard dans le code source de ta page que voit t'on ?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">

<?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">


4 déclarations!!!!!... pour ton info, un code, ca a une signification et une syntaxe adaptée. renseigne toi avant de colller tout et n'importe quoi dans tes pages...
qu'est ce qu'un doctype, a quoi ca sert ?

pour

0
remy76 Messages postés 904 Date d'inscription jeudi 11 janvier 2007 Statut Membre Dernière intervention 5 janvier 2013 195
4 juil. 2007 à 13:40
J'avais regardé sur ce site pour tout convertir :
https://openweb.eu.org/articles/html_au_xhtml

Où c'est mal expliqué au j'ai mal compris !

Pour le validateur je sais bien que c'est bien expliqué, mais j'ai quand même du mal à comprendre ce qu'il faut changer !
0
remy76 Messages postés 904 Date d'inscription jeudi 11 janvier 2007 Statut Membre Dernière intervention 5 janvier 2013 195
4 juil. 2007 à 13:42
Merci j'avais pas pensé à chercher comme ça sur google !
0
Bonjour,
je vais sur un site internet ou le webmaster a fait interdire les code html pour nos page allors que faire pour cahnger nos html en balise IMG merci davance

exemple de mon code:

</table></tr></td>
</embed>

</tr></table>
</td></table></tr>
<p><br>


<div align="center">



<td></table></td></tr>


</td></tr></table></td></tr></table></td>
</table>


</td></tr></table></td></tr></table></td>
</table>
</td></tr></table>
<BODY STYLE="background:black url(http://tinypic.com/images/goodbye.jpg repeat white fixed ;">
<p>
<br>
<body>
<div align="center">
<TABLE width="800" border="2" bordercolor="transparent" align="center" cellPadding="0" cellSpacing="0" id="Table2">
<TR>
<TD width="800" height="78" vAlign="top"
bgcolor=<BODY STYLE="background:black url ; repeat transparent ;">
<p><br><p>
0
Dalida Messages postés 6728 Date d'inscription mardi 14 mai 2002 Statut Contributeur Dernière intervention 11 janvier 2016 922
15 nov. 2007 à 02:40
salut,

ouvre un nouveau fil de discussion pour ton problème car il est très différent du sujet initial et tu risques de ne pas avoir de réponse.
par ailleurs explique mieux ton problème, plus précisément, car là je n'ai rien compris !
-;o)
0