Jump to content

So the target attribute is invalid now...

Whether you're a seasoned veteran or a struggling beginner, Web Radiance is the web development and web design forum for you. You'll find answers to all your HTML, CSS, SEO, and Programming needs. Pull up a chair and stay awhile.

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • This topic is locked

So the target attribute is invalid now... Rate Topic: -----

#1 User is offline   temhawk 

  • W.R. Private First-Class
  • Group: Members
  • Posts: 322
  • Joined: 30-August 07
  • Gender:Male
  • Interests:travel, cg art, macs, music, skateboarding, programming, discovery channel, TextMate 2

Post icon  Posted 15 October 2007 - 12:28 PM

That's rather lame!

I completely understand the reasons why it can be bad, but HTML should expect the coder to be smart and make his/her site very user-friendly, not take precautions in case he/she wants to make every single link open in a new window!

There should at least be a CSS property for it!
It can be useful to be able to decide which links open in the same window, and which in a new window. Every browser nowadays has a hotkey for opening pages in tabs (which is the modern equivalent of windows) or in the same window. So completely putting this attribute and control away from the coder doesn't really make the site more user-friendly, since I would still have to hold down a hotkey if I wanted to open a link in a new tab or in the same window (which ever is not the default behavior of the browser; this can also be changed by the user in any acceptable browser nowadays!).

To be honest, I think the target attribute (or preferably CSS property) should be expanded to be able to choose from "blank" (new window), "self" (same window) and "tab" (new tab), instead of removing it!

The control of how links open on a site belongs to XHTML!


I mean I have already reluctantly accepted a lot of the changes in the HTML standards, but this is one of the very, very few things I can't watch fall without standing up for it! Posted Image

This post has been edited by temhawk: 15 October 2007 - 12:35 PM

0

#2 User is offline   marcamos 

  • W.R. General
  • Group: Administrators
  • Posts: 2,849
  • Joined: 04-April 06
  • Gender:Male
  • Location:Massachusetts - USA

Posted 15 October 2007 - 01:53 PM

You might be alone my friend, at least in these forums. We're all usability advocates, and controlling any aspect of my (or a visitor's) browser is off limits... and that of course goes for opening up new windows/tabs/etc.
0

#3 User is offline   temhawk 

  • W.R. Private First-Class
  • Group: Members
  • Posts: 322
  • Joined: 30-August 07
  • Gender:Male
  • Interests:travel, cg art, macs, music, skateboarding, programming, discovery channel, TextMate 2

Posted 15 October 2007 - 02:10 PM

Then what about JavaScript? Alert boxes, etc?

There are enough ways for one to take a small amount of control over your browser, no need to banish the target attribute.

Read my argument about hotkeys again, being able to make a default behavior of links on my site is not negative, if not user-friendly in some cases; a website should have the right to make a default link-behavior just like a browser can be set to have a certain link-behavior, which can always override the website's behavior anyways!

This post has been edited by temhawk: 15 October 2007 - 02:11 PM

0

#4 User is offline   Catalyst 

  • Codesmith
  • Group: Administrators
  • Posts: 1,049
  • Joined: 04-April 06
  • Gender:Male
  • Location:San Diego

Posted 15 October 2007 - 02:23 PM

I have to do what my clients tell me to, and often they want links to open in a new window. So, I use target. Does it validate 100%? No. Does that matter at all? No.

Aim for validation, but don't make it into a critical thing.
0

#5 User is offline   Karl Buckland 

  • A.K.A. Sirkent
  • Group: Administrators
  • Posts: 2,145
  • Joined: 04-April 06
  • Gender:Male
  • Location:Kent, UK

Posted 15 October 2007 - 02:34 PM

If validation is critical then yes, you can use javascript instead to override the link and make it open in a new window.

People in marketing want to be able to control where the user goes, what they do and how they do it. To them, the idea of losing the ability to force a link to open in a new window is extremely scary.
QUOTE(benbramz @ Aug 17 2007, 07:44 AM) Ive noticed that quite a few people are now adding quotes from the board into their signature. I think its started an new web-radiance craze.. :P
0

#6 User is offline   The Lion 

  • W.R. Private
  • Group: Members
  • Posts: 40
  • Joined: 04-January 08
  • Gender:Male
  • Location:Connecticut
  • Interests:Experimenting with font-end web design, making my lovely wife happy, and working toward owning a home and having kids.

Post icon  Posted 19 January 2008 - 02:00 PM

Yeah, sorry, friend. I had issues with 'target's' absence in XHTML myself. It's a big ball to swallow, one that 'take-em many gulps' [my best Native American impression].

Anyway, I have a question here. Is this what they mean by 'deprecated'? Or is this something else?

I'm thinking 'deprecated' means that it's now taken care of in the CSS markup and no longer in the source. Or, it means that it's just no longer in the source, and no longer an option at all, even in CSS.

Yeah? Neah?

This post has been edited by The Lion: 19 January 2008 - 02:01 PM

0

#7 User is offline   marcamos 

  • W.R. General
  • Group: Administrators
  • Posts: 2,849
  • Joined: 04-April 06
  • Gender:Male
  • Location:Massachusetts - USA

Posted 19 January 2008 - 06:59 PM

Here's my quick definition of deprecated and it's often misused sibling, depreciated:

http://twitter.com/m...tuses/584098232
0

#8 User is offline   graham08 

  • W.R. Private
  • Group: Members
  • Posts: 28
  • Joined: 12-February 08
  • Location:UK

Posted 18 February 2008 - 12:23 PM

I was quite suprised when I heard about this a week or two ago, but I suppose in hindsight it makes sense. The visitor of the website should decide where they want pages to be displayed, previously I liked it because you could keep internal links in the same window/tab. But if a link was external then you could make the visitor open a new tab or window so they will at least keep my website in their browser. So in theory it would stop them wandering off and focused on my website.

Now though its just easier to code and let the visitor do what they want...
0

#9 User is offline   temhawk 

  • W.R. Private First-Class
  • Group: Members
  • Posts: 322
  • Joined: 30-August 07
  • Gender:Male
  • Interests:travel, cg art, macs, music, skateboarding, programming, discovery channel, TextMate 2

Posted 18 February 2008 - 12:56 PM

Yep, I've gotten used to not targeting my links too!

I'd still be interested who had the crazy idea of target=_blank instead of just target="blank" the normal way. :P
0

#10 User is offline   Telos 

  • Eternal Being
  • Group: Members
  • Posts: 250
  • Joined: 08-May 07
  • Gender:Male
  • Location:Finland

Posted 19 February 2008 - 09:55 AM

I kinda agree that target shouldn't be deprecated. Most of the clients I've dealt with don't know how to control where links are opened so they want the site to do it. Now if I leave the target out, they start complaining about why doesn't this link open to a new window? So I'm still using the target if I do a website for a client and I'm not loosing any sleep from it.
I am a man without a website
0

#11 User is offline   haku 

  • 日本語 Ninja
  • Group: Members
  • Posts: 652
  • Joined: 21-September 07
  • Gender:Male
  • Location:Yokohama, Japan

Posted 19 February 2008 - 10:44 AM

I don't like the target tag. It annoys me when windows are opening all over the place.

But if you really want to do it, and want to keep valid code, Its gotta be doable with javascript. I've never tried opening a new tab with javascript, but Ive done windows, so I know it can be done.
<a href="http://www.jaypan.com" target="_blank">Jaypan</a>
<a href="http://www.dudes-japan.com" target="_blank">Dudes Japan</a>
0

#12 User is offline   marcamos 

  • W.R. General
  • Group: Administrators
  • Posts: 2,849
  • Joined: 04-April 06
  • Gender:Male
  • Location:Massachusetts - USA

Posted 19 February 2008 - 11:04 AM

I'll chalk it up to a simply analogy: Imagine you own a store in a local shopping mall, lets call it Man Clothing, Inc. A customer walks into your store, browses around, then decides they want to check out the products in a neighboring store, called Man Food, Inc.

They leave your store and enter the neighboring store.

While browsing around in the neighboring store, they look over their should and see that your store, Man Clothing, Inc. is actually following them, the entire frickin' store, and it's practically in their back pocket.

The customer is a bit pissed; if they wanted to return to your store for a further visit, they know how to do it and where to go. It's simply a matter of walking back to where your store was (basically, clicking the back button).

Don't mess with visitor/customer expectations, and never consider your site so damned important that it 'deserves' to remain visible when your visitor willingly decides to leave. If they want to visit your site/store again, they know how to use their back button. Anything else is nearly an insult.
0

#13 User is offline   graham08 

  • W.R. Private
  • Group: Members
  • Posts: 28
  • Joined: 12-February 08
  • Location:UK

Posted 19 February 2008 - 11:34 AM

Well i have to say I agree with that, I don't think opening new windows is going to help the visitor, in fact it will annoy them even more. As much as you want to keep them on your site - whether its in another tab or window, if your website is good enough then they will come back and use it again like herkalees said. So I guess this is goodbye 'target=' :P

This post has been edited by graham08: 19 February 2008 - 11:36 AM

0

#14 User is offline   Telos 

  • Eternal Being
  • Group: Members
  • Posts: 250
  • Joined: 08-May 07
  • Gender:Male
  • Location:Finland

Posted 20 February 2008 - 02:17 AM

You are looking this from the wrong perspective. It's not about what you like or what you think would be good practice. It's what the client wants and in my experience the client usually wants links to other websites open to a new window/tab.

Just recently I got a feedback from a visitor of my band's website. There was a link to another website and it didn't have a target. The visitor wrote a long e-mail to me saying that you have an error in your website, the link should open to a new window since it is going away from your site. I didn't agree with him but it's all about keeping "customer" happy.

You could just say no but that's just bad for business. Usually I've handled the situation by saying that it's not good practice to open them to a new window and explaining them why. If the client still wants it to open to a new window, I don't argue.
I am a man without a website
0

#15 User is offline   temhawk 

  • W.R. Private First-Class
  • Group: Members
  • Posts: 322
  • Joined: 30-August 07
  • Gender:Male
  • Interests:travel, cg art, macs, music, skateboarding, programming, discovery channel, TextMate 2

Posted 20 February 2008 - 04:25 AM

Personally, to put away with all these opposing opinions about this topic, I would have the target attribute be valid now and in the future. All browsers should simply have an override ability and the client should easily be able to choose the behavior of that. If the user doesn't care about adjusting his/her browser's settings, he/she is probably not going to be too concerned with how links open.
0

#16 User is offline   graham08 

  • W.R. Private
  • Group: Members
  • Posts: 28
  • Joined: 12-February 08
  • Location:UK

Posted 20 February 2008 - 05:36 AM

Well this is all a result of the web steadily growing up and onforming to new standards. I mean if a customer wants their website to do certain things, yeah I don't argue either but I do explain why things are done a certain way and the complications this can provide in the future. I do prefer that code and the web starts conforming to new standards as it will help provde a more user friendly and ultimately better web.
0

#17 User is offline   marcamos 

  • W.R. General
  • Group: Administrators
  • Posts: 2,849
  • Joined: 04-April 06
  • Gender:Male
  • Location:Massachusetts - USA

Posted 20 February 2008 - 08:17 AM

@Telos - I don't agree with you. You see, when you use a target attribute and set its value to _blank (or what ever it is that opens a new window), you're immediately leaving the visitor with 0 choices. When someone complains that they want their links to open in a new window, it's because they haven't taken the two seconds to learn how to do it themselves.

It's a feature that's built into every browser. In many Windows browsers, you simply hold the control key down while clicking a link. In OS X, the command key. The real problem is that so many people don't care to know this, and simply insist that the website do it for them.

Web browsers have these features and abilities built into them to provide their users with options, that way one website/browser combination can please people with varying opinions/needs.

The way it's supposed to work is that the markup never forces a new window to open, but those visitors who desire that simply learn how to invoke it on their own (Hold the control/command key while clicking).

On the other hand, if you change the markup to force new windows to open, you've removed options from your visitors.

The issue comes down to most people not knowing they can invoke a new window on their own, quite simply, and stubbornly insisting that we write code to do it for them, blindly ignoring the opinions/desires of all other visitors out there. Then, as a result, developers like you (and me in the old days) pour more fuel on the fire by saying, "OK, whatever you desire". Wouldn't it be more appropriate to educate the client? To tell them of the trouble they're causing to a wide range of their visitors? It's our duty to ensure our clients know all that they should know to make more informed decisions about their business and any media that represents it.

Imagine I visited my local auto mechanic and asked him to install a 100 gallon fuel tank on the front bumper of my car. "It will hold more fuel than the standard tank and it's easier for me to access," I say. Only an idiot would simply comply with my wishes without telling me how dangerous that is and refusing to do it.

I know that last example is a bit drastic, but it's nothing more than an over-exaggerated example of what you're suggesting.
0

#18 User is offline   haku 

  • 日本語 Ninja
  • Group: Members
  • Posts: 652
  • Joined: 21-September 07
  • Gender:Male
  • Location:Yokohama, Japan

Posted 20 February 2008 - 08:59 AM

Quote

All browsers should simply have an override ability and the client should easily be able to choose the behavior of that. If the user doesn't care about adjusting his/her browser's settings, he/she is probably not going to be too concerned with how links open.


The opposite is already true. The capability is there for the user to open links in new tabs or windows. People who don't do it probably (or at least usually) don't care. And those who do, do.
<a href="http://www.jaypan.com" target="_blank">Jaypan</a>
<a href="http://www.dudes-japan.com" target="_blank">Dudes Japan</a>
0

#19 User is offline   Telos 

  • Eternal Being
  • Group: Members
  • Posts: 250
  • Joined: 08-May 07
  • Gender:Male
  • Location:Finland

Posted 20 February 2008 - 03:38 PM

I understand your side too. In a perfect world that would propably work but in my experience the client want's to decide how things work, sometimes even how they look even if they don't have the know-how of how it should be done. It sucks but you just gotta live with it. Basicly I think you are right here but in practice you can't really act like that. At least I haven't been able to.
I am a man without a website
0

#20 User is offline   Beavis 

  • W.R. Corporal
  • Group: Members
  • Posts: 167
  • Joined: 24-March 08

Posted 24 March 2008 - 11:06 PM

View Postherkalees, on Feb 20 2008, 01:04 AM, said:

I'll chalk it up to a simply analogy: Imagine you own a store in a local shopping mall, lets call it Man Clothing, Inc. A customer walks into your store, browses around, then decides they want to check out the products in a neighboring store, called Man Food, Inc.

They leave your store and enter the neighboring store.

While browsing around in the neighboring store, they look over their should and see that your store, Man Clothing, Inc. is actually following them, the entire frickin' store, and it'ss practically in their back pocket.

The customer is a bit pissed; if they wanted to return to your store for a further visit, they know how to do it and where to go. It's simply a matter of walking back to where your store was (basically, clicking the back button).

Don't mess with visitor/customer expectations, and never consider your site so damned important that it 'deserves' to remain visible when your visitor willingly decides to leave. If they want to visit your site/store again, they know how to use their back button. Anything else is nearly an insult.


Extremely well said !
0

Share this topic:


  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users