XML technologies / HTML & XHTML / Alphabetical list of HTML and XHTML elements / iframe

(Excerpt from "HTML & XHTML ─ kurz & gut" by Jennifer Niederst Robbins)

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

   

iframe

HTML 4.01 | HTML 5

<iframe> ... </iframe>

Defines a movable iframe, short for inline frame, an embedded frame. It embeds an HTML document in its own context or window within the parent document. An iframe displays the external document’s content and can show scrollbars if it does not fit in the specified area. Iframes can be positioned like images. The content of the iframe element, between its start and end tags, appears in browsers that do not support iframes.

Start/end tag

Required/required

Attributes

Core, global HTML 5 attributes

  • align="top|middle|bottom|left|right"

    Deprecated. Not in HTML 5. Aligns the iframe within the page’s text flow. The values left and right allow text to wrap around the iframe.

  • frameborder="1|0"

    Not available in HTML 5. Surrounds the iframe with a 3D border. The default value 1 enables this appearance.

  • height="Zahl oder Prozentwert"

    Defines the iframe’s height in pixels or as a percentage of the window size.

  • hspace="Zahl"

    Not standards-compliant. Not in HTML 5. Used with the values left and right for the attribute align. hspace defines the height of the space in pixels to the left and right between the iframe and surrounding content.

  • longdesc="URL"

    Not available in HTML 5. Contains a link to a document with a long description of the iframe and its content.

  • marginheight="Zahl"

    Not available in HTML 5. Defines the space in pixels between the iframe’s top and bottom edges and its content.

  • marginwidth="Zahl"

    Not available in HTML 5. Defines the space in pixels between the left or right edge and the content.

  • name="Text"

    Deprecated in XHTML 1.0. Assigns a name to the iframe that links can reference using the attribute target.

  • sandbox="allow-same-origin|allow-forms|allow-scripts"

    HTML 5 only. Used to disable or enable scripts, popups, plugins and form submissions in embedded documents.

  • scrolling="yes|no|auto"

    Not available in HTML 5. Specifies whether scrollbars appear in the iframe. The value yes always displays scrollbars; the value no always hides them. The default value auto displays scrollbars only if the content would not otherwise fit in the iframe.

  • seamless (seamless="seamless" in XHTML 5)

    HTML 5 only. Instructs the browser to treat the document as part of the parent document. This allows better integration of the embedded document with respect to link targets, document structure and CSS-inheritance.

  • src="URL"

    Specifies the URL of the HTML document whose content appears in the iframe.

  • vspace="Zahl"

    Not standards-compliant. Not in HTML 5. Used with the values left and right for the attribute align. vspace defines the width of the space in pixels above and below the iframe and surrounding content.

  • width="Zahl"

    Defines the iframe’s width in pixels or as a percentage of the window size. Internet Explorer uses a default for width of 300 pixels.

Example

<h1>Iframes</h1>
<iframe src="liste.html" width="200" height="100" scrolling="auto">
Ihr Browser unterstützt keine Iframes. Sie finden die Liste <a href="liste.html">hier</a>.
</iframe>

 

> back to the alphabetical list of elements

   

 

 

 

back to top