HTML iframe src Attribute
HTML <iframe> tag
Definition and Usage
The src attribute specifies URL of the iframe content.
Syntax
Syntax Example
<iframe src="demo_iframe.htm">
|
Attribute Values
Value |
Description |
URL |
Specifies URL of the page used in the iframe
(the iframe content). Possible values:
- An absolute URL - Is used to navigate to another web site (like
longdesc="http://www.w3schools.com/frame_a.htm")
- A relative URL - Is used to navigate within a site (like
longdesc="frame_a.htm")
|
Browser Support
The attribute is supported in all major browsers.
Example
Source |
Output |
<iframe src="demo_iframe.htm">
</iframe>
|
|
Try-It-Yourself Demos
iframe src
attribute example
Specify the source URL of the iframe.
HTML <iframe> tag
|