HTML IFrame Tag

IFrame 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.

Web programmers can change frame contents through IFrame using client side scripting language like JavaScript without requiring the website to be reloaded.You can even embed a video on your site and that other webpage of video will not appear as a full webpage but will look like it is a part of your page.

Why IFrames?

  • Used for inclusion of external objects inclusing HTML documents.
  • It helps improving performance of website.
  • IFrame works even if Javascript is disabled in any computer.
  • Used to insert contents such as an advertisement, into a Web page.
  • IFrame givens more security to advertisers.

Disadvantages of using IFrames

  • It lowers your Search Engine Optimization score.
  • Performace isnot upto the mark.
  • Some browsers do not support iframes.
<form>
	<img src="image link here.." alt="image Name here..">
</form>

Example

<!DOCTYPE html>
<html>
<head>
<title>My HTML Image Tag Example</title>
</head>
<iframe src="html-phrase-tag-Live-Demo.php" width="800" height="300" />
</html>

This will produce following result

HTML IFrame Attributes List

The below table contains HTML IFrame Attributes and their description which is supported by HTML version.

Attribute NameAttribute ValueAttribute Description
srcURLrefers to the url of the document to be loaded into the iframe
heightpixelsrefers to the height of an iframe
widthpixelsrefers to the width of an iframe
aligntop,middle,bottom,left,rightrefers to the the alignment of an iframe with respect to surrounding elements
marginheightpixelsrefers to space to be left at the top and bottom sides of the iframe
marginwidthpixelsrefers to space to be left along the sides of the iframe
nametextrefers to a name for the iframe
scrollingpixelsrefers to to decide whether to have scrollbarsin a iframe
longdescURLrefers to URL to the document containing long description of the iframe
frameborderpixelsrefers to whether borders of the iframe are shown

See Also

HTML Form Tags
HTML Page Formating Tags
HTML Other Tags


 
 
SHARE THIS IF YOU LIKE!
submit to reddit

SUBSCRIBE FOR LATEST UPDATES
HAVE WE CONNECTED ON FACEBOOK?
TOP TUTORIALSTOP CODE EXAMPLESTOP LIVE DEMOLINKSSTAY CONNECTED
HTML Tutorial
HTML5 Tutorial
Bootstrap3 Tutorial
Javascript Tutorial
TypeScript Tutorial
AngularJS Tutorial
CSharp Tutorial
PHP Tutorial
Developer Tools
Javascript
AngularJS
Google MAP API V3
ASP.NET
Javascript
AngularJS
Google MAP API V3
Contact Us
Advertise with Us
Privacy Policy
Disclaimer
Stay connected. We actually like you. If you want to get up to the minute updates, then connect with us on your fav below.
 
Twitter   Linkedin   Facebook   Google+    RSS   Pinterest
 
Protected by Copyscape Original Content Checker
 
 
Copyright ©2017 www.techstrikers.com Unauthorized reproduction/replication of any part of this site is prohibited.