The Tags: <base target=...> |
<base
|
... |
Before the frame extensions, the <base>
tag was useful for specifying the original location of a document, in case it was read out of context (i.e., a copy of the document that was saved somewhere else). Placed in the header of a document (i.e., between <head>
and </head>
), the <base>
tag made it possible for relative image references and relative hyperlinks to continue working even after the document was moved.
... |
target=
|
{ |
" frame_name"
|
... |
_self
|
||||
_parent
|
||||
_top
|
||||
_blank
|
Although the <base>
tag can still be used for this purpose, the frame extensions have added a new property, target
, which can be used to set the default destination frame (target) for all hyperlinks in the document. For example, the tag
<base target="sharky">
,
if placed in the header of a document, would cause all hyperlinks in the document to have a default target of "sharky". Of course, setting the default target only affects hyperlinks for which no target is explicitly declared, but this can be a great keystroke saver for documents whose links mostly target another frame, such as in a navigation bar.
If all the hyperlinks in your document have the same target, then it is better to specify the target with <base>
than to include an explicit target
property in each tag. In addition to using the names of actual frames in the <base>
tag, you can also use any of the reserved frame names. Refer to "The Tags: <a href=... target=...> </a>" for more information on these special target names.
-- End of Lesson 4 --
[ menu | previous page ]