how can use iframe in html

0 votes
asked Jun 5, 2010 by mubeen

what is iframe and how can we use it in html.....

3 Answers

0 votes
answered Jun 5, 2010 by gshenanigan

An iframe is an object that allows you to embed external content in your HTML page. You can use it to display other web pages, documents (e.g. PDF) etc (although for complex media types you may want to try the object tag instead).

You can add an iframe to your page like so:

<iframe src ="externalContent.html" width="400" height="300">
  <p>Your browser does not support iframes.</p>

The p tag inside will display if iframes are not supported by the browser being used.

0 votes
answered Jun 5, 2010 by mathias-bynens

The iframe element denotes an inline frame, simple as that.

Example usage:

<iframe src="foo.html">
 <p>Your browser does not support <code>iframe</code> elements.</p>
0 votes
answered Sep 15, 2017 by saurabh-chandra-pate

Example of iframe -

Example with url :

<iframe src="" target="_parent" width="500" height="270" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></iframe>

Example with content :

<iframe id="FileFrame" src="about:blank">

NB : iframe need some security awareness. css and js does not have control over inner part of iframe and this is advantage of iframe ( some time )

Welcome to Q&A, where you can ask questions and receive answers from other members of the community.
Website Online Counter