Frage zu W3C Validation Service

grunet

Angesehenes Mitglied
Hallo zusammen

Ich hab mir mal die Mühe gemacht, mein Blog via W3C HTML komform zu machen. Von ca. 100 Fehler brachte ich es nun auf 1 Error runter. Folgender Error wird nun noch ausgegeben.

QUOTE 1. Error Line 164, Column 147: there is no attribute "target".

…" title="Erffnung VivaRiumch" target="_blank">Eröffnung Viva-Rium.ch</a></p><

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.



Sobald ich Doctype auf XHTML 1.0 Transitional anstelle XHTML 1.0 Strict setze erhalte ich zwar keinen Error, jedoch folgende Meldung:


QUOTE DOCTYPE Override in effect!
The detected DOCTYPE Declaration "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">" has been suppressed and the DOCTYPE for "XHTML 1.0 Transitional" inserted instead, but even if no errors are shown below the document will not be Valid until you update it to reflect this new DOCTYPE.


Was nun, wenn ich meinen Header auf XHTML 1.0 Transitional ändere? Was hat das für Auswirkungen?

Oder anderst gesagt, wie würde das Attribut target="_blank" bei "Strict" Doctype heissen?

Sorry, aber mir sagt das Doctype überhaupt nichts und ich werde auch durch die Suche bei der grossen Tante nicht wirklich schlau. Vieleicht kann das jemand kurz simpel erklären.

PS: Benutze Wordpress;-)

Danke und Gruss
Silvan
 
Bei XHTML 1.0 Strict gibt es für Links kein target mehr.

Wenn du also unbedingt ...target="_blank" nutzen willst musst du deinen Doctype auf XHTML 1.0 Transitional ändern.
 
Was hat das Umstellen sonst für Auswirkungen?

Und was gibt es sonst für eine Möglichkeit mit 'strict' einen Link in einem neuen Fenster / Tab zu öffnen?
 
Nur über JavaScript. Wobei es primär eine Frage der Usability ist: möchtest Du deine Besucher derart bevormunden, dass Du bei einem externen Link ein neues Fenster öffnest? Ein umstrittenes Thema in manchen Kreisen ...
 
Ich möchte niemanden bevormunden, aber ich bin es mir gewöhnt, das externe Links in einem neuen Fenster (bzw. heutzutage neuer Tab) geöffnet werden.

Was benutzt ihr den für externe Links? Oder was ist den nun der eigentliche Standard für externe Links?
 
Ich öffne neue Seiten auch in einem neuen Tab, dafür entscheide ich mich aber selbstständig durch Klick mit der mittleren Maustaste auf einen Link. Das können durchaus auch webseiteninterne Seiten sein, nicht nur externe Seiten. Das neue Fenster durch die Webseite vor mir erzwungen werden mag ich dennoch eher nicht.

Wie gesagt ein umstrittenes Thema ...
 
Zurück
Oben