<Frame> the tag defines a specific window (frame) in the frameset ).
You can set different attributes for each framework in frameset, such as border, scrolling, and noresize.
Instance
Simple three-frame page:
<Html>
<Frameset cols = "25%, 50%, 25%">
<Frame src = "frame_a.htm"/>
<Frame src = "frame_ B .htm"/>
<Frame src = "frame_c.htm"/>
</Frameset>
</Html>
TIY
Differences between HTML and XHTML
In HTML, the <frame> tag does not have an ending tag.
In XHTML, the <frame> label must be properly disabled.
Tips and notes:
Note: If you want to verify the page containing the framework, make sure that doctype is set to "Frameset DTD ". Read more about DOCTYPE.
Important: you cannot use the <body> </body> label with the <frameset> </frameset> label. However, if you want to add a <noframes> label to a browser that does not support the framework, place the label in the <body> </body> label!
Attribute |
Value |
Description |
DTD |
Frameborder |
|
Specifies whether to display the border around the frame. |
F |
Longdesc |
URL |
Specifies a page that contains a long description of the framework. |
F |
Marginheight |
Pixels |
Defines the margin between the top and bottom of the framework. |
F |
Marginwidth |
Pixels |
Defines the margins on the left and right of the frame. |
F |
Name |
Name |
Specifies the name of the framework. |
F |
Noresize |
Noresize |
The size of the framework cannot be adjusted. |
F |
Scrolling |
|
Specifies whether to display the scroll bar in the frame. |
F |
Src |
URL |
Specifies the URL of the document displayed in the framework. |
F |
Standard attributes
Id, class, title, style
For a complete description, see standard attributes.
TIY instance
Vertical Frame
This example shows how to create a vertical frame using three different documents.
Horizontal framework
This example shows how to use three different documents to create a horizontal framework.
How to Use the <noframes> label
This example shows how to use the <noframes> label.
Hybrid Framework Structure
This example shows how to create a framework structure containing three documents and place them in rows and columns.
Framework Structure with the noresize = "noresize" attribute
This example demonstrates the noresize attribute. In this example, the frame size cannot be adjusted. Drag the mouse over the border between frames and you will find that the border cannot be moved.
Navigation framework
This example shows how to create a navigation framework. The navigation frame contains a list of links that use the second frame as the target. The file named "contents.htm" contains three links.
Inline framework
This example shows how to create an inline framework (Framework on an HTML page ).
Jump to a specified section in the framework
This example demonstrates two frameworks. One framework sets the link to the specified section in another file. The specified section in the "link.htm" file is identified by <a name = "C10">.
Use the framework navigation to jump to the specified section
Benli demonstrates two frameworks. The left-side navigation frame contains a list of links that use the second frame as the target. The second frame shows the linked document. The link in the navigation framework points to the specified section in the target file.