1.3.2 HTML basic tag-Multi-Framework Document

Source: Internet
Author: User

Frame) You can divide the browser window into several panes, and display a web page in each pane, so that you can display different web pages in the same browser window at the same time. The framework can be nested.
The Frame webpage is defined by a FrameSet framework set) Mark and multiple Frame frames) Mark. In the frame webpage, you can place the FrameSet mark after the Head to replace the Body position. You can also use NoFrames to mark the frame content that cannot be displayed by the browser. The basic structure of the Framework webpage can be expressed as follows:
<Html>
<Head>
<Title> basic structure of the Framework webpage </Title>
</Head>
<FrameSet attribute = "value"…>
<Frame attribute = "value"…>
<Frame attribute = "value"…>
<Frame attribute = "value"…>
......
</FrameSet>
</Html>
(1) framework set
<FrameSet attribute = "value"…>
......
</FrameSet>
The content of the framework set includes how to organize information about each framework. It can be defined by the FrameSet mark. The framework is organized by rows and columns. You can use the following attributes marked by FrameSet to set the framework structure.
Cols = Specify the column width of each frame when creating a vertical separation framework. There are three types of values: pixel, percentage %), and relative size *). For example:
Cols = "*, *, *": divides the window into three equal-width frames;
Cols = "30%, 200, *": divides the browser window into three frames, with 1st columns accounting for 30% of the window width and 2nd columns listing 200 pixels, column 3rd is the remaining part of the window;
Cols = "*, 3 *, 2 *": indicates that the frame on the left occupies 1/6 of the window width, the middle frame occupies 1/2 of the window width, and the right frame occupies 1/3 of the window width.
Rows = the Row Height of each frame when the framework is horizontally separated. There are three types of values: pixel, percentage %), and relative size *). The setting method is similar to the Cols attribute. However, the Rows attribute cannot be used with the Cols attribute at the same time. To create a framework that contains both vertical and horizontal separation frameworks, use a nested framework.
FrameBorder = whether a three-dimensional border is displayed around the frame. The value is 1 by default), and the 3D border is displayed. The value is 0, and the flat border is displayed.
FrameSpacing = the interval between frames is measured in pixels. The default value is 0 ).
(2) Framework
<Frame attribute = "value"…>
You can use Frame tag to set the framework attributes, including the Framework name, whether the framework can be rolled, and what files are displayed in the framework. The Frame tag has the following attributes:
Name = framework Name
FrameBorder = whether a three-dimensional border is displayed around the frame. The value is 1 (default), and the 3D border is displayed. The value is 0, and the flat border is displayed.
MarginHeight = frame height in pixels)
MarginWidth = the frame width in pixels)
NoResize = the frame size cannot be adjusted.
Scrolling = specifies whether the framework can be rolled
Value:
Yes: The frame can be rolled.
No: The frame cannot be rolled.
Auto: Add a scroll bar for the framework as needed
Src = HTML file displayed in the framework

Example 1.8: The frame page shown in Design 1-10 is divided into three sub-Windows, named win1, win2, and win3 respectively. Two hyperlinks are set in the HTML corresponding to win1 in the sub-window, after you click these two hyperlinks, the target URL is displayed in win2 in the subwindow.

 

Figure 1-10 web pages with multiple frameworks

Principal main file ex1-8-1.htm]

<Html>
<Head> <Title> multi-frame webpage </Title> </Head>
<FrameSet rows = "80%, *" Bordercolor = "green">
<Frameset Cols = "20%, *">
<Frame Src = "Ex1-8-2.htm" Scrolling = "no" Name = "win1">
<Frame Src = "Ex1-8-3.htm" Name = "win2">
</FrameSet>
<Frame Src = "Ex1-8-4.htm" Noresize MarginWidth = 5 Name = "win3">
</FrameSet>
<NoFrames>
Please use a Web browser such as IE 3.0 or Netscape Navigator
To view this page in frames!
</NoFrames>
</Html>

Hosts file ex1-8-2.htm]

<Html> <Head> <Title> framework on the left </Title> </Head>
<Body> <A Href = "Ex1-8-3.htm" target = "win2"> Chapter 1 </A> <Br>
<A Href = "Chapter 2.htm" Target = "win2"> Chapter 2 </A> </Body> </Html>

Hosts file ex1-8-3.htm]

<Html> <Head> <Title> Chapter 1st </Title> </Head>
<Body> <H1> Chapter 1 Introduction </H1> <Br> This chapter briefly introduces the main points of the course... <Br>
<A Href = "Ex1-8-3.htm"> return </A> </Body> </Html>
Hosts file ex1-8-4.htm]
<Html> <Head> <Title> third Framework </Title> </Head>
<Body> <H2> Computer Network Courseware </H2> </Body> </Html>

Set the Target attribute in the tag <A>. This method is widely used in page design. It can ensure that hyperlinks are not overwritten by the target file.


BibliographyPrevious sectionNext section

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.