Home Web Front-end HTML Tutorial How to use html frameset tag? Detailed explanation of html frameset tag attributes

How to use html frameset tag? Detailed explanation of html frameset tag attributes

Aug 17, 2018 pm 01:41 PM

html How to use frameset tag? Detailed explanation of the attributes of the html frameset tag. This article mainly describes the definition and usage of the html frameset tag, as well as the uses of the two attributes of the html frameset tag (with examples)

First of all, let us understand what html frameset is. Tag:

html Definition and usage of frameset tag:

frameset element can define a frameset. It is used to organize multiple windows (frames). Each framework has separate documentation. In its simplest application, the frameset element simply specifies how many columns or rows exist in the frameset. You must use cols or rows attributes.

html The role of the frameset tag:

Its role is to specify a frameset for organizing multiple frames and nested framesets.

The FRAMESET element is a container for FRAME elements. An HTML document can contain either a FRAMESET element or a BODY element, but not both.

If a user opens a Web folder in a frame and then clicks something in the Web folder, the clicked file or folder will replace the entire window. For example, suppose a page contains two frames, one pointing to a URL and the second pointing to a network drive. If the user clicks on a file or folder in the second frame, that frame activates the entire window's controls, including the first frame. For file types that the browser cannot handle, such as *.txt files, the corresponding application window will be opened.

Although Web folders are part of the file system hierarchy, this technology does not always represent the actual contents of the file system. A typical example is Network Neighborhood.

html The scope of use of the frameset tag:

This element is available in HTML in Microsoft® Internet Explorer 3.0 and in scripts in Internet Explorer 4.0.

Note: The

tag cannot be used together with the tag. However, if you need to add a tag for browsers that don't support frames, be sure to follow the tag pair within the <noframes> tag before you can use any of the familiar Label. <p><strong>HTML <frameset> tag example: </frameset></strong></p> <p>Simple three-frame page: </p><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'>&lt;html&gt; &lt;frameset cols=&quot;25%,50%,25%&quot;&gt; &lt;frame src=&quot;frame_a.htm&quot; /&gt; &lt;frame src=&quot;frame_b.htm&quot; /&gt; &lt;frame src=&quot;frame_c.htm&quot; /&gt; &lt;/frameset&gt; &lt;/html&gt;</pre><div class="contentsignin">Copy after login</div></div><p><strong>html Tips and comments for the frameset tag: </strong></p><p>Tip: It is important to note that browsers allow users to manually resize the rows or columns of a single frame document, and thus change the relative proportion of each frame in the frame display. Unless you explicitly tell the browser not to do this. To prevent this, you can use the noresize attribute in the <frame> tag. </p><p>Note: If you wish to validate a page that contains frames, make sure the DTD is set to "Frameset DTD". Read more about XHTML validation. </p><p>Important: You cannot use the <body></body> tag with the <frameset></frameset> tag. However, if you need to add a <noframes> tag for browsers that don't support frames, be sure to place the tag within the <body></body> tag! </p><p>html Optional attributes of the frameset tag: </p><p><img src="/static/imghw/default1.png" data-src="https://img.php.cn//upload/image/223/354/882/1534468985971134.png" class="lazy" title="1534468985971134.png" alt="How to use html frameset tag? Detailed explanation of html frameset tag attributes"/></p><p><strong>html Standard attributes of the frameset tag: </strong></p><p>id, class, title, style</p><p><strong>Cols attribute and rows attribute of HTML <frameset> tag</strong></p><p><strong>html Function and usage of frameset tag:</strong># The </p>##<frameset> tag has a required attribute: either rows or cols, depending on your selection, which define the row or column sizes of the frame or nested frameset in the document window. and quantity. <p></p>Both properties accept a quoted, comma-separated list of values ​​that specify the absolute (pixels) or relative (percentage or remaining space) width of the frame (for columns), Or absolute or relative height (for rows). The number of these property values ​​determines how many rows or columns of frames the browser will display in the document window. <p></p>As with tables, the browser will try to display it as close to the given frameset dimensions as possible. However, the browser does not extend the bounds of the document window to accommodate framesets that extend beyond the edges, nor does the browser fill the window with empty space if the specified frame does not fill the entire window. Instead, the browser allocates space based on a frame's size relative to other frames in rows and columns, so that it fills the entire document window. (Did you notice that there are no scroll bars in a main frame document?) <p></p>The following are three examples: <p></p><p>Example 1<strong></strong></p>The following code A 3-line frame will be created: <p><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'>&lt;frameset rows=&quot;150,300,150&quot;&gt;</pre><div class="contentsignin">Copy after login</div></div></p> Each of these lines spans the entire length of the document window. The first and last frames are set to 150 pixels high, and the second row is set to 300 pixels high. <p><p>实际上,除非浏览器窗口正好是 600 像素高,否则浏览器将会自动按照比例延伸或压缩第一和最后一个框架,使得这两个框架都占据 1/4 的窗口空间。中间行将会占据剩下 1/2 的窗口空间。</p><p><strong>实例2</strong></p><p>用窗口尺寸的百分比表示的框架行和列尺寸数据更加实际。</p><p>例如,下面这个示例与刚才那个示例的效果相同:</p><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'>&lt;frameset rows=&quot;25%,50%,25%&quot;&gt;</pre><div class="contentsignin">Copy after login</div></div><p>当然,如果这些百分比加起来不是 100%,浏览器也会自动按照比例重新给出每行尺寸以消除差异。</p><p><strong>实例3</strong></p><p>如果你像我们一样,那么将问题综合起来就不是一件难事。可能有的框架设计人员正为同样的困难而感到苦恼,这就解释了为什么他们要在 <frameset> 的 rows 和 cols 值上加上星号。它告诉浏览器要在将相邻的框架放入框架集之后,给剩下的空间分配各自的行或列。</p><p>例如,当浏览器遇到下列框架标签时:</p><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'>&lt;frameset cols=&quot;100, *&quot;&gt;</pre><div class="contentsignin">Copy after login</div></div><p>上面的例子会生成一个宽为固定的 100 像素的列,然后再生成另一个框架列,该列会占据框架集中其余所有的空间。</p> <p>【相关推荐】</p> <p><a href="http://www.php.cn/div-tutorial-408459.html" target="_blank" title="HTML <fieldset> 标签的具体用法是什么?怎么用fieldset设置边框颜色?">HTML </a></p> <fieldset> 标签的具体用法是什么?怎么用fieldset设置边框颜色?<br><p><a href="http://www.php.cn/div-tutorial-408527.html" target="_blank" title="html textarea是什么意思?如何获取textarea标签中的换行符和空格?">html textarea是什么意思?如何获取textarea标签中的换行符和空格?</a><br></p> <p><br></p> </fieldset>

The above is the detailed content of How to use html frameset tag? Detailed explanation of html frameset tag attributes. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
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

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

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Is HTML easy to learn for beginners? Is HTML easy to learn for beginners? Apr 07, 2025 am 12:11 AM

HTML is suitable for beginners because it is simple and easy to learn and can quickly see results. 1) The learning curve of HTML is smooth and easy to get started. 2) Just master the basic tags to start creating web pages. 3) High flexibility and can be used in combination with CSS and JavaScript. 4) Rich learning resources and modern tools support the learning process.

The Roles of HTML, CSS, and JavaScript: Core Responsibilities The Roles of HTML, CSS, and JavaScript: Core Responsibilities Apr 08, 2025 pm 07:05 PM

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

Understanding HTML, CSS, and JavaScript: A Beginner's Guide Understanding HTML, CSS, and JavaScript: A Beginner's Guide Apr 12, 2025 am 12:02 AM

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

What is an example of a starting tag in HTML? What is an example of a starting tag in HTML? Apr 06, 2025 am 12:04 AM

AnexampleofastartingtaginHTMLis,whichbeginsaparagraph.StartingtagsareessentialinHTMLastheyinitiateelements,definetheirtypes,andarecrucialforstructuringwebpagesandconstructingtheDOM.

How to implement adaptive layout of Y-axis position in web annotation? How to implement adaptive layout of Y-axis position in web annotation? Apr 04, 2025 pm 11:30 PM

The Y-axis position adaptive algorithm for web annotation function This article will explore how to implement annotation functions similar to Word documents, especially how to deal with the interval between annotations...

Gitee Pages static website deployment failed: How to troubleshoot and resolve single file 404 errors? Gitee Pages static website deployment failed: How to troubleshoot and resolve single file 404 errors? Apr 04, 2025 pm 11:54 PM

GiteePages static website deployment failed: 404 error troubleshooting and resolution when using Gitee...

HTML, CSS, and JavaScript: Essential Tools for Web Developers HTML, CSS, and JavaScript: Essential Tools for Web Developers Apr 09, 2025 am 12:12 AM

HTML, CSS and JavaScript are the three pillars of web development. 1. HTML defines the web page structure and uses tags such as, etc. 2. CSS controls the web page style, using selectors and attributes such as color, font-size, etc. 3. JavaScript realizes dynamic effects and interaction, through event monitoring and DOM operations.

How to use CSS3 and JavaScript to achieve the effect of scattering and enlarging the surrounding pictures after clicking? How to use CSS3 and JavaScript to achieve the effect of scattering and enlarging the surrounding pictures after clicking? Apr 05, 2025 am 06:15 AM

To achieve the effect of scattering and enlarging the surrounding images after clicking on the image, many web designs need to achieve an interactive effect: click on a certain image to make the surrounding...

See all articles