1.<frameset></frameset>
2.<frame>
3.<noframes></noframes>
Frames are translated by an English frame, which can be used to load multiple HTML files into a browser window. That is, each HTML file occupies a frame, and multiple frames can be displayed in the same browser window, which makes up one of the largest
Frame, which is also an HTML file that contains multiple HTML documents (I call it the main document). Frames are usually used by placing a directory in one frame (which you can choose from), and then displaying the HTML file in another frame.
1.<frameset></frameset>
<frameset></frameset> labels are placed outside the <body></body> label pairs of the main document of the frame, and can be embedded in other frame documents, and can be nested. This label pair is used to define a number of frames in the main document and each frame is
How they are arranged. It has the rows and Cols properties, which must be selected at least one of the two properties when using the <frameset> label, otherwise the browser displays only the first defined frame, and the rest, regardless of the,<frameset></frameset> label
It's not going to work any more. Rows are used to specify the row positioning of each frame in the main document, and cols is used to specify the column positioning of each frame in the main document. The values of these two properties can be percentages, absolute pixel values, or asterisks ("*"), where the star
The number represents the space that is not described, and if multiple asterisks appear in the same attribute, the remaining unspecified space is evenly distributed. Also, all frames are arranged from left to right according to rows and cols, and then from top to bottom.
Examples are as follows:
<frameset rows= "*,*,*" > A total of three frames in columns, each frame accounting for 1/3 of the entire browser window
<frameset cols= "40%,*,*" > A total of three frames arranged in rows, the first frame accounted for 40% of the entire browser window, and the remaining space was evenly allocated to another two frames
<frameset rows= "40%,*" cols= "50%,*,200" > A total of six frames, first in the first row from left to right three frames, and then in the second row from left to right to arrange three frames, that is, two rows of three columns, space based on the rows and Cols properties
Value, where 200 of the units are pixels.
2.<frame>
<frame> tags are placed between <frameset></frameset> to define a specific frame. The <frame> label has the SRC and name attributes, both of which must be assigned. SRC is the source HTML file name for this frame, including network path
Path, that is, relative paths or URLs, the browser will display the SRC specified HTML file in this frame; name is the one that is used for Hypertext link label <a href= "target=" > The target attribute is used to specify the link
The HTML file will be displayed in which frame. For example, a frame is defined, the name is main, the HTML file name displayed in the frame is jc.htm, then the code is <frame src= "jc.htm" name= "main", and when you have a link, in the click
After this link, the file new.htm will be displayed in a frame named Main, then the code is <a href= "new.htm" target= "main" > Need to link the text </a>. In this way, you can create a directory of your Web site in one frame and join
A series of links that display the linked HTML file in another frame after clicking on the link.
In addition, the,<frame> tag also has scrolling and noresize properties, scrolling to specify whether the scroll axis is displayed, the value can be "yes" (displayed), "No" (not displayed) or "Auto" (automatically displayed if necessary, Do not display automatically if not required)
。 The Noresize property can be used directly in the tag, without assigning a value, which prevents the user from resizing a frame.
3.<noframes></noframes>
<noframes></noframes> label pairs are also placed between <frameset></frameset> label pairs to display text or image information in browsers that do not support frames. The label pairs are first followed by the <body></body> label pairs,
Then you can use any of the tags we've talked about before tutorial seven.
Below is a comprehensive example:
A comprehensive example of example 8 frame labels
Main document:
A comprehensive example of <title> frame labels </title>
<frameset cols= "25%,*" >
<frame src= "menu.htm" scrolling= "no" name= "left" >
<frame src= "page1.htm" scrolling= "Auto" name= "Main" >
<noframes>
<body>
<p> Sorry, your browser does not support "frame"! </p>
</body>
</noframes>
</frameset>
Menu.htm
<title> Directory </title>
<body>
<p><font color= "#FF0000" > Directory </font></p>
<p><a href= "page1.htm" target= "Main" > Link to first page </a></p>
<p><a href= "page2.htm" target= "Main" > Link to second page </a></p>
</body>
Page1.htm
<title> first Page </title>
<body>
<p align= "center" ><font color= "#8000FF" > This is the first page! </font></p>
</body>
Page2.htm
<title> second page </title>
<body>
<p align= "center" ><font color= "#FF0080" > This is the second page! </font></p>
</body>