LERAN HTML COMPLETE

Learn one of the most powerful programming languages in the world and become a rockstar developer.

HTML Iframes


What is iframe

An iframe or inline frame is used to display external objects including other web pages within a web page. The basic syntax for adding an iframe can be given with:

Iframe Syntax

An HTML iframe is defined with the <iframe> tag:

<iframe src="URL"></iframe>

Setting Width and Height of an iframe

Example

<iframe src="https://adzetech.com" height="200" width="300"></iframe>
								  

Iframe - Remove the Border

By default, an iframe has a border around it.

To remove the border, add the style attribute and use the CSS border property:

Example

<iframe src="https://adzetech.com" style="border:none;"></iframe>
								  

Iframe - Target for a 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

<iframe src="https://adzetech.com" name="iframe_a"></iframe>

<p><a href="https://www.adzetech.com" target="iframe_a">Adzetech.com</a></p>

Adzetech.com



x
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Privacy Policy That's Fine