TheDeveloperBlog.com

Home | Contact Us

C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML

HTML frame Tag

HTML frame Tag with html tutorial, tags, anchor, img, div, entity, textarea, marquee, p tag, heading tag, h1, h2, table, formatting, attribute, elements, ol, ul, Input Types, block element tag, inline element tag, html tags, phrase tag, head, body, form, lists, symbols etc.

<< Back to HTML

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

< frame src = "URL" >

Following are some specifications about the HTML <frame> tag

Display Block
Start tag/End tag Start tag(required), End tag(forbidden)
Usage Frames

Example 1

Create Vertical frames:

<!DOCTYPE html>
<html>
<head>
	<title>Frame tag</title>
</head>
  <frameset cols="25%,50%,25%">
  	<frame src="frame1.html" >
  	<frame src="frame2.html">	
  	<frame src="frame3.html">
  </frameset>
</html>
Test it Now

Output:

HTML frame tag

Frame1.html

<!DOCTYPE html>
<html>
<head>
	<style>
	   div{
                            background-color: #7fffd4; 
	   	 height: 500px;
	   	}
	</style>
</head>
<body>
	<div>
		<h2>This is first frame</h2>
	</div>
 </body>
</html>

Frame2.html

<!DOCTYPE html>
<html>
<head>
	<style>
	   div{
	   	 background-color: #2f4f4f; 
	   	 height: 500px;

	   }
	</style>
</head>
<body>
	<div>
		<h2>This is Second frame</h2>
	</div>
 </body>
</html>

Frame3.html

<!DOCTYPE html>
<html>
<head>
	<style>
	   div{
	   	 background-color: #c1ffc1; 
	   	 height: 500px;
                      }
	</style>
</head>
<body>
                <div>
	      <h2>This is Third frame</h2>
	</div>
 </body>
</html>

Example 2:

Create Horizontal frames:

<!DOCTYPE html>
<html>
<head>
	<title>Frame tag</title>
</head>
  <frameset rows="30%, 40%, 30%">
  	<frame name="top" src="frame1.html" >
  	<frame name="main" src="frame2.html">	
  	<frame name="bottom" src="frame3.html">
  </frameset>
</html>
Test it Now

Output:

HTML frame tag

Attribute

Tag-specific attribute

Attribute Value Description
frameborder 0
1
It specifies whether to display a border around the frame or not, and its default value is 1
longdsec URL It specifies a page which contains the long description of the content of the frame.
marginheight pixels It specifies the top and bottom margins of the frame.
marginwidth pixels It defines the height of the margin between frames.
name text It is used to assign the name to the frame.
noresize noresize It is used to prevent resizing of the frame by the user.
scrolling yes
no
auto
It specifies the existence of the scrollbar for overflowing content.
src URL It 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
Next TopicHTML Frameset Tag




Related Links:


Related Links

Adjectives Ado Ai Android Angular Antonyms Apache Articles Asp Autocad Automata Aws Azure Basic Binary Bitcoin Blockchain C Cassandra Change Coa Computer Control Cpp Create Creating C-Sharp Cyber Daa Data Dbms Deletion Devops Difference Discrete Es6 Ethical Examples Features Firebase Flutter Fs Git Go Hbase History Hive Hiveql How Html Idioms Insertion Installing Ios Java Joomla Js Kafka Kali Laravel Logical Machine Matlab Matrix Mongodb Mysql One Opencv Oracle Ordering Os Pandas Php Pig Pl Postgresql Powershell Prepositions Program Python React Ruby Scala Selecting Selenium Sentence Seo Sharepoint Software Spellings Spotting Spring Sql Sqlite Sqoop Svn Swift Synonyms Talend Testng Types Uml Unity Vbnet Verbal Webdriver What Wpf