[Web4lib] target link attribute

Sutherland, Michael msutherland at montana.edu
Wed Mar 19 11:58:29 EDT 2008


Rachel, 

In HTML to launch another web page from a link in a new window or tab
effect is normally done through the use of target attributes. In this
case the link anchor is <a href="URL" target="_blank">link</a>.  W3C
standards reserve only four names for the target attribute "_blank",
"_parent", "_self", and "_top".  From a usability standpoint, you should
remove the "_blank" target attribute and allow users to decide whether
they want a new window or not and have breadcrumbs on your pages that
will take them back to the original page if they do not open new windows
or tabs. 

If you still want the first page to open a new window or tab, thus still
having a 'parent' window, and then have the links only open in the
'child' window, you could have the <a href="URL"
target="_blank">link</a> in the first window and then remove the target
attribute from all links in the following pages. 

Some developers also use "_new" instead of "_blank" as the value for the
target attribute to open a link in a new window, although W3C standards
do not define that as a target name, thus browsers may ignore it or
treat it as a synonym for "_blank".  Browser settings can override all
of this, however.  

Another option is to use CSS for links
(http://www.w3.org/TR/2004/WD-css3-hyperlinks-20040224/#the-target-new).

Although these documents are online, this is a draft, which means it is
subject to change, and also unclear if they will, or already are,
implemented by some browsers.  The only way to find out for sure is to
test, but I am sure it's not supported enough to rely on. 

Best, 
Michael

------------------------------------- 
Michael Sutherland 
Web Services Librarian 
Montana State University Libraries 
P.O. Box 173320 
Bozeman, MT, USA 59717-3320 
Ph: (406) 994-6429 
msutherland at montana.edu 


-----Original Message-----
From: web4lib-bounces at webjunction.org
[mailto:web4lib-bounces at webjunction.org] On Behalf Of Rachel Davis
Sent: Wednesday, March 19, 2008 8:35 AM
To: web4lib at webjunction.org
Subject: [Web4lib] target link attribute

I have links to item records in our OPAC in various book lists on our
new
website.  I have the links set to open in a blank page, but I would
prefer
that each link doesn't open a whole new blank page--I want to avoid a
user
having window upon window (or tab after tab) open if they are clicking
on
mutiple links.  I've been to sites where a link opens in a new window,
but
each subsequent link clicked on in the parent page opens in that new
window, so basically your parent page remains open, but there is one
window on top (or tab beside it) that reloads with each link clicked on
in
the parent page.  Can anyone tell me how to accomplish this?  


Thanks!  


Rachel

Rachel Q. Davis
Children's Librarian
Thomas Memorial Library
6 Scott Dyer Road
Cape Elizabeth, ME  04107
207-799-1720


_______________________________________________
Web4lib mailing list
Web4lib at webjunction.org
http://lists.webjunction.org/web4lib/



More information about the Web4lib mailing list