Anda di halaman 1dari 2

8/2/13

HTML Iframes
Search w3schools.com: Select Language

HOME

HTML

C SS

JAVASC RIPT

JQUERY

XML

ASP.NET

PHP

SQL

MORE...

R EFER ENC ES

EXAMPLES

FO R UM

ABO UT

SHARE THIS PAGE

Like

76k

HTML Basic
HTML HOME HTML Introduction HTML Editors HTML Basic HTML Elements HTML Attributes HTML Headings HTML Paragraphs HTML Formatting HTML Links HTML Head HTML CSS HTML Images HTML Tables HTML Lists HTML Blocks HTML Layout HTML Forms HTML Iframes HTML Colors HTML Colornames HTML Colorvalues HTML JavaScript HTML Entities HTML URL Encode HTML Quick List HTML Summary HTML XHTML

HTML Iframes
Previous
An iframe is used to display a web page within a web page.
HTML Colormixer HTML Character Sets HTML ASCII HTML ISO-8859-1 HTML Symbols HTML URL Encode HTML Lang Codes HTTP Messages HTTP Methods Keyboard Shortcuts

WEB HOSTING

Next Chapter

Best Web Hosting eUK Web Hosting UK Reseller Hosting Domain, Hosting & Email

WEB BUILDING
XML Editor - Free Trial! FREE Website BUILDER FREE Website C reator Best Website Templates

STATISTICS
Browser Statistics OS Statistics Display Statistics

Top 10 Tutorials
Syntax for adding an iframe:

Top 10 References

Examples

< 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%").

HTML5 News
HTML5 Intro HTML5 New Elements HTML5 Canvas HTML5 SVG HTML5 Drag/Drop HTML5 Geolocation HTML5 Video HTML5 Audio HTML5 Input Types HTML5 Form Elements HTML5 Form Attributes HTML5 Semantic HTML5 Web Storage HTML5 App Cache HTML5 Web Workers HTML5 SSE

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 >
Try it yourself

HTML Media
HTML Media HTML Object HTML Audio HTML Video HTML YouTube

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 Examples
HTML Examples HTML Quiz HTML5 Quiz HTML Certificate HTML5 Certificate

HTML References
HTML Tag List HTML Attributes

HTML iframe Tag


Tag <iframe> Description Defines an inline frame

w3schools.com/html/html_iframe.asp

1/2

8/2/13
HTML Events HTML Canvas HTML Audio/Video HTML Doctypes HTML Colornames HTML Colorpicker HTML Colormixer HTML Character Sets HTML ASCII HTML ISO-8859-1 HTML Symbols HTML URL Encode HTML Lang Codes HTTP Messages HTTP Methods Keyboard Shortcuts

HTML Iframes

Previous

Next Chapter

Top 10 Tutorials
HTML Tutorial HTML5 Tutorial C SS Tutorial C SS3 Tutorial JavaScript Tutorial jQuery Tutorial SQL Tutorial PHP Tutorial ASP.NET Tutorial XML Tutorial

Top 10 References
HTML/HTML5 Reference C SS 1,2,3 Reference C SS 3 Browser Support JavaScript HTML DOM XML DOM PHP Reference jQuery Reference ASP.NET Reference HTML C olors

Examples
HTML Examples C SS Examples XML Examples JavaScript Examples HTML DOM Examples XML DOM Examples AJAX Examples ASP.NET Examples Razor Examples ASP Examples SVG Examples

Quizzes
HTML Quiz HTML5 Quiz XHTML Quiz C SS Quiz JavaScript Quiz jQuery Quiz XML Quiz ASP Quiz PHP Quiz SQL Quiz

Color Picker

Statistics
Browser Statistics Browser OS Browser Display

RE P O RT E RRO R

HO ME

TO P

P RI N T

FO RU M

A BO U T

A D V E RT I SE WI T H U S

W3Schools is optimized for learning, testing, and training. Examples might be simplified to improve reading and basic understanding. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our terms of use and privacy policy. C opyright 1999-2013 by Refsnes Data. All Rights Reserved.

w3schools.com/html/html_iframe.asp

2/2

Anda mungkin juga menyukai