How the Web page frames and web frames work

Source: Internet
Author: User

A frame is an area in a browser window that displays HTML documents that are not related to what is displayed in the rest of the browser window. A frameset is an HTML file that defines the layout and properties of a set of frames.

To view a set of frames in a browser, enter the URL of the frameset file, and then open the appropriate document to display in those frames. You typically name a site's frameset file as index.html so that it is displayed by default when a visitor does not specify a filename.

The following example shows a frame layout consisting of three frames: a narrower frame at the side, with a navigation bar, a frame horizontally at the top, a logo and caption for the web site, and a large frame that occupies the remainder of the page, which contains the main content. Each of these frames displays a separate HTML document.

Each of these frames displays a separate HTML document

In this example, when a visitor browses to a site, the document displayed in the top frame never changes. The side frame navigation bar contains a link, and clicking one of the links changes the contents of the primary content frame, but the contents of the side frame itself remain static. The main content frame on the right displays the appropriate document, regardless of which link the visitor clicks on the left.

Note that the frame is not a file. You will most likely assume that the document currently displayed in the frame is part of the frame, but the document is not actually part of the framework. A frame is a container for a document-any frame can display any document.

Note that the word page has a broader meaning, it can represent a single HTML document, or it can represent the entire contents of a browser window at a given moment, even if there are several HTML documents displayed at the same time. For example, the phrase "pages with frames" usually represents a set of frames and the documents originally displayed in those frameworks.

If a site is displayed in a browser as a single page that contains three frames, it actually consists of at least four separate HTML documents: a frameset file and three documents, which contain the initial display content within those frames. When you design a page that uses a frameset in Dreamweaver, you must save all four files so that the page works correctly in the browser.

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.