HTML 4 frame Tag
Obsolete in HTML5
This tag is obsolete in HTML5, so it's best to avoid using it.
The HTML frame
tag is used to specify each frame within a frameset. For example, you can have a left frame for navigation and a right frame for the main content. For each frame, you specify the frame with the frame tag.
Also see:
- HTML
iframe
tag for inline frames - HTML
noframes
tag for how to deal with browser that don't support frames. - Frames templates for a quick and easy frames-based website.
Frames are not supported in HTML 5 due to the usability issues that they have caused. Despite this, HTML 5 still allows the <iframe>
tag.
Example
Attributes
Attributes specific to this tag: | |
---|---|
Attribute | Description |
name | Assigns a name to a frame. This is useful for loading contents into one frame from another. |
longdesc | A long description - this can elaborate on a shorter description specified with the title attribute. |
src | Location of the frame contents (for example, the HTML page to be loaded into the frame). |
noresize | Specifies whether the frame is resizable or not (i.e. whether the user can resize the frame or not). |
scrolling | Whether the frame should be scrollable or not (i.e. should scrollbars appear). Possible values:
|
frameborder | Whether the frame should have a border or not. Possible values:
|
marginwidth | Specifies the margin, in pixels, between the frame's contents and it's left and right margins. |
marginheight | Specifies the margin, in pixels, between the frame's contents and it's top and bottom margins. |
Other Attributes: | |
Attribute | Description |
class | Document wide identifier. |
id | Document wide identifier |
title | Specifies a title to associate with the element. Many browsers will display this when the cursor hovers over the element (similar to a "tool tip"). |
style | Inline style (CSS) |
HTML5 Tags
The information on this page is based on HTML version 4.01. Most modern browsers now support HTML5, which is the next version of HTML after HTML 4.01.
Also see this list of HTML 5 tags for the latest version of HTML.