iframe tag (XHTML 1.1)

inline subwindow

Topics

The iframe tag, short for "inline frame", enables you to include content from another file on your site, or even from an external URL. For instance, including Google in a window on your website would be as simple as writing an iframe tag, like this:

 

<iframe src="http://www.google.com"></iframe>

 

Now, you can control various aspects of the appearence, as described below, but the above is all you need to see it working. You can leave a message for clients who can't or are not allowed to render an iframe, by writing it within the tags, like this:

 

<iframe src="http://www.google.com">Google would be here, but your browser does not support iframes!</iframe>

The frameborder attribute

 

The width and height attributes

 

 

The scrolling attribute

Attributes

Attribute Deprecated Required Description
class  space-separated list of classes 
dir  direction for weak/neutral text 
id  document-wide unique id 
lang  language code 
style  associated style info 
title  advisory title 

Events

Event Description
onclicka pointer button was clicked 
ondblclicka pointer button was double clicked 
onkeydowna key was pressed down 
onkeypressa key was pressed and released 
onkeyupa key was released 
onmousedowna pointer button was pressed down 
onmousemovea pointer was moved within 
onmouseouta pointer was moved away 
onmouseovera pointer was moved onto 
onmouseupa pointer button was released 



© htmlpedia.net 2008 - 2012