Tutorial by Examples

The term "IFrame" means Inline Frame. It can be used to include another page in your page. This will yield a small frame which shows the exact contents of the base.html. <iframe src="base.html"></iframe>
The IFrame can be resized using the width and height attributes, where the values are represented in pixels (HTML 4.01 allowed percentage values, but HTML 5 only allows values in CSS pixels). <iframe src="base.html" width="800" height="600"></iframe>
Normally a change of webpage within an Iframe is initiated from with the Iframe, for example, clicking a link inside the Ifame. However, it is possible to change an IFrame's content from outside the IFrame. You can use an anchor tag whose href attribute is set to the desired URL and whose target at...
The srcdoc attribute can be used (instead of the src attribute) to specify the exact contents of the iframe as a whole HTML document. This will yield an IFrame with the text "IFrames are cool!" <iframe srcdoc="<p>IFrames are cool!</p>"></iframe> If the...
The following embeds an untrusted web page with all restrictions enabled <iframe sandbox src="http://example.com/"></iframe> To allow the page to run scripts and submit forms, add allow-scripts and allow-forms to the sandbox attribute. <iframe sandbox="allow-script...

Page 1 of 1