How to embed another webpage in your site via iframe

HTML Iframes tag

An iframe is used to display a another web page in your site . 


Example

An HTML iframe is defined by the <iframe> tag:

<iframe src="url"></iframe>


Set Iframes Height and Width


Use the height and width characteristics to specify the size of the iframe.
Attribute values are specified by pixels by default, but they can be in percent (like "80%")

Example

<iframe src="test.html" height="200" width="300"></iframe>

or

<iframe src="test.html" style="height : 200px; width : 300px;"></iframe>


Remove the Iframes default border 

Example

<iframe src="test.html"  style="border:none;"></iframe>

You can also change iframe's border color , style and size , with CSS

Example

<iframe src="test.html"  style="border:1px solid  blue;"></iframe>

Target link for a iframe

<iframe src="test.html" name="iframe_a"></iframe>
<p><a href="https://webcoding-healthtips.blogspot.in" target="iframe_a">Web Coding and Health Tips</a></p> 

Comments