Spring Sale! Save 30% on all books w/ code: PLANET24
Web Dev + WordPress + Security

The Friendliest Link Targets in the Neighborhood

[ Image: Fred Rogers with Shoe ] The target attribute for anchor elements (<a>) specifies the location in which the referenced document should load. For example, to open a link in a new window, we would use a target value of _blank. Although this is a commonly employed technique, the target attribute has been deprecated by the W3C and is not valid (X)HTML. Regardless, the target element remains a useful tool for practicing designers and developers. Here, we present the attribute values for the target element:

Attribute values for the target element

_blank
[ Syntax: target="_blank" ]
— instructs the user-agent to load the target document in a new window.
_replace
[ Syntax: target="_replace" ]
— instructs the user-agent to load the target document in a new window.
_self
[ Syntax: target="_self" ]
— instructs the user-agent to load the target document in the current frame or window.
null value
[ Syntax: target="" ]
— instructs the user-agent to load the target document in the current frame or window.
(no target specified)
[ Syntax: (no target specified) ]
— instructs the user-agent to load the target document in the current frame or window.
_parent
[ Syntax: target="_parent" ]
— instructs the user-agent to load the target document as the parental, or topmost, frameset or window.
_top
[ Syntax: target="_top" ]
— instructs the user-agent to load the target document in the topmost window or frameset.
custom
[ Syntax: target="custom" ]
— instructs the user-agent to load the target document in the frame identified as "custom" (i.e., id="custom").

R.I.P. Mr. Rogers
So long, neighbor.

About the Author
Jeff Starr = Designer. Developer. Producer. Writer. Editor. Etc.
Wizard’s SQL for WordPress: Over 300+ recipes! Check the Demo »
Welcome
Perishable Press is operated by Jeff Starr, a professional web developer and book author with two decades of experience. Here you will find posts about web development, WordPress, security, and more »
Digging Into WordPress: Take your WordPress skills to the next level.
Thoughts
I live right next door to the absolute loudest car in town. And the owner loves to drive it.
8G Firewall now out of beta testing, ready for use on production sites.
It's all about that ad revenue baby.
Note to self: encrypting 500 GB of data on my iMac takes around 8 hours.
Getting back into things after a bit of a break. Currently 7° F outside. Chillz.
2024 is going to make 2020 look like a vacation. Prepare accordingly.
First snow of the year :)
Newsletter
Get news, updates, deals & tips via email.
Email kept private. Easy unsubscribe anytime.