Save up to 25% on pro security plugins w/ our Security Bundle »
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.

Jeff Starr
About the Author
Jeff Starr = Creative thinker. Passionate about free and open Web.
Blackhole Pro: Trap bad bots in a virtual black hole.
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 »
.htaccess made easy: Improve site performance and security.
Thoughts
Fall season almost here :)
My greatest skill on social media is the ability to simply ignore 98% and keep scrolling without interacting.
Enjoying this summer, getting some great positive energy. Refreshing and inspiring.
☀️ Pro plugin giveaway! Enter to win 1 of 4 lifetime licenses for our WordPress security plugins, including 10-site Security Bundle!
There is no end to what humans can achieve when they work together.
Excellent (and free) tool to test your site's SSL configuration.
Plugin updates! All of our free and pro plugins ready for WordPress 6.2.
Newsletter
Get news, updates, deals & tips via email.
Email kept private. Easy unsubscribe anytime.