How does the HTML frame tag work? Introduction to the use of frame tags (with examples)

Source: Internet
Author: User
This article mainly introduces the introduction of the HTML frame tag, the definition and properties of frame tags, as well as the use of important HTML IFRAME tags introduction. Let's see this article together

Let's take a look at the definition of this article first:

<frame> tags define a specific window (frame) in the frameset.

Each frame in the frameset can have different properties set, such as border, scrolling, noresize, and so on.

Note: If you want to verify the page that contains the frame, make sure that DOCTYPE is set to Frameset DTD. Read more about DOCTYPE's content.

Important: You cannot use <body></body> tags with <frameset></frameset> tags. However, if you need to add a <noframes> tag to a browser that does not support frames, be sure to place this tag in the <body></body> tab!

Take a look at the description of the attributes:

Talk about the use of HTML IFRAME tags:

IFrame is a form of the framework, but also more commonly used, the following is a summary of its usual to attribute

The following is a general case:

<iframe border=2 frameborder=0 width=500 height=500 marginheight=0 marginwidth=0 scrolling=no src= "move-ad.html" ></iframe>

Case explanation for HTML iframe Tags:

An IFRAME is used to set a floating frame or container for text or graphics.

Border setting the width of the edge around the frame

And there's a fast-reading height design.

Scrolling=no whether there is a scroll bar (Yes,no,auto)

SRC Specifies the file or picture called by the IFRAME (html,htm,gif,jpeg,jpg,png,txt,*.*)

An introduction to the use of HTML iframe tags:

Mention the IFRAME, you may have already been thrown into the "forgotten Corner", but, speaking of its brother frame will not be unfamiliar. The frame tag is a frames tag, and what we call a multi-frame structure is to display multiple HTML files in a single browser window. Now, we encounter a very realistic situation: if there is a tutorial, is a section of the floor, each page at the end of a "previous section", "next section" link, in addition to each tutorial content is different, the rest of the page content is the same, if a page by page to do stupid page, this seems to be too annoying, then the whim, If there is a way to make the page other places, only the tutorial into a page-by-page content page, without other content, when clicked up and down the link, only change the contents of the tutorial section, the other remains the same, so that the first time, and later, such as the tutorial has a happens to change, it is also very convenient, not to pull a More importantly, those ads banner, column list, navigation and so on almost every page of the things are downloaded only once and then no longer downloaded. An IFRAME tag, also called a floating frame marker, allows you to embed an HTML document in an HTML display. It is different from the most important feature of the frame tag is that the HTML file referenced by this tag is not displayed separately from the other HTML files, but can be embedded directly in an HTML file, merged with the content of the HTML file, and become a whole, in addition, You can also display the same content multiple times in one page without having to repeat the content, an image metaphor is the "picture-in-pictures" TV.

The use format of the IFRAME tag is:

<iframe src= "URL" width= "x" height= "x" scrolling= "[option]" frameborder= "x" ></iframe>

SRC: File path, not only HTML file, but also text, ASP and so on;

width, Height: the width and height of the "pip" area;

Scrolling: When the specified HTML file of SRC does not show up in the specified area, the scrolling option, if set to No, does not appear in the scroll bar, such as auto: The scroll bar appears automatically, if yes, the display;

Frameborder: The width of the area border, often set to 0 in order for the PIP to be fused with the neighboring content. Like what:

<iframe src= "http://www.php.cn";; Width= "height=" scrolling= "no" frameborder= "0" ></iframe>

The effect shown

The above is the whole content of this article describes how to use the HTML frame tag. If you have questions, you can ask below.

Related Article

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.