HTML <frame> Tag

HTMLWeb DevelopmentFront End Technology

The <frame> tag is used to create a frame and defines one window frame in a <frameset>.

Note − The <frame> tag deprecated in HTML5.

AttributeDescription
frameborderDisplay a border around a frame
longdescPage that contains a long description of the content of a frame
marginheightTop and bottom margins of a frame
marginwidthLeft and right margins of a frame
nameName of a frame
noresizeA frame is not resizable
scrollingWhether or not to display scrollbars in a frame
srcURL of the document to show in a frame

Let us now see an example to implement the tag.

Example

 Live Demo

<!DOCTYPE html>
<html>
<frameset cols="30%,30%,20%,20%">
   <frame src="https://www.tutorialspoint.com/codingground.htm">
   <frame src="https://store.tutorialspoint.com/">
   <frame src="https://www.tutorialspoint.com/tutorialslibrary.htm">
   <frame src="https://www.tutorialspoint.com/programming_examples/">
</frameset>
</html>

Output

This will produce the following output displaying different pages in individual frames −

In the above example, we have four frames in a frameset −

<frameset cols="30%,30%,20%,20%">
   <frame src="https://www.tutorialspoint.com/codingground.htm">
   <frame src="https://store.tutorialspoint.com/">
   <frame src="https://www.tutorialspoint.com/tutorialslibrary.htm">
   <frame src="https://www.tutorialspoint.com/programming_examples/">
</frameset>

The frames are given the following divisions inside the frameset on the basis of % −

frameset cols="30%,30%,20%,20%">
raja
Updated on 12-Jun-2020 07:02:57

Advertisements