views:

299

answers:

3

and It's validated in XHTML 1.1 and WCAG 2.0 Guidelines doesn't have any info about it's use?

I know it's not valid in XHTML 1.0 strict but if many people using other ways like JavaScript, jquery, rel attribute, PHP etc.

Does it make sense? it means people don't want to follow validation rules. they just want to pass the validation.

+1  A: 

Except for 4 special target names, the target attribute is used primarily for frames. Since XHTML 1.0 has no support for frames, it makes sense that it doesn't include an attribute designed to operate on them.

Its sad that this also means losing the "open in a new window" effect, but that's how it is

Alex Brault
Please note that I am no expert in XHTML design nor a member of any Working Group. This is mostly speculation from 2 separate facts (no frames in XHTML 1.0 and target being used for frames)
Alex Brault
It's not sad at all. :-)
molf
Granted. The less popups there are around, the better I sleep at night
Alex Brault
+5  A: 

It's mainly to do with separating content from behaviour. The basic premise is that we should use HTML/XHTML to denote content, CSS for presentation and layout, and JavaScript for interactivity.

The target attribute doesn't fit in with this paradigm (it's a bit of HTML content that affects browser behaviour), which is why its use is frowned upon.

Mark B
+3  A: 

Why are you trying to force the link to open in a new window in the first place? If the user want to view it in a new window or tab, they should be the one to decide. It's harmful for usability; for example, it stops the back button from functioning correctly, and takes some control out of the users hands. Check out this article for more.

Designers open new browser windows on the theory that it keeps users on their site. But even disregarding the user-hostile message implied in taking over the user's machine, the strategy is self-defeating since it disables the Back button which is the normal way users return to previous sites. Users often don't notice that a new window has opened, especially if they are using a small monitor where the windows are maximized to fill up the screen. So a user who tries to return to the origin will be confused by a grayed out Back button.

link

Firas Assaad
@Firas - Thanks for article , but i never got any complaint about this usability issue from client and client's site users. and my client complaint on that if i do not put target=blank on external link.
metal-gear-solid