/    Sign up×
Community /Pin to ProfileBookmark

For my page to be valid xhtml i’m not allowed to use target=”_blank” in my <a> tag.

<a href=”blah.php” title=”Blah” [COLOR=crimson][B]target=”_blank”>[/B][/COLOR] Blah</a>

What can I use instead that is xhtml valid?

Cheers!

to post a comment
HTML

6 Comments(s)

Copy linkTweet thisAlerts:
@Robert_WellockMay 13.2004 — Yes you are allowed to use target="_blank" in XHTML 1.0 I don't know where you got the strange idea you couldn't.

Unless of course you are using XHTML 1.1 in which case you should serve it as XML not text/html.
Copy linkTweet thisAlerts:
@GavinPearceauthorMay 13.2004 — From W3..

http://validator.w3.org/check?uri=http%3A%2F%2Fgavinpearce.co.uk%2Fportfolio.htm


--------------------

[I]Line 21, column 61: there is no attribute "target"[/I]

.../www.dec25.net" title="Dec25" target=[COLOR=crimson]"[/COLOR] _blank">www.dec25.net</a><br /><em>A ch...
Copy linkTweet thisAlerts:
@Robert_WellockMay 13.2004 — Because you used Strict DTD, why though?

Since you served it as 'text/html' instead of the recommended 'application/xhtml+xml'. You gain little benefit of using Strict unless you serve as 'application/xhtml+xml'. Don't feel obligated to answer my rhetorical question but there is no major benefit of Strict over Transitional when served as 'text/html' tag soup.
Copy linkTweet thisAlerts:
@GavinPearceauthorMay 13.2004 — What would be the benefit of serving it as 'application/xhtml+xml' over 'text/html'?

If I kept with strict, would I be forced into using JS to have the window open?
Copy linkTweet thisAlerts:
@Robert_WellockMay 13.2004 — Yes, you would be forced to use JavaScript if you chose Strict unless you added eXtensibility and re-wrote target back into the DTD.

As you are aware XHTML is XML and not HTML thus theoretically it is supposed to be served as XML to be used by XML-Processors which do not accept erroneous syntax, for example Mozilla Firefox.

Most of the benefits you won't realise because only Opera 7.2x and Mozilla 1.x can understand XHTML in it's native format - on the Windows Platform.

If you are into boring stuff: http://www.hixie.ch/advocacy/xhtml
×

Success!

Help @GavinPearce 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.22,
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,
)...