HTML frame

HTML frame

Definition and usage

tag defines a specific window (frame) in the frameset.

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

Differences between HTML and XHTML

In HTML, the tag does not have a closing tag.

In XHTML, the tag must be closed properly.

Tips and Notes:

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 the tag within the <body></body> tag!</p> <p style="border: 0px; margin: 2px 0px; padding: 0px; font-size: 1.8em; line-height: 1.8em; color: rgb(51, 51, 51); font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, STHeiti, "Microsoft Yahei", sans-serif; white-space: normal; background-color: rgb(255, 255, 255);"><strong><span style="font-size: 14px;">Iframe - Set height and width</span></strong></p>##The height and width attributes are used to define the height and width of the iframe tag. <p></p>The property defaults to pixels, but you can specify that it be displayed proportionally (e.g.: "80%"). <p></p> <pre class="brush:html;toolbar:false"><!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>PHP中文网</title> <script type="text/javascript" src="/js/jquery.3.5.2.min.m.js"></script> </head><div style="position: fixed;right: 0;top:100px;width: 125px; z-index:2000;"><div ><a target="_blank" rel="nofollow" href="https://www.520xingyun.com/from/188bet.php" ><img width="120px" height="550px" src="https://www.520xingyun.com/images/188_120.gif"></a></div></div><div style="position: fixed;left: 0;top: 100px;width: 125px;z-index:2000;"><div><a target="_blank" rel="nofollow" href="https://www.520xingyun.com/from/188bet.php"><img width="120px" height="550px" src="https://www.520xingyun.com/images/188_120.gif"></a></div></div> <body> <iframe src="demo_iframe.htm" width="200" height="200"></iframe> <p>一些旧的浏览器不支持 iframe。</p> <p>如果浏览器不支持 iframes 则不会显示。</p> </body> </html></pre> <p></p> <p style="border: 0px; margin: 2px 0px; padding: 0px; font-size: 1.8em; line-height: 1.8em; color: rgb(51, 51, 51); font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, STHeiti, "Microsoft Yahei", sans-serif; white-space: normal; background-color: rgb(255, 255, 255);"><strong>Iframe - Remove borders<span style="font-size: 14px;"></span></strong></p>The frameborder attribute is used to define whether the iframe indicates whether to display the border. <p></p>Set the attribute value to "0" to remove the border of the iframe: <p></p> <pre class="brush:html;toolbar:false"><!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>PHP中文网</title> <script type="text/javascript" src="/js/jquery.3.5.2.min.m.js"></script> </head><div style="position: fixed;right: 0;top:100px;width: 125px; z-index:2000;"><div ><a target="_blank" rel="nofollow" href="https://www.520xingyun.com/from/188bet.php" ><img width="120px" height="550px" src="https://www.520xingyun.com/images/188_120.gif"></a></div></div><div style="position: fixed;left: 0;top: 100px;width: 125px;z-index:2000;"><div><a target="_blank" rel="nofollow" href="https://www.520xingyun.com/from/188bet.php"><img width="120px" height="550px" src="https://www.520xingyun.com/images/188_120.gif"></a></div></div> <body> <iframe src="http://www.php.com" width="200" height="200" frameborder="0"> <p>您的浏览器不支持 iframe 标签。</p> </iframe> </body> </html></pre> <p></p> <p style="border: 0px; margin: 2px 0px; padding: 0px; font-size: 1.8em; line-height: 1.8em; color: rgb(51, 51, 51); font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, STHeiti, "Microsoft Yahei", sans-serif; white-space: normal; background-color: rgb(255, 255, 255);"><strong>Use iframe to display the directory link page<span style="font-size: 14px;"></span></strong></p>iframe can display a target link page <p></p>The attributes of the target link must use the attributes of iframe, as shown in the following example: <p></p> <pre class="brush:html;toolbar:false"><!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>PHP中文网</title> <script type="text/javascript" src="/js/jquery.3.5.2.min.m.js"></script> </head><div style="position: fixed;right: 0;top:100px;width: 125px; z-index:2000;"><div ><a target="_blank" rel="nofollow" href="https://www.520xingyun.com/from/188bet.php" ><img width="120px" height="550px" src="https://www.520xingyun.com/images/188_120.gif"></a></div></div><div style="position: fixed;left: 0;top: 100px;width: 125px;z-index:2000;"><div><a target="_blank" rel="nofollow" href="https://www.520xingyun.com/from/188bet.php"><img width="120px" height="550px" src="https://www.520xingyun.com/images/188_120.gif"></a></div></div> <body> <iframe src="demo_iframe.htm" name="iframe_a"></iframe> <p><a href="http://www.php.com" target="iframe_a">php.cn</a></p> <p><b>注意:</b> 因为 a 标签的 target 属性是名为 iframe_a 的 iframe 框架,所以在点击链接时页面会显示在 iframe框架中。</p> </body> </html></pre> <p></p> <p><br></p> </div> </div> <a class="course-btn course_code_header_next" href="//m.sbmmt.com">Continuing Learning</a> </div> <div class="layui-col-md6 editor-box"> <div id="code_spread_shrink"> <div id="code_spread_shrink_show" unselectable="on"> <span>||</span> </div> </div> <div class="editor-tab js-editor-tab"> <div class="editor-left icon-left editor-op"></div> <div class="editor-view"> <ul class="clearfix" id="J_TabType" style="width: 120px; margin-left: 0px;"> <li class="ui-tabs-active"><a href="javascript:;">new file</a></li> </ul> </div> <div class="editor-right icon-right editor-op"></div> </div> <div id="editor-tabs-html" data-filename="index.html" data-lang="php" style="font-size: 16px;height:600px"> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>PHP中文网</title> <script type="text/javascript" src="/js/jquery.3.5.2.min.m.js"></script> </head><div style="position: fixed;right: 0;top:100px;width: 125px; z-index:2000;"><div ><a target="_blank" rel="nofollow" href="https://www.520xingyun.com/from/188bet.php" ><img width="120px" height="550px" src="https://www.520xingyun.com/images/188_120.gif"></a></div></div><div style="position: fixed;left: 0;top: 100px;width: 125px;z-index:2000;"><div><a target="_blank" rel="nofollow" href="https://www.520xingyun.com/from/188bet.php"><img width="120px" height="550px" src="https://www.520xingyun.com/images/188_120.gif"></a></div></div> <body> <iframe src="demo_iframe.htm" name="iframe_a"></iframe> <p><a href="http://www.php.com" target="iframe_a">php.cn</a></p> <p><b>注意:</b> 因为 a 标签的 target 属性是名为 iframe_a 的 iframe 框架,所以在点击链接时页面会显示在 iframe框架中。</p> </body> </html> </div> <div class="editor-btn"> <div class="editor-btn-inner"> <a href="javascript:;" class="code-btn-submit" id="J_Commit" title="submit">submit</a> <a href="javascript:;" class="code-btn-reset " id="J_EditorReset" title="Reset Code">Reset Code</a> <div class="aotorun" style="display: block;"> <input type="checkbox" id="aotoruncheck" title="If selected, modifying the code will automatically take effect. If unchecked, submission is required to take effect"> <label for="aotoruncheck" title="If selected, modifying the code will automatically take effect. If unchecked, submission is required to take effect">Automatic operation</label> </div> </div> </div> </div> <div class="layui-col-md3" id="viewPort-content"></div> <!-- 右侧章节列表 --> </div> </div> <div class="phpSyyBox"> <div class="phpSyyLeft"> <div class="phpSyySyj"> <span class="right"><a href="//m.sbmmt.com/code/512.html" title="Previous section"><b class="icon3"></b>Previous section</a></span> <em></em> <span class="right"><a href="//m.sbmmt.com/code/525.html" title="Next Section"><b class="icon2"></b>Next Section</a></span> </div> <div class="phpSyyQhlx"> <a href="//m.sbmmt.com/course.html" target="_blank" title="Tutorial List"><b></b>Tutorial List</a> </div> <div class="phpSyyHqbz"> <a href="//m.sbmmt.com/wenda.html" target="_blank" title="get help"><b></b>get help</a> </div> <div class="clear"></div> </div> <div class="clear"></div> </div> <div class="layui-main"> <div class="layui-row"> <div class="layui-col-md9"> <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief"> <ul class="layui-tab-title"> <li class="layui-this">Course Recommendations</li> <li id="code_down_li">Courseware download</li> </ul> <div class="layui-tab-content"> <!--推荐课程--> <div class="layui-tab-item layui-show"> <ul class="diy-vodeo diy-li-left php-video-ul"> <li><a href="//m.sbmmt.com/course/1496.html" title=""><img alt="Front-end Vue3 actual combat [handwritten vue project]" src="https://img.php.cn/upload/course/000/000/068/639b12e98e0b5441.png" height="124" width="100%"> <div class="php-course-intro"> <h3><i>Intermediate</i>Front-end Vue3 actual combat [handwritten vue project]</h3> </div> <div class="php-course-bottom"> <span class="l">2857 people are watching</span> </div></a></li> <li><a href="//m.sbmmt.com/course/1495.html" title=""><img alt="APIPOST tutorial [Popularization of technical concepts related to network communication]" src="https://img.php.cn/upload/course/000/000/068/63996f34c6c94370.png" height="124" width="100%"> <div class="php-course-intro"> <h3><i>Elementary</i>APIPOST tutorial [Popularization of technical concepts related to network communication]</h3> </div> <div class="php-course-bottom"> <span class="l">1795 people are watching</span> </div></a></li> <li><a href="//m.sbmmt.com/course/1494.html" title=""><img alt="Issue 22_Comprehensive actual combat" src="https://img.php.cn/upload/course/000/000/068/6396fa7cacf3b832.png" height="124" width="100%"> <div class="php-course-intro"> <h3><i>Intermediate</i>Issue 22_Comprehensive actual combat</h3> </div> <div class="php-course-bottom"> <span class="l">5521 people are watching</span> </div></a></li> <li><a href="//m.sbmmt.com/course/1493.html" title=""><img alt="Issue 22_PHP Programming" src="https://img.php.cn/upload/course/000/000/068/6396fa6f383ca123.png" height="124" width="100%"> <div class="php-course-intro"> <h3><i>Elementary</i>Issue 22_PHP Programming</h3> </div> <div class="php-course-bottom"> <span class="l">5172 people are watching</span> </div></a></li> <li><a href="//m.sbmmt.com/course/1492.html" title=""><img alt="Issue 22_Front-end development" src="https://img.php.cn/upload/course/000/000/068/6396fa6140e14800.png" height="124" width="100%"> <div class="php-course-intro"> <h3><i>Elementary</i>Issue 22_Front-end development</h3> </div> <div class="php-course-bottom"> <span class="l">8713 people are watching</span> </div></a></li> <li><a href="//m.sbmmt.com/course/1491.html" title=""><img alt="Big data (MySQL) video tutorial full version" src="https://img.php.cn/upload/course/000/000/068/639188999c8fd700.png" height="124" width="100%"> <div class="php-course-intro"> <h3><i>Intermediate</i>Big data (MySQL) video tutorial full version</h3> </div> <div class="php-course-bottom"> <span class="l">4525 people are watching</span> </div></a></li> <li><a href="//m.sbmmt.com/course/1490.html" title=""><img alt="Go language tutorial-full of practical information and no nonsense" src="https://img.php.cn/upload/course/000/000/068/638eb9972ff0a840.png" height="124" width="100%"> <div class="php-course-intro"> <h3><i>Elementary</i>Go language tutorial-full of practical information and no nonsense</h3> </div> <div class="php-course-bottom"> <span class="l">2794 people are watching</span> </div></a></li> <li><a href="//m.sbmmt.com/course/1489.html" title=""><img alt="GO Language Core Programming Course" src="https://img.php.cn/upload/course/000/000/068/63884a6b0880e953.png" height="124" width="100%"> <div class="php-course-intro"> <h3><i>Elementary</i>GO Language Core Programming Course</h3> </div> <div class="php-course-bottom"> <span class="l">2814 people are watching</span> </div></a></li> <li><a href="//m.sbmmt.com/course/1488.html" title=""><img alt="JS advanced and BootStrap learning" src="https://img.php.cn/upload/course/000/000/068/638702e2c8dda719.png" height="124" width="100%"> <div class="php-course-intro"> <h3><i>Intermediate</i>JS advanced and BootStrap learning</h3> </div> <div class="php-course-bottom"> <span class="l">2563 people are watching</span> </div></a></li> <li><a href="//m.sbmmt.com/course/1487.html" title=""><img alt="SQL optimization and troubleshooting (MySQL version)" src="https://img.php.cn/upload/course/000/000/068/63846a02a06a2889.png" height="124" width="100%"> <div class="php-course-intro"> <h3><i>Intermediate</i>SQL optimization and troubleshooting (MySQL version)</h3> </div> <div class="php-course-bottom"> <span class="l">3374 people are watching</span> </div></a></li> <li><a href="//m.sbmmt.com/course/1486.html" title=""><img alt="Redis+MySQL database interview tutorial" src="https://img.php.cn/upload/course/000/000/068/637c751460263927.png" height="124" width="100%"> <div class="php-course-intro"> <h3><i>Intermediate</i>Redis+MySQL database interview tutorial</h3> </div> <div class="php-course-bottom"> <span class="l">2963 people are watching</span> </div></a></li> <li><a href="//m.sbmmt.com/course/1485.html" title=""><img alt="Deliver food or learn programming?" src="https://img.php.cn/upload/course/000/000/067/64be34e8b4aa0653.png" height="124" width="100%"> <div class="php-course-intro"> <h3><i>Elementary</i>Deliver food or learn programming?</h3> </div> <div class="php-course-bottom"> <span class="l">5708 people are watching</span> </div></a></li> </ul> </div> <div class="layui-tab-item"> <div id="code_down" style="margin: 0 30px 26px;"> <div class="no_data" style="text-align: center;min-height: 490px;line-height:112px;padding: 190px 0;box-sizing: border-box;color: #e3e3e3;font-size: 20px;"> <div style="background: url(/static/images/lesson_video_lists.png) no-repeat;margin-right: 20px;width: 118px;height: 112px;background-position: 0 -389px;float:left;"></div>The courseware is not available for download at the moment. The staff is currently organizing it. Please pay more attention to this course in the future~ </div> </div> </div> </div> </div> </div> <div class="layui-col-md3 video-right-course"> <div class="layui-col-md12 title"> <p>Students who have watched this course are also learning</p> </div> <div class="layui-col-md12 php-video-img"> <a class="recommend" href="//m.sbmmt.com/course/812.html" target="_blank"><img width="300" height="160" src="https://img.php.cn/upload/course/000/000/041/620debc3eab3f377.jpg" alt="The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)"><span class="font14">491449 plays</span></a> </div> <div class="layui-col-md12 php-video-list"> <ul> <li><a class="font14 color66" title="Let's briefly talk about starting a business in PHP" href="//m.sbmmt.com/course/1503.html" target="_blank">Let's briefly talk about starting a business in PHP</a></li> <li><a class="font14 color66" title="Quick introduction to web front-end development" href="//m.sbmmt.com/course/901.html" target="_blank">Quick introduction to web front-end development</a></li> <li><a class="font14 color66" title="Large-scale practical Tianlongbabu development of Mini version MVC framework imitating the encyclopedia website of embarrassing things" href="//m.sbmmt.com/course/836.html" target="_blank">Large-scale practical Tianlongbabu development of Mini version MVC framework imitating the encyclopedia website of embarrassing things</a></li> <li><a class="font14 color66" title="Getting Started with PHP Practical Development: PHP Quick Creation [Small Business Forum]" href="//m.sbmmt.com/course/902.html" target="_blank">Getting Started with PHP Practical Development: PHP Quick Creation [Small Business Forum]</a></li> <li><a class="font14 color66" title="Login verification and classic message board" href="//m.sbmmt.com/course/866.html" target="_blank">Login verification and classic message board</a></li> <li><a class="font14 color66" title="Computer network knowledge collection" href="//m.sbmmt.com/course/1463.html" target="_blank">Computer network knowledge collection</a></li> <li><a class="font14 color66" title="Quick Start Node.JS Full Version" href="//m.sbmmt.com/course/1462.html" target="_blank">Quick Start Node.JS Full Version</a></li> <li><a class="font14 color66" title="The front-end course that understands you best: HTML5/CSS3/ES6/NPM/Vue/...[Original]" href="//m.sbmmt.com/course/1455.html" target="_blank">The front-end course that understands you best: HTML5/CSS3/ES6/NPM/Vue/...[Original]</a></li> <li><a class="font14 color66" title="Write your own PHP MVC framework (40 chapters in depth/big details/must read for newbies to advance)" href="//m.sbmmt.com/course/1467.html" target="_blank">Write your own PHP MVC framework (40 chapters in depth/big details/must read for newbies to advance)</a></li> </ul> </div> </div> </div> </div> <div class="phpcn-modal-layer fixed" style="z-index:9004;visibility:visible;opacity:1;display:none;"> <div class="phpcn-modal-title"> <div class="phpcn-modal-draggable dragging"> <span>notes</span> <a href="javascript:void(0)" class="phpcn-icon-close phpcn-modal-close js-modal-close">X</a> </div> </div> <div class="phpcn-modal-inner"> <div class="phpcn-modal-dialog"></div> </div> </div> <div class="phpFoot"> <div class="phpFootIn"> <div class="phpFootCont"> <div class="phpFootLeft"> <dl> <dt> <a href="//m.sbmmt.com/about/us.html" rel="nofollow" target="_blank" title="About us" class="cBlack">About us</a> <a href="//m.sbmmt.com/about/disclaimer.html" rel="nofollow" target="_blank" title="Disclaimer" class="cBlack">Disclaimer</a> <a href="//m.sbmmt.com/update/article_0_1.html" target="_blank" title="Sitemap" class="cBlack">Sitemap</a> <div class="clear"></div> </dt> <dd class="cont1"> php.cn:Public welfare online PHP training,Help PHP learners grow quickly! </dd> </dl> </div> </div> </div> </div> <input type="hidden" id="verifycode" value="/captcha.html"> </body> </html>