Skip to main content

Iframes in Html

Iframes:

Iframes are useful in adding sub-pages in the webpage like if you want to add page in page see example at the end.

How to Add an Iframe:
<iframe src="URL"></iframe>

There are 4 basic attributes to add an iframe. usually one, Src="URL" commonly use but suppose if you want to add height and width too so you can do it.

Iframe - How to Set Height and Width:

Height and Width of any iframe allows you to set height and width of any iframe.

<iframe src="URL" width="200" height="200"></iframe>

Change

Height
Width 

with your own values.


Iframe - How to Set Borders of Iframe:

Iframe has border also so this attribute allows you to add some border around this iframe so it shows that this is embeded iframe. 
<iframe src="URL" frameborder="0"></iframe>

Change

frameborder
 
with your own values.

Iframe - Use iframe as a Target for a Link:

An iframe can be used as the target frame for a link.It means that giving url is going to open in your above frame. When you will play with it check it you will surely know this video tutorial showing this.
The target attribute will work for that careful about it.
<iframe src="http://www.google.com" name="iframe_q"></iframe>
<p><a href="http://qtutors.blogspot.com" target="iframe_q">Qtutors in above iframe</a></p> 

We make iframe with some url now we want to open the bottom link within the above iframe so i give the iframe a name and after that i set a hyperlink and target shows that i want to open it in iframe_q.

Comments

Popular posts from this blog

Manipulating WW2 Fire AirCraft

In this tutorial we will be learning some indispensable techniques to use for any type of photo-manipulation. We will be doing this by taking a photograph of a model plane and editing it to to look like a photograph of a WW2 spitfire which has just been shot down and is on fire. The techniques used here are the same for any type of 'destruction' photo-manipulation. Below is the link you will learn how to create. In the second part of this tutorial we will go on to use this image in a movie poster/DVD cover design View Tutorial

Simple Hit counter

A hit counter will let us know how many times a page is accessed. Incase one visitors loads the page several times, the hit counter willincrease several times (but this is likely to happen only a few times). The code for the hit counter bellow will save the number of hits in afile named counter.txt (the name of this file may be changed). Each time the page is loaded,the file will be read, the number will be increased by one and the newnumber will be saved to the same file. Counter.php <?php //The file where number of hits will be saved; name may be changed;p.e. "/counter_files/counter1.txt" $counterfile = " counter.txt "; // Opening the file; number of hit is stored in variable $hits $fp = fopen($counterfile,"r"); $hits = fgets($fp,100); fclose($fp); //increading number of hits $hits ++; //saving number of hits $fp = fopen($counterfile,"w"); fputs($fp, $hits ); fclose($fp); //printing  hits; you may remove next lin...

Italics in Html

The italics tags use to highlight the fonts but not like bold it makes your font just like dance a step. These tags are not intended to to style your font. It's use to emphasize your fonts. Code: Italic <i>tag</i>! <em>Emphasized</em> Text! Example: Italic tag ! Emphasized Text! Code: <b>HTML</b> <i>Hyper Text Markup Language</i>  or <b>HTML</b> <em>Hyper Text Markup Language</em> Example: HTML Hyper Text Markup Language or HTML Hyper Text Markup Language Code: <p>Johnson is <b><i>DR.</i></b></p> Example: Johnson is DR.