Significance of Iframe in HTML :
The iframe in HTML stands for Inline Frame. The ” iframe ” tag defines a rectangular region within the document in which the browser can display a separate document, including scrollbars and borders. An inline frame is used to embed another document within the current HTML document.
The ‘ src ‘ attribute is used to specify the URL of the document that occupies the iframe.
Setting Height and Width in Iframe :
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 percentage like ” 80% “.
Removing the Border in Iframe :
By default, iframe has a border around it. To remove the border, we must use the style attribute and use the CSS border property.
Changing the size, style, and color of the Iframe’s border :
Target for a Link using Iframe :
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.
Before clicking the link text:
After Clicking link text:
Supported Browser: The <iframe> tag is supported by listed browsers:
- Google Chrome
- Internet Explorer
- Alternative to iFrames in HTML5
- Inline HTML Helper - HTML Helpers in ASP.NET MVC
- HTML Course | Structure of an HTML Document
- HTML | <html> xmlns Attribute
- HTML | DOM HTML Object
- HTML Course | Basics of HTML
- What is the difference between <html lang="en'> and <html lang="en-US'> ?
- HTML 5 | <bdi> Tag
- PHP vs HTML
- HTML | <ul> Tag
- HTML | <kbd> Tag
- HTML | <em> Tag
- HTML | <ol> Tag
- HTML | <dfn> Tag
- Div Tag | HTML
- HTML | li Tag
- HTML vs XML
- HTML | <hr> Tag
- HTML | dt Tag
- HTML | th Tag
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.