CONNEXION
  • RetourJeux
    • Sorties
    • Hit Parade
    • Les + populaires
    • Les + attendus
    • Soluces
    • Tous les Jeux
    • Gaming
  • RetourActu Gaming
    • News
    • Astuces
    • Tests
    • Previews
    • Toute l'actu gaming
  • RetourBons plans
    • Bons plans
    • Bons plans Smartphone
    • Bons plans Hardware
    • Bons plans Image et Son
    • Bons plans Amazon
    • Bons plans Cdiscount
    • Bons plans Decathlon
    • Bons plans Fnac
    • Tous les Bons plans
  • RetourJVTech
    • Actus High-Tech
    • Intelligence Artificielle
    • Smartphones
    • Mobilité urbaine
    • Hardware
    • Image et son
    • Tutoriels
    • Tests produits High-Tech
    • Guides d'achat High-Tech
    • JVTech
  • RetourCulture
    • Actus Culture
    • Culture
  • RetourVidéos
    • A la une
    • Gaming Live
    • Vidéos Tests
    • Vidéos Previews
    • Gameplay
    • Trailers
    • Chroniques
    • Replay Web TV
    • Toutes les vidéos
  • RetourForums
    • Hardware PC
    • PS5
    • Switch 2
    • Xbox Series
    • Switch
    • Pokemon pocket
    • FC 25 Ultimate Team
    • League of Legends
    • Tous les Forums
  • PC
  • PS5
  • Xbox Series
  • Switch 2
  • PS4
  • One
  • Switch
  • iOS
  • Android
  • MMO
  • RPG
  • FPS
En ce moment Genshin Impact Valhalla Breath of the wild Animal Crossing GTA 5 Red dead 2
Liste des sujets

W3C XHTML, problème avec target=""

SideshowBide
SideshowBide
Niveau 3
18 août 2008 à 16:29:37

Bonjour à tous. :)

Le validateur XHTML Strict me boude parce que j'ai mis un attribut target dans une balise <a> :snif:

Validation Output: 1 Error

1. Error Line 27, Column 89: there is no attribute "target".

…r.cr/?462311" target="_blank">email</a></td>

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.

Comment remédier à ceci ? :svp:

letmeguess
letmeguess
Niveau 5
18 août 2008 à 16:34:33

Tu dois surement avoir une version de Html "Strict" (écrit dans ton doctype). Pour le moment, seul le Html Transitionnal tolère ce genre d'attribut :ok:

deepblue
deepblue
Niveau 16
18 août 2008 à 16:44:41

Remplace ton target par : onclick="window.open(this.href); return false;"

Jujute62
Jujute62
Niveau 9
18 août 2008 à 20:17:39

Juste pour savoir : quelle est l'utilité de l'attribut target dans un lien ? :question:

letmeguess
letmeguess
Niveau 5
18 août 2008 à 20:45:43

C'est pour préciser dans quelle page le document pointé par ton lien va s'ouvrir: la fenêtre actuelle, une nouvelle fenêtre ou, plus utilisé encore tu peux y préciser dans quelle frame, si ton site est structuré en frames.

Jujute62
Jujute62
Niveau 9
18 août 2008 à 21:01:36

Ok, merci ! :ok:

SideshowBide
SideshowBide
Niveau 3
19 août 2008 à 09:18:26

Yay, niquel deepblue. :coeur:

Sous forums
  • Aide à l'achat Mac
  • Macintosh
  • Création de Jeux
  • Programmation
  • Création de sites web
  • Linux
  • Internet
  • Steam Deck
  • Hardware
La vidéo du moment