HTML tag - Not supported in HTML5
Example
A simple page with three frames:
Try it »
(More examples are at the bottom of the page)
Browser support

All major browsers support the tag.
Tag Definition and Usage Notes
HTML5 does not support the tag.
The tag defines a sub-window (frame) in a . Each in the can have different attributes, such as border, scrolling, noresize, and so on.**Note:** If you want to validate a page that contains frames, make sure is set to "HTML Frameset DTD" or "XHTML Frameset DTD".
Differences between HTML 4.01 and HTML5
HTML5 does not support the tag; HTML 4.01 supports it.
Differences between HTML and XHTML
In HTML, the tag has no closing tag. In XHTML, the tag must be closed properly.
Optional Attributes
| property | Value | Description |
|---|---|---|
| frameborder | 0 | |
| 1 | Not supported in HTML5. Specifies whether to display a border around the frame. | |
| longdesc | URL | Not supported in HTML5. Specifies a page containing a long description of the frame's content. |
| marginheight | pixels | Not supported in HTML5. Specifies the margins above and below the frame. |
| marginwidth | pixels | Not supported in HTML5. Specifies the margins to the left and right of the frame. |
| name | name | Not supported in HTML5. Specifies the name of the frame. |
| noresize | noresize | Not supported in HTML5. Specifies that the frame cannot be resized. |
| scrolling | yes |
no
auto | HTML5 does not support。Specifies是否在框架to display scrollbars in. |
| src | URL | Not supported in HTML5. Specifies the URL of the document displayed in the frame. |
Standard Attributes
In HTML 4.01, the tag supports the following standard attributes:
| property | Value | Description |
|---|---|---|
| class | classname | Specifies the class name of an element |
| id | id | Specifies the unique id of an element |
| style | style_definition | Specifies the inline style of an element |
| title | text | Specifies extra information about an element |
For a complete description, please visitStandard Attributes.
Event attribute
According to the W3C standard, in HTML 4.01, the tag does not support any event attributes.
However, all browsers support the onload event.
For a complete description, please visitEvent attribute.
Try it - Example
Horizontal frames
This example demonstrates how to create a horizontal frame using three different documents.
Mixed-structure frames
This example demonstrates how to create a frameset with three documents, mixing them in rows and columns.
A frameset with the noresize="noresize" attribute
This example demonstrates the noresize attribute. In this example, the frames cannot be resized. If you drag the mouse over the border between the frames, you will find that the border cannot be moved.