Reserved Target Names
There are four standard target names for special redirection actions. Note that all of them begin with the underscore ( _
) character. Do not give your frames names beginning with an underscore, as they will be ignored by the browser (names must start with a letter). The four reserved target names
are:
-
_blank
A link with
target="_blank"
opens a new, unnamed browser window to display the linked document. Each time a link that targets_blank
is opened, it launches a new window, potentially leaving the user with a mess of open windows. Note that this value can be used with any link, not just those in a frames context.Tip
Opening pages in new windows is problematic for accessibility. When opening a document in a new window, be sure to include a note that says “link opens in a new window” or something similar. This gives all users, but particularly those with non-visual browsers who won’t see a new window open, a heads-up that the context of the page is going to change.
-
_self
This is the default target for all
a
elements; it loads the linked document into the same frame or window as the source document. Because it is the default, it is not necessary to use it with individuala
elements, but it may be useful for thebase
element.-
_parent
A linked document with
target="_parent"
loads into the parent frame (one step up in the frame hierarchy). If the link is already at the top-level frame or window, it is equivalent to_self
. Figure 14-7 demonstrates the effects of ...
Get Web Design in a Nutshell, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.