HTML Iframes
To display a web page within another web page used iframe tag.
<iframe> tag is used to define iframe in HTML, in which tag browser display a separate document, src attribute is used to specify the URL of the document .
Syntex
<iframe src=”PageURL“></iframe>
Example
<!DOCTYPE html>
<html>
<head>
<title>Title</title>
</head>
<body>
<p>content goes here</p>
<iframe src="pagename.htm" width="100" height="100"></iframe>
</body>
</html>
<Iframe> Tag Attributes
name, class,id, longdesc, marginheight, marginwidth, name, scrolling, style, are attributes of the <frame> tag
src : src is used to give the file name that should be loaded in the frame. For example, src=”page.htm” .
name : name is used to give iframe name.
frameborder : frameborder attribute is used to specifies the borders of the frame.
marginwidth : width attribute is used to specify the width of the frame. The value is given in pixels.example marginwidth=”30″.
marginheight : height attribute is used to specify the height of the frame. The value is given in pixels. example marginheight=”30″.