HTML <frame> tag (Not supported in HTML5)

HTML <frame> tag define the particular area within an HTML file where another HTML web page can be displayed.

A <frame> tag is used with <frameset>, and it divides a webpage into multiple sections or frames, and each frame can contain different web pages.

Note: Do not use HTML <frame> tag as it is not supported in HTML5, instead you can use <iframe> or <div> with CSS to achieve similar effects in HTML.

Syntax

Following are some specifications about the HTML <frame> tag

DisplayBlock
Start tag/End tagStart tag(required), End tag(forbidden)
UsageFrames

Example 1

Create Vertical frames:

Test it Now

Output:

HTML frame tag

Frame1.html

Frame2.html

Frame3.html

Example 2:

Create Horizontal frames:

Test it Now

Output:

HTML frame tag

Attribute

Tag-specific attribute

AttributeValueDescription
frameborder0
1
It specifies whether to display a border around the frame or not, and its default value is 1
longdsecURLIt specifies a page which contains the long description of the content of the frame.
marginheightpixelsIt specifies the top and bottom margins of the frame.
marginwidthpixelsIt defines the height of the margin between frames.
nametextIt is used to assign the name to the frame.
noresizenoresizeIt is used to prevent resizing of the frame by the user.
scrollingyes
no
auto
It specifies the existence of the scrollbar for overflowing content.
srcURLIt specifies the URL of the document which we want to display in a frame.

Supporting Browsers

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
<frame>YesYesYesYesYes




Latest Courses