XHTML, <a> and target

S

SeeSchloss

Hi,

I'm trying to make a website valid XHTML, and the w3
validator finds only one error, in my links :

there is no attribute "target".
<a href="http://external-website.net" target="_blank">
^

It seems like "target" is not allowed in XHTML, but [how]
can I make a link open in a new tab ?
And why does it point the last letter of the link, if the
problem is the target attribute ?

Thanks :)
 
S

Steve Pugh

SeeSchloss said:
I'm trying to make a website valid XHTML, and the w3
validator finds only one error, in my links :

there is no attribute "target".
<a href="http://external-website.net" target="_blank">
^

It seems like "target" is not allowed in XHTML, but [how]
can I make a link open in a new tab ?

Right click on the link and select open in new tab from the context
menu.

In other words, let your visitors decide whether they want the link to
open in the same page, a new page, a new tab, etc.

Steve
 
S

SeeSchloss

"Steve Pugh" a utilisé son clavier pour écrire :
SeeSchloss said:
I'm trying to make a website valid XHTML, and the w3
validator finds only one error, in my links :

there is no attribute "target".
<a href="http://external-website.net" target="_blank">
^

It seems like "target" is not allowed in XHTML, but [how]
can I make a link open in a new tab ?

Right click on the link and select open in new tab from the
context menu.

In other words, let your visitors decide whether they want the
link to open in the same page, a new page, a new tab, etc.

I know, but since some people do not know how to do this,
I'd have prefered the default action to be "open in a new
window" for external links.

By the way, I wanted to say "in a new window" and not tab.
 
S

Steve Pugh

SeeSchloss said:
"Steve Pugh" a utilisé son clavier pour écrire :
SeeSchloss said:
I'm trying to make a website valid XHTML, and the w3
validator finds only one error, in my links :

there is no attribute "target".
<a href="http://external-website.net" target="_blank">
^

It seems like "target" is not allowed in XHTML, but [how]
can I make a link open in a new tab ?

Right click on the link and select open in new tab from the
context menu.

In other words, let your visitors decide whether they want the
link to open in the same page, a new page, a new tab, etc.

I know, but since some people do not know how to do this,
I'd have prefered the default action to be "open in a new
window" for external links.

Thus taking the element of choice away from all users.

You have three options if you insist on forcing your choices onto all
the visitors to your site:
1. Use a Transitional DTD and target.
2. Use JavaScript.
3. Stop worrying about validation.

Steve
 
S

SeeSchloss

"Steve Pugh" a formulé la demande :
SeeSchloss said:
"Steve Pugh" a utilisé son clavier pour écrire :
I'm trying to make a website valid XHTML, and the w3
validator finds only one error, in my links :

there is no attribute "target".
<a href="http://external-website.net" target="_blank">
^

It seems like "target" is not allowed in XHTML, but [how]
can I make a link open in a new tab ?

Right click on the link and select open in new tab from the
context menu.

In other words, let your visitors decide whether they want the
link to open in the same page, a new page, a new tab, etc.

I know, but since some people do not know how to do this,
I'd have prefered the default action to be "open in a new
window" for external links.

Thus taking the element of choice away from all users.

You have three options if you insist on forcing your choices onto
all the visitors to your site:
1. Use a Transitional DTD and target.
2. Use JavaScript.
3. Stop worrying about validation.

I don't want to force them, just make open in new window
the default action.

Oooh... but there is no mean to open it in the same window
then... ok ok, I hadn't realised that. I'll just drop the
target attribute, then.

Thanks.
 
K

Kris

In other words, let your visitors decide whether they want the
link to open in the same page, a new page, a new tab, etc.

I know, but since some people do not know how to do this,
I'd have prefered the default action to be "open in a new
window" for external links.[/QUOTE]

I have recently started doing something many big fellows already did a
long time, but for different reasons; external links are flagged as
such, by a small icon following the link. Visitor knows what the link is
about, so can make an informed decision to follow it in a new window or
not.

I claim that the reason for the trend of automatically opening external
links in a new window is because the visitor would be confused when
presented a different website after following the link. Focus on taking
away that confusion.
 
D

DU

SeeSchloss said:
Hi,

I'm trying to make a website valid XHTML, and the w3 validator finds
only one error, in my links :

there is no attribute "target".
<a href="http://external-website.net" target="_blank">
^

It seems like "target" is not allowed in XHTML,

it is allowed in transitional DTD.

but [how] can I make a
link open in a new tab ?

In a new tab? Not possible. Only the user can do that via right-click
menu or user pref setting.
And why does it point the last letter of the link, if the problem is the
target attribute ?

I think it tries to identify the spot before the error. I think it is a
good system. It certainly works a lot better than MS javscript debugger.

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunclear/Netscape7/Netscape7Section.html
 
S

SeeSchloss

"DU" a écrit :
it is allowed in transitional DTD.

But I won't use transitional for a new website, and
certainly not just because of one target attribute, I'll
just remove it.
but [how] can I make a
link open in a new tab ?

In a new tab? Not possible. Only the user can do that via
right-click menu or user pref setting.

I know I know, <cite>I wanted to say "in a new window" and
not tab</cite>.
 
E

EightNineThree

SeeSchloss said:
Hi,

I'm trying to make a website valid XHTML, and the w3
validator finds only one error, in my links :

there is no attribute "target".
<a href="http://external-website.net" target="_blank">
^

It seems like "target" is not allowed in XHTML, but [how]
can I make a link open in a new tab ?

If the user wants a new window (or tab) they'll choose it themselves.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top