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

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.

Submit Buttons in Html Forms

Submit buttons are use to submit the forms whenever user registration is needed submit buttons always used. How to make those submit buttons? Just simple you can make submit buttons if you know the <input> tag then make it's type= submit value="some name" just like submit, send etc. Submit Buttons Code: <input type="submit" value="Submit" /><br /> <input type="submit" value="Send" /><br /> <input type="submit" value="Submit Form" /><br /> Submit Buttons Example: Submit Buttons in Action Code: <form method="post" action="mailto:pateltutor1@gmail.com" > Name:<input type="text" name="First" size="12 maxlength="12" /> Email:<input type="text" name="Last" size="24" maxlength="24" /> <input type="submit" value="Send Email" /> </form> ...

Reset Buttons in Html Forms

Reset Buttons: Reset buttons are use to reset the forms in Html. Sometime users put wrong information then the users don't be worry of removing whole the fields and fill them again just press the reset button and whole the form back to their original state. That's very useful for the user. Html Code: <input type="reset" value="Reset" /> <input type="reset" value="Start Over" /> Html Code: Reset Button in Action: Now we are giving some action for your understanding what reset button done don't panic we give some form tags and other just visit Forms in Html you will also learn how to make it. Reset Button Code: <form action="xyz.php" method="post"> First Name: <input type="text" size="20" maxlength="12" /><br /> Last Name: <input type="text" size="24" maxlength="24" /><br /> <input type="reset" value=...