Computerhelp4all logo Articles AboutTopicsQuizzesComputer Questions & AnswersComputer Terms & DefinitionsActivitiesContact

What Is The HTML <iframe> Tag?

What Is The HTML Iframe Tag

Date First Published: 11th June 2023

Topic: Web Design & Development

Subtopic: Web Development

Article Type: Computer Terms & Definitions

Difficulty: Medium

Difficulty Level: 5/10

Learn more about what the HTML <iframe> tag is in this article.

In HTML, the <iframe> tag is used to specify an inline frame within a HTML document, which loads a webpage inside another webpage. It is useful when adding dynamic content, ads, videos, or other types of content that separately requires a scrollbar. This HTML tag is supported by all major web browsers and is included in the latest HTML5 specifications.

Example Of The <video> Tag

An example of the <iframe> tag can be seen below. It loads the homepage of this website in this webpage.

<iframe src="https://computerhelp4all.com" title="Computerhelp4all Homepage" height="450px" width="75%"> </iframe>

Attributes

Below are the attributes for the <iframe> tag.

Attribute Value Description
height pixels Specifies the height of the inline frame.
loading eager, lazy Specifies whether the browser should immediately load the inline frame or delay loading it until the user scrolls down to see it.
name text Specifies the name of the inline frame.
sandbox allow-forms, allow-pointer-lock, allow-popups, allow-same-origin, allow-scripts, allow-top-navigation Specifies an additional set of restrictions set on the content in the inline frame.
seamless Specifies that the inline frame should appear as part of the webpage.
src URL Specifies the URL of the page to be embedded in the inline frame.
srcdoc HTML code Specifies the HTML content of the page to appear in the inline frame.
width pixels Sets the width of the inline frame.


Feedback

  • Is there anything that you disagree with on this page?
  • Are there any spelling, grammatical, or punctuation errors on this page?
  • Are there any broken links or design errors on this page?

If so, it is important that you tell me as soon as possible on this page.


Comments