4-HTML Iframes and Link
4-HTML Iframes and Link
iframe
• The iframe tag in HTML stands for Inline Frame and is used to embed another
HTML document within the current document. It supports various attributes
for specifying dimensions, borders, scrolling, and more to customize the
appearance and behavior of the embedded content.
Syntax:
<iframe src="URL" title="description"></iframe>
Attributes value:
It contains a single value URL that specifies the URL of the document
that is embedded in the iframe. There are two types of URL links which
are listed below:
URL
The height and width attributes are used to specify the size of the
iframe. The attribute values are specified in pixels by default, but they
can also be specified in percentages like ” 80% “.
<!DOCTYPE html>
<html>
<body>
<h1>Conference</h1>
<h2>HTML iframe Tag</h2>
<p>
Content goes here
</p>
<iframe src="https://sarc.net.in/Tentativeprogramme.php"
height="300"
width="400">
</iframe>
</body>
</html>
Border
style="border: 4px solid orange“
Link
An iframe can be used as the target frame for a link. The target
attribute of the link must refer to the name attribute of the iframe.
Example
<!DOCTYPE html>
<html>
<body>
<h1>Conference</h1>
<p>
</p>
height="300"
width="350"
name="iframe_a">
</iframe>
<p>
<a href="https://sarc.net.in/Tentativeprogramme.php"
target="iframe_a">
GeeksforGeeks IDE
</a>
</p>
</body>
</html>