/    Sign up×
Community /Pin to ProfileBookmark

Alternative for "target="_blank" in xhtml 1.0 Strict

“target” attribute is deprecated in xhtml 1.0 strict. So what attribute should i use? Or css property?

Thank you in advance.

to post a comment
HTML

5 Comments(s)

Copy linkTweet thisAlerts:
@KorNov 26.2010 — Only javascript
<i>
</i>&lt;a href="somepage.html" onclick="window.open('somepage.html','new','');return false"&gt;
Copy linkTweet thisAlerts:
@h2g-vakaauthorNov 27.2010 — Thank you. It works fine. Cheers! ?
Copy linkTweet thisAlerts:
@h2g-vakaauthorNov 27.2010 — This is strange. W3C validator warned me just about one link in wich i have used "target:_blank". And i have used it on few links more. Then i used javasript on this one link and W3C validator successfully validate my code.

Bug in validator or what?
Copy linkTweet thisAlerts:
@CharlesNov 27.2010 — Bug in validator or what?[/QUOTE]Not a bug at all. The "target" attribute is only valid with transitional and frameset DTDs. And we're not supposed to be using the transitional DTDs anymore so unless you are using frames it's long past time to switch to the JavaScript method.
Copy linkTweet thisAlerts:
@h2g-vakaauthorNov 27.2010 — Yes, but i'm using strict doctype. And validator warned me just for one "target" and i have few. What ever i switched to javascript.
×

Success!

Help @h2g-vaka spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...