Sie sind auf Seite 1von 2

4/4/13

HTML Iframes

HTML Iframes
Previous
An iframe is used to display a web page within a web page.

Next Chapter

HOME

HTML

C SS

JAVASC RIPT

JQUERY

XML

ASP.NET

PHP

SQL

MORE...

HTML Basic
HTML HOME HTML Introduction HTML Editors Syntax for adding an iframe:

HTML Tutorial - (HTML5 Compliant)


W3Schools Home

< i f r a m es r c = " U R L " > < / i f r a m e >


The URL points to the location of the separate page.

Iframe - Set Height and Width


The height and width attributes are used to specify the height and width of the iframe. The attribute values are specified in pixels by default, but they can also be in percent (like "80%").

Example
< i f r a m es r c = " d e m o _ i f r a m e . h t m "w i d t h = " 2 0 0 "h e i g h t = " 2 0 0 " > < / i f r a m e >
Try it yourself

Iframe - Remove the Border


The frameborder attribute specifies whether or not to display a border around the iframe. Set the attribute value to "0" to remove the border:

Example
< i f r a m es r c = " d e m o _ i f r a m e . h t m "f r a m e b o r d e r = " 0 " > < / i f r a m e >
w3schools.com/html/html_iframe.asp 1/2

4/4/13

HTML Iframes

Try it yourself

Use iframe as a Target for a Link


An iframe can be used as the target frame for a link. The target attribute of a link must refer to the name attribute of the iframe:

Example
< i f r a m es r c = " d e m o _ i f r a m e . h t m "n a m e = " i f r a m e _ a " > < / i f r a m e > < p > < ah r e f = " h t t p : / / w w w . w 3 s c h o o l s . c o m "t a r g e t = " i f r a m e _ a " > W 3 S c h o o l s . c o m < / a > < / p >
Try it yourself

HTML iframe Tag


Tag <iframe> Description Defines an inline frame

Previous

Next Chapter

w3schools.com/html/html_iframe.asp

2/2

Das könnte Ihnen auch gefallen