Home  >  Article  >  Web Front-end  >  How to use html frame tag? Introduction to the usage of frame tag (with examples)

How to use html frame tag? Introduction to the usage of frame tag (with examples)

寻∝梦
寻∝梦Original
2018-08-30 15:46:4413697browse

This article mainly introduces the introduction of the html frame tag, including the definition and attributes of the frame tag, as well as the important usage of the html iframe tag. Let's take a look at this article together

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

tag defines a specific frameset window (frame).

Each frame in the frameset can set different properties, such as border, scrolling, noresize, etc.

Note: If you wish to validate pages containing frames, make sure the doctype is set to "Frameset DTD". Read more about DOCTYPE.

Important: You cannot use the

tag with the tag. However, if you need to add a tag for browsers that don't support frames, be sure to place this tag within the tag! <p><strong> Let’s take a look at the introduction of attributes: </strong></p> <p><img src="https://img.php.cn//upload/image/395/152/143/1535613295787655.png" title="1535613295787655.png" alt="How to use html frame tag? Introduction to the usage of frame tag (with examples)"></p> <p><strong> Let’s talk about the usage of HTML iframe tags: </strong></p> <p>iframe is a form of frame and is also commonly used. The following is a summary of its commonly used attributes. </p> <p>The following is a regular case: </p><pre class="brush:html;toolbar:false">&lt;iframe border=2 frameborder=0 width=500 height=500 marginheight=0 marginwidth=0 scrolling=no src=&quot;move-ad.html&quot;&gt; &lt;/iframe&gt;</pre><p>## Case explanation of the #HTML iframe tag: <strong></strong></p>iframe is used to set a floating frame or container for text or graphics. <p></p>border sets the edge width around the picture and text frame <p></p> There is also a design for quick reading height<p></p>scrolling=no Whether there is a scroll bar (YES, NO, AUTO) <p></p>src specifies the file or image called by IFRAME (HTML, HTM, GIF, JPEG, JPG, PNG, TXT, *.*) <p></p> <p>Introduction to the usage of HTML iframe tag:<strong></strong></p>When it comes to iframe, you may have already thrown it into the "forgotten corner", but when it comes to its brother Frame, you will not be unfamiliar. The frame tag is a frame tag. What we call a multi-frame structure is to display multiple HTML files in a browser window. Now, we encounter a very realistic situation: if there is a tutorial, it is divided into sections one by one. At the end of each page, there are links to "previous section" and "next section", except that the content of each tutorial is different. In addition, the content of other parts of the page is the same. It seems too boring to make stupid pages page by page. At this time, I suddenly thought, if there is a way to keep other parts of the page unchanged, just make the tutorial It becomes a page-by-page content page, without other content. When clicking the page up and down link, only the tutorial content part will be changed, and the other parts will remain unchanged. In this way, one saves time, and the other is that the tutorial will have three long and two short changes in the future. , is also very convenient, and will not affect the whole army; more importantly, the advertising banners, column lists, navigation and other things that are included in almost every page are only downloaded once and then no longer downloaded. iframe tag, also called floating frame tag, you can use it to embed an HTML document in an HTML display. The biggest feature that is different from the Frame tag is that the HTML file referenced by this tag is not displayed independently from other HTML files, but can be directly embedded in an HTML file and integrated with the content of the HTML file to become a whole. In addition, , you can also display the same content multiple times on a page without having to write the content repeatedly. A vivid metaphor is "picture-in-picture" TV. <p></p> <p>The usage format of iframe tag is: <strong></strong><pre class="brush:html;toolbar:false">&lt;iframe src=&quot;URL&quot; width=&quot;x&quot; height=&quot;x&quot; scrolling=&quot;[option]&quot; frameborder=&quot;x&quot;&gt;&lt;/iframe&gt;</pre></p>src: The path of the file, which can be an HTML file, text, ASP, etc.; <p></p>width, height: The width and height of the "picture-in-picture" area; <p></p>scrolling: When the specified HTML file of SRC is not displayed in the specified area, the scrolling option, if set to NO, then No scroll bar will appear; if it is Auto: the scroll bar will automatically appear; if it is Yes, it will be displayed; Set to 0. For example: <p><pre class="brush:html;toolbar:false">&lt;Iframe src=&quot;http://www.php.cn&quot;;; width=&quot;250&quot; height=&quot;200&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;</pre></p>The displayed effect is as shown in the figure: <p></p> <p></p> <p>The above is the entire content of this article introducing the use of HTML frame tags. If you have any questions, you can ask below. <img src="https://img.php.cn//upload/image/754/285/666/1535613482285845.png" title="1535613482285845.png" alt="How to use html frame tag? Introduction to the usage of frame tag (with examples)"></p>【Editor’s Recommendation】<p></p> <p>html5 What does the header tag mean? Detailed explanation of the usage of html5 header tag (with examples) </p> <p><a href="http://www.php.cn/html5-tutorial-409228.html" target="_blank"></a><br>html Is the p tag a single tag? Introduction to how to use the html p tag (with examples included) </p> <p><a href="http://www.php.cn/div-tutorial-409226.html" target="_blank"></a></p>

The above is the detailed content of How to use html frame tag? Introduction to the usage of frame tag (with examples). For more information, please follow other related articles on 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