HTML IFrame Tag is an abbreviation of In-Line Frames which is used to embed one HTML document inside another HTML document. It is generally used to overcome the disadvantages of using Frames. It is also used for displaying advertising content or for the purpose of comparing two or multiple HTML documents.
<form> <img src="image link here.." alt="image Name here.."> </form>
<!DOCTYPE html> <html> <head> <title>My HTML Image Tag Example</title> </head> <iframe src="html-phrase-tag-Live-Demo.php" width="100%" height="300" /> </html>
This will produce following result
The below table contains HTML IFrame Attributes and their description which is supported by HTML version.
|Attribute Name||Attribute Value||Attribute Description|
|src||URL||refers to the url of the document to be loaded into the iframe|
|height||pixels||refers to the height of an iframe|
|width||pixels||refers to the width of an iframe|
|align||top,middle,bottom,left,right||refers to the the alignment of an iframe with respect to surrounding elements|
|marginheight||pixels||refers to space to be left at the top and bottom sides of the iframe|
|marginwidth||pixels||refers to space to be left along the sides of the iframe|
|name||text||refers to a name for the iframe|
|scrolling||pixels||refers to to decide whether to have scrollbarsin a iframe|
|longdesc||URL||refers to URL to the document containing long description of the iframe|
|frameborder||pixels||refers to whether borders of the iframe are shown|