The
HTML framework:
1.frameset Frame Set
2.iframe Inline Frame
1.frameset Frame Set
1.1 Steps to create a frames page:
(1) Create the corresponding HTML file for each child window
(2) Create the entire frame file, referencing the child window file separately
1.2 Basic syntax for creating frame pages:
<frameset cols= "25%,50%,*" row= "50%,*" border= "5" >
<frame src= "top.html" >
......
</frameset>
Note: rows and cols do not appear at the same time, cols represent horizontal partitioning and rows represent vertical partitioning. "*" indicates the remaining.
Note:<frameset></frameset> tags cannot be used in conjunction with <body></body> tags. Unless you use <noframes> tags in <frameset>. That
<frameset>
<noframes>
<body></body>
</noframes>
</frameset>
Common properties in 1.3 <framset> frameset tags
For example: Horizontal frame
<frameset rows= "25%,50%,25%" >
<frame src= "header.html"/>
<frame src= "body.html"/>
<frame src= "footer.html"/>
</frameset>
For example: Vertical frame
<frameset cols= "25%,50%,25%" >
<frame src= "header.html"/>
<frame src= "body.html"/>
<frame src= "footer.html"/>
</frameset>
2.iframe Inline Frame
Common Properties
Grammar:
<body>
<iframe src= "Reference page address" name= "Frame identifier name" frameborder= "border" scrolling= "yes" ></iframe>
</body>
For example: (Code below)
<!DOCTYPE HTML><HTMLLang= "en"> <Head> <MetaCharSet= "Utf-8"> <title>Inline frame</title> </Head> <Body> <iframename= "Topiframe"width= "100%"Height= "400px"src= "https://www.baidu.com/"frameborder= "1"scrolling= "Auto"></iframe> <P> <ahref= "https://www.baidu.com/"Target= "Topiframe">Baidu </a> <ahref= "http://www.sina.com.cn"Target= "Topiframe">Sina</a> </P> </Body></HTML>
Operation Result:
Click Baidu in the box above to display Baidu page, click Sina Display Sina page.
HTML Framework (Frameset frameset and IFRAME inline framework)