HTML 4.0 Syntax frame label

Source: Internet
Author: User
Tags reserved split

"Basic concepts of the framework"

First of all, let's take a look at this picture on the right-hand side, and I'll use this picture as a commentary, which might be a little clearer. Ok! We can see that this window on the right is divided into 1, 2, 33 frames, each of which has its own content, a.htm, b.htm, c.htm three files. But what is the index.htm in the lower left corner?

Originally, the lower left corner of this file index.htm, is to tell the computer, we want to split the screen into this, that is, all frame labels, in fact, only in index.htm this file. (Of course, not file name must be called index.htm to fetch other file name is also OK.) )

Do you get it? In short, you have to split a few boxes, there will be several corresponding HTML files (if you want to split 100 boxes, there will be 100 HTML files are right.) In addition, there will be one more file to tell the computer how to split. (which is the case of the index.htm file!) )

"Start splitting"

Don't worry, don't worry, split window is a learning, want to split is to step by step. Take a look at just that example, imagine the picture is a cake, how do you cut to cut it like that?

You will find, strange, in the above grammar, how did not see <BODY></BODY> familiar figure? Oh... Yes, it has been replaced by a <FRAMESET></FRAMESET> tag to be added later! In other words, if we want to split the screen, we must first use <FRAMESET> label to tell the computer to say: ' Hey! I'm starting to split up! ' At this time,<body> is not useful, so hide to the side of the cool!

Now start to cut and see! We first divided the picture into the left and right side (the left is the box window 1, the right-hand side is tentatively 2 wait for a moment to split it!) ), as shown in the following figure:

In <FRAMESET>, we have to tell the computer in the end is to the left and right points (COLS)? or up and down (ROWS). At first we were left and right, so we wrote <frameset cols= "120,*" >. cols= "120,*" means that the column on the left is forced to 120, and the right is changed with the size of the window. In addition to writing points directly, we can also use percentages to express, for example, cols= "20%,80%" is also possible.

Then, the box window on the right is then cut to the top and bottom two images (that is, the box window 2 and 3). The following figure:

Did you see it? The original <frame src= "b.htm" name= "2" > (in the 3rd syntax) was replaced by another group of <frameset rows= "100,*" >! So be careful! The second group of <frameset rows= "100,*" > was surrounded by the first group <frameset cols= "120,*" >. (Messed up, right?) )

Oh... Unknowingly is done, in fact, as long as the final completion of those grammars into index.htm, and then prepare three stalls a.htm, b.htm, c.htm then finished it! Of course, this is one of the most Yangchun segmentation method, I will be a number of advanced labels in the bottom one by one description.

"Other label parameter descriptions"

<frameset cols= "120,*" frameborder=0 framespacing=5>

Cols= "120,*"

is the vertical cutting screen! You can cut to about two pictures at a time, of course, can also be cut into three, very simple as long as written cols= "30,*,50" (the number of your own adjustment!) And so on, four or more of course, four sets of numbers!

Rows= "120,*"

is the transverse cutting screen, that is, the screen from top to bottom, cut the same as above.

Frameborder=0

Set the frame's border with values of only 0 and 1, 0 is not a border, 1 is to display the border. The border cannot be resized.

Framespacing=5

Represents the space between the frame and the frame to keep it from appearing too crowded.

<frame src= "a.htm" name= "1" frameborder=0 scrolling= "no" noresize marginhight=2 marginwidth=2>

Src= "A.htm"

Set the name of the page to be displayed in this frame, each frame must correspond to a page, or it will produce errors, here is to fill in the name of the corresponding page. (If the page is in a different directory, remember the path to write clearly)

Name= "1"

Set the name of the frame so that you can specify the frame for the link, so be sure to set it! Of course the name is named after your pleasure.

Frameborder=0

Set the frame's border with values of only 0 and 1, 0 is not a border, 1 is to display the border. The border cannot be resized.

Scrolling= "No"

Set whether the scroll is to be displayed, yes is to display the scroll, no is not shown in any case, auto is the case.

Noresize

Settings do not allow users to change the size of the box, if not set this parameter, users can easily pull the frame, change its size.

marginhight=2

Represents the space reserved by the edge of a frame height.

marginwidth=2

Represents the space reserved for a partial edge of the frame width.

"Related usage"

<noframe>

How to use:<noframe> please replace the browser with support frame function </noframe>

Tag explanation: Some browsers are older, unable to display the function of the frame, therefore, we should use this label, so that these netizens know, it is time to change the browser. Alternatively, you can also put a page tag with no frame syntax in the tag, so there is no browser that supports the frame function and automatically displays pages without the frame syntax.

target= Box window name

How to use: <a href= "d1-1.htm" target=3> display content </A>

Tag commentary: There is often a situation where I want to press the link at 1 in the box window, but I want his content to appear in Box 3 (please refer to the picture above), how should it be written? Just like the top with a target= box window name on the line!

Target=_top

How to use: <a href= "http://www.kimo.com" target=_top> qi Mo Station </A>

Tag explanation: Sometimes, in the box window will link to other stations, but found that the new link to this station, unexpectedly be framed window wrapped, not only ugly, and may eat the lawsuit said! So, at this point you have to add target=_top this parameter, then, this new link to the website, will occupy the entire screen again!

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.