Book Sale! Code WP2025 takes 20% OFF our Pro Plugins & Books »
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 = Fullstack Developer. Book Author. Teacher. Human Being.
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 »
GA Pro: Add Google Analytics to WordPress like a pro.
Thoughts
Launching my new plugin, Head Meta Pro 🚀 Complete meta tags for WordPress.
Migrating sites to a new server, so far so good. Please report any bugs, thank you.
Arc browser looked good but lost me at “account required”. No browsers do that.
Finishing up the pro version of Head Meta Data plugin, launch planned this month.
Finally finished my ultimate block list to stop AI bots :) Blocks over 400+ AI bots!
After 10 years working late at night, my schedule has changed. I am now a “morning person”, starting my day at 6am or earlier.
Nice update for Wutsearch search engine launchpad. Now with 19 engines including Luxxle AI-powered search.
Newsletter
Get news, updates, deals & tips via email.
Email kept private. Easy unsubscribe anytime.