Vérification html

Fermé
stphane215 Messages postés 12 Date d'inscription mercredi 18 juin 2008 Statut Membre Dernière intervention 6 mars 2011 - 1 oct. 2010 à 11:28
le hollandais volant Messages postés 4998 Date d'inscription samedi 8 mars 2008 Statut Membre Dernière intervention 23 décembre 2023 - 1 oct. 2010 à 16:55
Bonjour,

Je suis en train de créer un site, j'ai fait vérifier mes pages sur w3.com mais elles ont toutes la même erreur:

Voilà le code

...span="7" bgcolor="#99CC66" background="file:///C|/Program%20Files/Macromedia/D...?

apparement l'erreur est au niveau des guillemets juste avant file

Voilà la réponse du site

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.

Que dois-je faire ?
Merci



A voir également:

1 réponse

le hollandais volant Messages postés 4998 Date d'inscription samedi 8 mars 2008 Statut Membre Dernière intervention 23 décembre 2023 1 056
1 oct. 2010 à 16:55
Salut !

Apparemment, le type de document, celui spécifié tout en haut dans le doctype ne te permet pas d'utiliser certains attributs.

Le code suivant est du HTML4:
span="7" bgcolor="#99CC66" background="file:///C|/Program%20Files/Macromedia/D...? 


Je conseille plutôt de faire ça en xHTML1 :

... style="background-color: #99CC66"; background-image: url(file:///C:\.....);"


N'oublies pas non plus qu'une fois en ligne, le fichier image que tu places là en fond de page ne s'affichera pas : il faut utiliser une URL relative.
1