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 aIframe - Set height and width
##The height and width attributes are used to define the height and width of the iframe tag. The property defaults to pixels, but you can specify that it be displayed proportionally (e.g.: "80%").PHP中文网 一些旧的浏览器不支持 iframe。
如果浏览器不支持 iframes 则不会显示。
Iframe - Remove borders
The frameborder attribute is used to define whether the iframe indicates whether to display the border. Set the attribute value to "0" to remove the border of the iframe:PHP中文网
Use iframe to display the directory link page
iframe can display a target link page The attributes of the target link must use the attributes of iframe, as shown in the following example:PHP中文网 注意: 因为 a 标签的 target 属性是名为 iframe_a 的 iframe 框架,所以在点击链接时页面会显示在 iframe框架中。