W3Schools.com

HTML <iframe> src Attribute

HTML iframe Tag Reference HTML <iframe> tag

Example

An <iframe> in its simplest use:

<iframe src="/default.asp"></iframe>

Try it yourself »

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The src attribute is supported in all major browsers.


Definition and Usage

The src attribute specifies the address of the document to embed in the <iframe>.


Syntax

<iframe src="URL">

Attribute Values

Value Description
URL The address to the document to show in the <iframe>.

Possible values:

  • An absolute URL - points to another web site (like src="http://www.example.com/default.htm")
  • A relative URL - points to a file within a web site (like src="default.htm")


HTML iframe Tag Reference HTML <iframe> tag
WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Best Hosting Coupons
UK Reseller Hosting
Cloud Hosting
Top Web Hosting
$7.95/mo SEO Hosting
Premium Website Design
WEB BUILDING
Download XML Editor
FREE Website BUILDER
Free Website Templates Free CSS Templates
Make Your Own Website
W3SCHOOLS EXAMS
Get Certified in:
HTML, CSS, JavaScript, XML, PHP, and ASP
W3SCHOOLS BOOKS
New Books:
HTML, CSS
JavaScript, and Ajax
STATISTICS
Browser Statistics
Browser OS
Browser Display
SHARE THIS PAGE