Program Code – Using Frames

This code is written in basic HTML(HyperText Markup Language).

<iframe> tag

  • The HTML <iframe> tag specifies an inline frame
  • The src attribute defines the URL of the page to embed
  • Always include a title  attribute (for screen readers)
  • The height and width attributes specifies the size of the iframe

After saving all the codes in the specified name, run Framemain.html to see the result.

<html>
<head>
</head>
<body>
<h1>Frames</h1>
<form name = "fr">
<a href ="yahoo.html" target = "sample">Yahoo</a>
<a href ="vista.html" target = "sample">ltavista</a>
<a href ="seek.html" target = "sample">Infoseek</a>
</form>
</body>

</html>
<html>
<head>
<title>Using Frames </title>
</head>
<body>
	<frameset>
		<iframe src="frame.html" title="description" target="_self" width="100%" height="40%"></iframe>
		<iframe src =""  width = "100%" height = "40%" name ="sample"></iframe>
	</frameset>
	
</body>
</html>
<HTML>
 <BODY bgcolor  ="pink">
 <h1>WELCOME TO YAHOO WEBSEARCH  </h1>
 </BODY>
</HTML>
<HTML>
 <BODY bgcolor  ="gray">
 <h1>WELCOME TO VISTA WEBSEARCH</h1>
    </BODY>
</HTML>

<HTML>
  <BODY bgcolor  ="lightgreen">
 <h1>WELCOME TO YAHOO WEBSEARCH</h1>
</BODY>
</HTML>

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.