HTML Iframes

Iframes (inline frames) allow you to embed another HTML document within the current document. They are commonly used to display content from other sources, such as videos or maps, directly within a webpage.

Tutorials dojo strip

HTML Iframes Syntax

Explanation of Syntax:

  • src="URL": The URL of the document to embed.
  • width="width_value" and height="height_value": Specify the dimensions of the iframe.
HTML




HTML Iframes Example Code

Explanation of Code:

  • The code begins with the <!DOCTYPE html> declaration and the opening <html> tag.
  • In the <head> section, metadata is defined for the document.
  • The <body> section includes:
    • An <h1> tag introducing the iframe content.
    • An <iframe> tag that embeds a webpage from https://www.example.com, set to a width of 600 pixels and a height of 400 pixels.
HTML




HTML Labs

Tutorials dojo strip