Horje

How to add HTML <iframe> src Attribute

An <iframe> in its simplest use:

Definition and Usage

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

Browser Support

Syntax

<iframe src="URL">

Attribute Values

Value Description
URL Specifies the URL of the document to embed 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")
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h1>The iframe src attribute</h1>

<iframe src="https://horje.com/view/1353/how-to-add-html-iframe-sandbox-allow-top-navigation-by-user-activation-attribute">
</iframe>

</body>
</html>

Output should be:

How to add HTML <iframe> src Attribute




Type:
html
Category:
Web Tutorial
Sub Category:
HTML Tag
Uploaded by:
Admin