Begin Web Programming with PHP & MySQL

Advertisements



HTML Frames

HTML <frame> tag defines a specific area within an HTML file where another HTML web page can be displayed. <frame> is not supported in HTML5. A <frame> tag is used with <frameset>, and <frame> divides a webpage into many frames and each frame can contain web pages. When we use frameset, we split the view area of the browser into multiple frames and each frame has its own contents.

Eg:
<!DOCTYPE html>
<html>
<head>
<title>Frames</title>
</head>
<frameset cols="25%,50%,25%">
<frame src="page1.html" >
<frame src="page2.html">
<frame src="page3.html">
</frameset>
</html>

iframe

Use the <iframe> tag to embed another document within the current HTML document. An iframe embeds a frame directly inline with the other HTML elements of a web page.
Syntax: <iframe src="url" title="frame text"></iframe>
Eg:

<iframe src="https://startrackdatarecovery.com/" height="400" width="400" title="sample iframe"></iframe>

Output: