Kom ihåg mig?
Home Menu

Menu


XHTML 1.0 Strict och target-attributet

 
Ämnesverktyg Visningsalternativ
Oläst 2006-06-18, 07:35 #1
Seattlegrunges avatar
Seattlegrunge Seattlegrunge är inte uppkopplad
Mycket flitig postare
 
Reg.datum: Nov 2003
Inlägg: 979
Seattlegrunge Seattlegrunge är inte uppkopplad
Mycket flitig postare
Seattlegrunges avatar
 
Reg.datum: Nov 2003
Inlägg: 979
Validerade en sida som har doctypen XHTML 1.0 Strict i W3C:s Markup Validation Service.

Validatorn kastar ut ett error på att jag har attributet target="_blank" i en a-tag!

Följande meddelande får jag:
Kod:
Error Line 25 column 102: there is no attribute "target".

...titletaggens innehåll" target="_blank"><img src="images/bildnamn.gif...

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.
Får man inte använda target-attributet? Får man inte lov att öppna nya fönster i strict-mode?!?! Verkar galet

Jag har två länkar på sidan med target="_blank" och den klagar bara på den ena, den första. Skumt!
Seattlegrunge är inte uppkopplad   Svara med citatSvara med citat
Svara


Aktiva användare som för närvarande tittar på det här ämnet: 1 (0 medlemmar och 1 gäster)
 

Regler för att posta
Du får inte posta nya ämnen
Du får inte posta svar
Du får inte posta bifogade filer
Du får inte redigera dina inlägg

BB-kod är
Smilies är
[IMG]-kod är
HTML-kod är av

Forumhopp


Alla tider är GMT +2. Klockan är nu 01:19.

Programvara från: vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Svensk översättning av: Anders Pettersson
 
Copyright © 2017