Page 1 of 1

"target" attribute of <a> in XHTML?

Posted: Mon Jan 19, 2004 8:36 am
by Albright
I've got some XHTML code that nearly validates; the only thing that trips it up is the "target" attribute of <a>. (I'm not using frames, but I'm using some target="_blank" attributes to have off-site links open in new windows.) Sure enough, "target" isn't part of the XHTML 1.0 DTD... Is there anything that provides the same functionality, but will validate as XHTML?

Posted: Mon Jan 19, 2004 8:43 am
by twigletmac

Posted: Mon Jan 19, 2004 8:52 am
by Albright
Thanks. But, uck... JavaScript is not an ideal solution in my opinion... If that's the only alternative, I might just cheat and keep "target" in there.

Posted: Mon Jan 19, 2004 9:03 am
by twigletmac
Basically, client-side is supposed to be the only solution.

If you want to use target but still have your pages validate, use the transitional doctype, not strict ;).

Mac