"target" attribute of <a> in XHTML?

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
User avatar
Albright
Forum Newbie
Posts: 20
Joined: Sat Sep 13, 2003 8:03 pm
Contact:

"target" attribute of <a> in XHTML?

Post 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?
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

User avatar
Albright
Forum Newbie
Posts: 20
Joined: Sat Sep 13, 2003 8:03 pm
Contact:

Post 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.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post 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
Post Reply