iframe tag (XHTML 1.1)
inline subwindowTopics
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 |
|---|---|
| onclick | a pointer button was clicked |
| ondblclick | a pointer button was double clicked |
| onkeydown | a key was pressed down |
| onkeypress | a key was pressed and released |
| onkeyup | a key was released |
| onmousedown | a pointer button was pressed down |
| onmousemove | a pointer was moved within |
| onmouseout | a pointer was moved away |
| onmouseover | a pointer was moved onto |
| onmouseup | a pointer button was released |
© htmlpedia.net 2008 - 2012