HTML <frame>
Tag Not Supported in HTML5
Topic: HTML5 Tags ReferencePrev|Next
Description
The <frame>
tag defines a single frame within a <frameset>
. Each <frame>
in a <frameset>
can have different attributes, such as border, scrolling, the ability to resize, etc.
The following table summarizes the usages context and the version history of this tag.
Parent: | <frameset> |
---|---|
Placement: | Block |
Content: | None. It is an empty element. |
Start/End Tag: | Start tag: required, End tag: forbidden |
Version: | HTML 4 and 4.01 (frameset) |
Warning: Do not use this tag since it is a non-standard tag. This tag has been removed in HTML5 and shouldn't be used anymore. Use HTML <iframe>
, instead.
Syntax
The basic syntax of the <frame>
tag is given with:
The example below shows the <frame>
tag in action.
Example
Try this code »<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>This is a frameset document</title>
</head>
<frameset>
<frame src="sample-a.html" name="frame-a">
<frame src="sample-b.html" name="frame-b">
</frameset>
</html>
Tag-Specific Attributes
The following table shows the attributes that are specific to the <frame>
tag.
Attribute | Value | Description |
---|---|---|
frameborder |
0 |
Instructs the browser whether or not to display a border around the frame. The default value 1 . |
longdesc |
URL | Specifies a link to a long description of the frame. |
marginheight |
pixels | Specifies the amount of space to be left between the frame's contents in its top and bottom margins. |
marginwidth |
pixels | Specifies the amount of space to be left between the frame's contents in its left and right margins. |
name |
text | Assigns a name to the current frame. |
noresize |
noresize |
This boolean attribute specifies that the frame window is not resizable by the users. |
scrolling |
yes |
Specifies whether overflowing content in frame causes scroll bars to appear or not. |
src |
URL | Specifies the location of the document to show inside a frame. |
Browser Compatibility
The <frame>
tag is supported in all major modern browsers.
Basic Support—
|
Further Reading
See tutorial on: HTML Iframes.
Related tags: <frameset>
, <iframe>
.