Html Iframe

What is html iframe

We are all known to photo frames. If a simple photo playes under a frame, It may be look better. At html it has also a frame. Html has also its frame named html iframe. html iframe works for display a web page within a web page. For example you can see the following example:

Syntax for html iframe: <iframe src=”URL for you page“></iframe>

Height and width of html iframe:

The height and width attribute is very necessary for any iframe. You can fix your height and width by the height and width attribute. It always get the value in pixel. You can also use percent for this.

Syntax :

pixel– <iframe src=” URL for you page” width=”200″ height=”250″></iframe>


Percent– <iframe src=” URL for you page” width=”30%” height=”35%”></iframe>


Remove or add border from html Iframe:

You can remove or add border by the frameborder attribute.


Remove– <iframe src=” URL for you page” frameborder=”0″></iframe>
Output :

Add-<iframe src=” URL for you page” frameborder=”5″></iframe>


Use html Iframe on a link:

You can use a link for your iframe, If anybody click on the link it will be displayed on the iframe.

Syntax: <iframe src=”1st URL” name=”iframe_a”></iframe>
<p><a href=”” target=”iframe_a”></a></p>


H2CWEB.NET homepage

You can add anything on a html iframe by giving the link on it. Anchor tag or <a> tag is very important for this link tag or anchor tag article may be helpful for you to learn about anchor tag or <a> tag.

Roy Jemee is a professional Blogger. Apart of blogging he likes to play with mathematics. He knows Blogging, Wordpress, PHP, javascript , SEO and some other.