HTML <frame> tag
Examples
Simple three-page framework:
<frame src="frame_a.htm">
<frame src="frame_b.htm">
<frame src="frame_c.htm">
</frameset>
try it"
(For more examples, see the bottom of the page)
Browser Support
All major browsers support <frame> tag.
Tag definitions and instructions
HTML5 does not support the <frame> tag.
<Frame> tag defines the <frameset> sub window (frame).
<Frameset> each <frame> can set different properties, such as border, scrolling, noresize like.
Note: If you want to verify that the page contains frames, make sure that the <DOCTYPE!> Is set to "HTML Frameset DTD" or "XHTML Frameset DTD".
Differences between HTML 4.01 and HTML5
HTML5 does not support the <frame> tag, HTML 4.01 support <frame> tag.
Differences between HTML and XHTML
In HTML, <frame> tag has no end tag. In XHTML, <frame> tag must be closed properly.
Optional attributes
属性 | 值 | 描述 |
---|---|---|
frameborder | 0 1 |
HTML5 不支持。规定是否显示框架周围的边框。 |
longdesc | URL | HTML5 不支持。规定一个包含有关框架内容的长描述的页面。 |
marginheight | pixels | HTML5 不支持。规定框架的上方和下方的边距。 |
marginwidth | pixels | HTML5 不支持。规定框架的左侧和右侧的边距。 |
name | name | HTML5 不支持。规定框架的名称。 |
noresize | noresize | HTML5 不支持。规定无法调整框架的大小。 |
scrolling | yes no auto |
HTML5 不支持。规定是否在框架中显示滚动条。 |
src | URL | HTML5 不支持。规定在框架中显示的文档的 URL。 |
Standard property
In HTML 4.01, <frame> tag supports the following standard attributes:
属性 | 值 | 描述 |
---|---|---|
class | classname | 规定元素的类名 |
id | id | 规定元素的唯一 id |
style | style_definition | 规定元素的行内样式 |
title | text | 规定元素的额外信息 |
For a full description, go to Standard property .
Event Properties
According to the W3C standards, in HTML 4.01, <frame> tag does not support any event attributes.
However, all browsers support onload event.
For a full description, go to Event Attributes .
Try - Example
Horizontal frame
This example demonstrates: how to use three different document production a horizontal frame.
Mixed framework
This example demonstrates how to create a frame containing three documents, while mixing them placed among the rows and columns.
Containing noresize = "noresize" frame structure property
This example demonstrates noresize property. In this case, the frame can not be resized. On the border between the frame and drag the mouse, you will find that the border can not be moved.