|
|
|
To access the contents, click the chapter and section titles.
HTML 4.0 Sourcebook
(Publisher: John Wiley & Sons, Inc.)
Author(s): Ian S. Graham
ISBN: 0471257249
Publication Date: 04/01/98
- TARGET=string (optional) This attribute is part of the Netscape frames technology that supports multiple browser windows and multiple frames within a given browser windoweach frame with its own name. In this event, the TARGET attribute lets a document author direct data to be returned, upon selecting a hypertext link, to one of these named windows. If a window of the given name does not exist, the browser will create it. For example:
<A HREF="/path/file.html" TARGET="win-2">anchor text</A>
- indicates that the retrieved document, upon accessing the anchor, should be directed to the window named win-2. If a window or window frame with this name does not yet exist, the browser will clone a new copy of the browser, assign the name win-2 to this new window, and direct the returned data to it.
- In the absence of a TARGET, a document is retrieved to the window from which the link was accessed, as per standard practice.
- TARGETs are most often named frames or panes within a given browser window. These are created by the FRAMESET and FRAME elements, which permit multiple, independent document viewing panes within the same browser window. If a frame is declared via <FRAME SRC="url" NAME="frame1">, then an anchor of the form:
<A HREF="/path/file.html" TARGET="frame1">anchor text</A>
- will direct the returned document to the designated FRAME. FRAMEs are discussed in Chapter 7.
- Several target names are predefined, with specific meanings. These names (all beginning with the underscore character) and the associated meanings are defined in Table 6.10.
- TITLE=string (optional; Internet Explorer 4 only) Gives a title for the linked resourcevalid only if HREF is present. This can be used by a browser to preview the title before retrieving a documentbut note that you cannot guarantee that the TITLE is correct until you actually access the resource. Alternatively, TITLE can provide a title for a document that would otherwise not have a title, such as a plain text file, an image file, or a directory. Internet Explorer will display the content of the TITLE as a tool-tip pop-up when the mouse rests on top of the anchored text.
|
Table 6.10 Predefined Target Names and Their Meanings
|
|
TARGET Value
| Meaning
|
_blank
| Load the referenced data into a new, unnamed window.
|
_self
| Load the referenced data in place of the current document.
|
_parent
| Load the referenced data into the window containing (or that contained) the parent of the current document (the document from which the current document was accessed). If there is no parent document, default to TARGET=_self.
|
_top
| Load the referenced data into the window containing (or that contained) the top document (the document obtained by iteratively searching through successive parent documents until arriving at the initial, starting document). If there is no top document, default to TARGET=_self.
|
|
NOTE: All other names beginning with an underscore (_) are ignored by the browser.
- TYPE=mime-type (optional; not currently supported) Gives a MIME content-type of the resource referenced by the HREF attribute.
Phrase-Level Markup
Phrase-level markup elements specify special properties for a phrase or a string of characterssuch elements do not cause line breaks or otherwise affect block layout of the text. HTML supports two types of phrase-level markup: logical (also called information-type formatting or idiomatic phrase markup) and physical (also called character or typographic formatting). Logical markup is more in keeping with the markup language model and marks blocks of text as pieces of typed computer code, variables, or as something to be emphasized. The rendering details are then left to the browser, although hints as to appropriate renderings are part of the HTML specifications. You are strongly encouraged to use logical elements rather than physical ones, whenever possible.
Physical markup requests a specific physical format, such as boldface or italics. This, of course, gives no clue to the underlying meaning behind the marked-up phrase. Thus, if a browser is unable to implement the indicated markup (e.g., if it is a dumb terminal that cannot do italics), it cannot easily determine an alternative highlighting style.
|
Table 6.11 Logical Highlighting Elements and Recommended Formatting
|
|
Element
| Meaning
| Recommended Formatting
|
ABBR
| abbreviation
| no recommended formatting
|
ACRONYM
| acronym
| no recommended formatting
|
BDO
| bi-directional override
| lay out the flow of text as specified by the of text DIR attribute value
|
CITE
| citation
| italics
|
CODE
| example of typed code
| fixed-width font
|
DFN
| definition
| italics
|
EM
| emphasized text
| italics
|
KBD
| keyboard input; for example, in a manual
| fixed-width
|
Q
| short quotation
| surround text with appropriate punctuation
|
SAMP
| sequence of literal
| fixed-width characters
|
STRONG
| strong emphasis
| boldface
|
VAR
| variable name
| italics
|
|
Logical styles may not be rendered in distinct ways (i.e., different logical styles may be rendered in the same way). Also, some browsers do not support all physical styles. For example, lynx does not support italics and renders it as underlined.
The different logical formatting elements are summarized in Table 6.11 and the physical formatting elements in Table 6.12. Figures 6.47 through 6.50 illustrate their use.
Content Model for Phrase-Level Elements
The content model for all the character highlighting elements is largely the same, so to avoid needless repetition, it is given once here. In the following content model, NAME is one of ABBR, B, BIG, BDO, CITE, CODE, DFN, EM, FONT, I, KBD, Q, S, SAMP, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TT, U, or VAR.
Usage:
| <NAME> ... </NAME>
|
Can Contain:
| characters, character highlighting, A, APPLET, BASEFONT, BR, BUTTON, IFRAME, IMG, INPUT, LABEL, MAP, OBJECT, SCRIPT, SELECT, TEXTAREA
|
|