iFrame element is used to embed content from another source into HTML Document . they commonly used for advertisement.

Here is how to create iframe. iframe is self closing website.

Note

  • iFrames are used in many hacking techniques

Lot of Major websites have disabled iFrame due to security reasons. Since we embed another webpage within our webpage, common hacking technique is that u can have this iframe into ur entire webpage. u can act like another website and capture the user information

example : u can embed bank site inside iFrame and add that to ur webpage and capture user inputs.

www.bing.com is supportive to iFrame. We can embed bing.com to our website like this :

<iframe src="https://www.bing.com">

We can change Width and Height by adding Width and Height Attributes.

<iframes src="https://www.bing.com" width="750" height="250">


We can add our own webpage other than external webpages. To do that we can use this code

<iframe src="index.html">