Frame and frameset in HTML

Source: Internet
Author: User
The so-called framework is to divide a webpage into several frames and obtain multiple URLs at the same time. You only need to <frameset> <frame>. All the frame tags must be placed in a total HTML file. This file only records how the framework is split and does not display any information, therefore, you do not need to add the <body> flag. to browse this framework, you must read files that are not in other frame windows. <Frameset> is used to divide window frames. Each window frame is marked by a <frame> MARK. <frame> must be used in the <frameset> range. For example:

<Frameset Cols = "50%, *"> <frame name = "hello" src = "up2u.html"> <frame name = "hi" src = "me2.html">
</Frameset>

In this example, <frameset> splits the image into the left and right sides, displays up2u.html on the left, and displays the me2.html file on the right, <frame> the marked frame window is always in the order of top-down, left-to-right
 

<Frame>
Usage: defines a frame.
Start/end ID: required/invalid
Attribute: Name = "..." defines the frame name.
Scr = "..." defines the source of the content displayed in the frame
Frameborder = "..." defines the boundary between frames (0 or 1)
Margwidth = "..." sets the frame boundary and the spacing between the content.
Margheight = "..." sets the spacing between the frame boundary and the content.
Noresize = "..." makes the frame size unchangeable
Scrolling = "..." sets the way the scroll bar is represented (Auto, yes, no)
Null: Not Allowed
 
<Frameset>... </frameset>
Usage: defines the frame layout in a window.
Start/end ID: required/required
Property: rows = "..." sets the number of rows.
Cols = "..." set the number of Columns
Onload = "..." Internal event triggers when a document is loaded
OnUnload = "..." Internal event trigger when document is uninstalled
Null: Not Allowed
Note: frameset can be nested.
 
The above is just the simplest framework setting. If you want to achieve more suitable results, add or modify the following parameters.
Tag: <frameset>
Example: <frameset rows = "90, *" frameborder = "0" border = 0 framespacing = "2" border = "2" bordercolor = "#008000"> </frameset>
Function: declare the HTML file as the frame mode and set how to split the windows.

Parameters:

Cols = "90 ,*"
Vertical Cut screen (such as divided between the left and right pictures), accept the integer, percentage, * indicates that the remaining space is occupied. The number of values indicates the number of windows to be divided by commas. For example, cols = "30, *, 50%" can be divided into three windows. The first window is the width of 30 pixels, which is an absolute split, the second window is the space left after the first and third windows are allocated, and the third window occupies 50% of the width of the entire window. You can adjust the number by yourself.
 

Rows = "120 ,*"
This is horizontal cutting. The picture is separated up and down, and the value is set to the same as above. The Cols and rows parameters should not be placed in the same <frameset> flag. Because netacape occasionally cannot display this type of framework, try to use multiple splits, as shown in the preceding examples.
 

Frameborder = "0"
Set the frame border. The value is only 0 and 1. 0 indicates no border, and 1 indicates that the border is to be displayed.
 

Border = "0"
Set the Border thickness of the frame, in pixels.
 

Bordercolor = "#008000"
Set the border color of the frame. For color values, see [color theory ].
 

Framespacing = "5"
The gap between the framework and the framework.
Tag: <frame>
Example: <frame name = "TOP" src = "a.html" marginwidth = "5" marginheight = "5" scrolling = "Auto" frameborder = "0" noresize framespacing = "6" bordercolor = "# 0000ff">
Function: sets the parameter attributes in each window.
Parameters:

Src = "a.html"
Set the name of the webpage file to be displayed in this box. Each box must correspond to a webpage file.
 

Name = "TOP"
Set the name of the window to specify the framework for linking.
 

Frameborder = 0
Set the frame border. The value is only 0 and 1. 0 indicates no border, and 1 indicates border.
 

Framespacing = "6"
The gap between the framework and the framework.
 

Bordercolor = "#008000"
Set the border color of the frame.
 

Scrolling = "Auto"
Set whether to display the scroll. Yes indicates that the scroll is to be displayed. No indicates that the scroll is not displayed in any case. Auto depends on the situation.
 

Noresize
This parameter does not allow users to change the size of the frame. If this parameter is not set, users can pull the frame to change its size at will.
 

Marginhight = 5
Space reserved by some edges of the frame height.
 

Marginwidth = 5
The space reserved by the edge of the frame width.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.