search
HomeWeb Front-endHTML TutorialHTML frame tags frameset, frame, iframe, noframes

Generally, only one web page file can be displayed in a browser document window. However, using the frame tag, a browser document window can be divided into multiple sub-windows, and an independent web page file can be displayed in each sub-window.
Frame is translated from English Frame, which represents a sub-window in the browser document window. Each frame can display an HTML file, and multiple frames form a frameset (Frameset). The usual way to use a frameset is to place a web page in a frame. This web page contains hyperlink entries that can link to multiple other web pages. After the visitor clicks on these hyperlink entries, the web page file pointed to by the hyperlink can be displayed in the in another specified frame. Frames can be used if more than one web page is required to be displayed in a single application window.


1. Frameset tag

A window area divided into several frames is called a frameset, and the frame window must be defined in In a frameset, the

and tags are used to define how many frames there are in the frameset and how each frame is arranged.
and tags are nested in the tag pair. They can also be nested, but must be placed in and tags, because the and tags are only used to divide the frame window and cannot display other web page elements.
The tag has two important attributes, rows and cols. When using this tag, at least one of these two attributes should be selected, otherwise the browser will only display the first defined frame, and the remaining The and tags will not play any role.
The rows attribute is used to specify how many rows of frame windows and the size of each frame window and each frame window in the main document.

The cols attribute is used to specify how many columns of frame windows and the size of each frame window and each frame window in the main document.

Attribute value can be percentage or absolute pixel value. Or a combination of asterisks (*), the number of values ​​indicates the number of rows and columns, (*) represents those unspecified spaces, if multiple asterisks (*) appear in the same attribute, then The remaining unspecified space is divided equally, with each value separated by commas.

Example:

This means there are three frames arranged in rows, each frame occupies the entire browser window

1/ 3 size of space.

This means there are three frames arranged in columns. The first frame occupies 40% of the entire browser window. The remaining space is divided equally between the other two frame windows.

This means there are six frames in total, two rows and three columns

2. Frame tag

tag is placed between the

and tags to define A specific frame window. The tag has two important attributes, the src and name attributes, both of which must be assigned values. src specifies the URL address of the web page file initially loaded in the entire frame window. The browser will display the HTML file specified by src in this frame; name specifies the name of the frame window. This name is used for hypertext link tags specifies the frame in which the linked HTML file will be displayed. For example, if a frame name is defined as main, and the target attribute value of the hyperlink tag in another frame window is equal to the name of this frame window, main, when the hyperlink is clicked, the HTML file it points to will be displayed in main. in the frame.
In addition, also has scrolling and noresize attributes. scrolling is used to specify whether to display scroll bars in the frame window border. The values ​​can be yes, no, or auto (displayed when the space of the web content is larger than the space window. Otherwise it will not be displayed). The noresize attribute can be used directly by adding a tag without assigning a value. It is used to prohibit users from using the mouse to drag the dividing lines between frames to adjust the size of the frames.

3. Tags

and are used when the browser used by the viewer is too old. , when the frame function is not supported, what you see will be blank. In order to avoid this situation, you can use the tag. When the browser you are using cannot see the frame, you will see the content between <noframes>... instead of a blank space. . These contents can be text that reminds browsing to switch to a new browser, or even a web page without frames, or it can automatically switch to a version without frames. Between this tag pair, the and tags should follow immediately.

4. Floating window label

tags do not need to be placed between the and tags. Their function is to insert a simple frame window in the middle of a web page. In this frame window, you can Display another file, so that a "picture-in-picture" effect can be achieved. The text placed in the tag pairs will only be displayed if the browser does not support the

For more articles related to HTML frame tags frameset, frame, iframe, and noframes, please pay attention to the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
HTML's Purpose: Enabling Web Browsers to Display ContentHTML's Purpose: Enabling Web Browsers to Display ContentMay 03, 2025 am 12:03 AM

The core purpose of HTML is to enable the browser to understand and display web content. 1. HTML defines the web page structure and content through tags, such as, to, etc. 2. HTML5 enhances multimedia support and introduces and tags. 3.HTML provides form elements to support user interaction. 4. Optimizing HTML code can improve web page performance, such as reducing HTTP requests and compressing HTML.

Why are HTML tags important for web development?Why are HTML tags important for web development?May 02, 2025 am 12:03 AM

HTMLtagsareessentialforwebdevelopmentastheystructureandenhancewebpages.1)Theydefinelayout,semantics,andinteractivity.2)SemantictagsimproveaccessibilityandSEO.3)Properuseoftagscanoptimizeperformanceandensurecross-browsercompatibility.

Explain the importance of using consistent coding style for HTML tags and attributes.Explain the importance of using consistent coding style for HTML tags and attributes.May 01, 2025 am 12:01 AM

A consistent HTML encoding style is important because it improves the readability, maintainability and efficiency of the code. 1) Use lowercase tags and attributes, 2) Keep consistent indentation, 3) Select and stick to single or double quotes, 4) Avoid mixing different styles in projects, 5) Use automation tools such as Prettier or ESLint to ensure consistency in styles.

How to implement multi-project carousel in Bootstrap 4?How to implement multi-project carousel in Bootstrap 4?Apr 30, 2025 pm 03:24 PM

Solution to implement multi-project carousel in Bootstrap4 Implementing multi-project carousel in Bootstrap4 is not an easy task. Although Bootstrap...

How does deepseek official website achieve the effect of penetrating mouse scroll event?How does deepseek official website achieve the effect of penetrating mouse scroll event?Apr 30, 2025 pm 03:21 PM

How to achieve the effect of mouse scrolling event penetration? When we browse the web, we often encounter some special interaction designs. For example, on deepseek official website, �...

How to modify the playback control style of HTML videoHow to modify the playback control style of HTML videoApr 30, 2025 pm 03:18 PM

The default playback control style of HTML video cannot be modified directly through CSS. 1. Create custom controls using JavaScript. 2. Beautify these controls through CSS. 3. Consider compatibility, user experience and performance, using libraries such as Video.js or Plyr can simplify the process.

What problems will be caused by using native select on your phone?What problems will be caused by using native select on your phone?Apr 30, 2025 pm 03:15 PM

Potential problems with using native select on mobile phones When developing mobile applications, we often encounter the need for selecting boxes. Normally, developers...

What are the disadvantages of using native select on your phone?What are the disadvantages of using native select on your phone?Apr 30, 2025 pm 03:12 PM

What are the disadvantages of using native select on your phone? When developing applications on mobile devices, it is very important to choose the right UI components. Many developers...

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool