[ Pobierz całość w formacie PDF ]
Attributes defined elsewhere
id, class (document-wide identifiers [p.71] )
title (element title [p.63] )
style (inline style information [p.186] )
The FRAME element defines the contents and appearance of a single frame.
Setting the initial contents of a frame
The src attribute specifies the initial document the frame will contain.
The following example HTML document:
24 Dec 1999 18:26 210
Frames in HTML documents
"http://www.w3.org/TR/html4/frameset.dtd">
A frameset document
should create a frame layout something like this:
------------------------------------------
|Frame 1 |Frame 3 |Frame 4 |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
-------------| | |
|Frame 2 | | |
| | | |
| | | |
------------------------------------------
and cause the user agent to load each file into a separate view.
The contents of a frame must not be in the same document as the frame s
definition.
ILLEGAL EXAMPLE:
The following frameset definition is not legal HTML since the contents of the second
frame are in the same document as the frameset.
"http://www.w3.org/TR/html4/frameset.dtd">
A frameset document
...some text...
Important section
211 24 Dec 1999 18:26
Frames in HTML documents
...some text...
Visual rendering of a frame
The following example illustrates the usage of the decorative FRAME attributes. We
specify that frame 1 will allow no scroll bars. Frame 2 will leave white space around
its contents (initially, an image file) and the frame will not be resizeable. No border
will be drawn between frames 3 and 4. Borders will be drawn (by default) between
frames 1, 2, and 3.
"http://www.w3.org/TR/html4/frameset.dtd">
A frameset document
marginwidth="10" marginheight="15"
noresize>
16.3 Specifying target frame information
Note. For information about current practice in determining the target of a frame,
please consult the notes on frames [p.350] in the appendix.
Attribute definitions
target = frame-target [p.57] [CI] [p.49]
This attribute specifies the name of a frame where a document is to be opened.
By assigning a name to a frame via the name attribute, authors can refer to it as the
"target" of links defined by other elements. The target attribute may be set for
elements that create links (A, LINK), image maps (AREA), and forms (FORM).
Please consult the section on target frame names [p.57] for information about
recognized frame names.
This example illustrates how targets allow the dynamic modification of a frame s
contents. First we define a frameset in the document frameset.html, shown here:
24 Dec 1999 18:26 212
Frames in HTML documents
"http://www.w3.org/TR/html4/frameset.dtd">
A frameset document
Then, in init_dynamic.html, we link to the frame named "dynamic".
"http://www.w3.org/TR/html4/loose.dtd">
A document with anchors with specific targets
...beginning of the document...
Now you may advance to
slide 2.
...more document...
You re doing great. Now on to
slide 3.
Activating either link opens a new document in the frame named "dynamic" while
the other frame, "fixed", maintains its initial contents.
Note. A frameset definition never changes, but the contents of one of its frames
can. Once the initial contents of a frame change, the frameset definition no longer
reflects the current state of its frames.
There is currently no way to encode the entire state of a frameset in a URI.
Therefore, many user agents do not allow users to assign a bookmark to a frameset.
Framesets may make navigation forward and backward through your user agent s
history more difficult for users.
16.3.1 Setting the default target for links
When many links in the same document designate the same target, it is possible to
specify the target once and dispense with the target attribute of each element.
This is done by setting the target attribute of the BASE element.
We return to the previous example, this time factoring the target information by
defining it in the BASE element and removing it from the A elements.
"http://www.w3.org/TR/html4/loose.dtd">
213 24 Dec 1999 18:26
Frames in HTML documents
A document with BASE with a specific target
...beginning of the document...
Now you may advance to slide 2.
...more document...
You re doing great. Now on to
slide 3.
16.3.2 Target semantics
User agents should determine the target frame in which to load a linked resource
according to the following precedences (highest priority to lowest):
1. If an element has its target attribute set to a known frame, when the element
[ Pobierz całość w formacie PDF ]