html5 Site Icon CSS3 Site Icon CSS Site Icon

HTML4 Reference

HTML <iframe> tag

Definition

The <iframe> tag is used to define an inline window that holds another document.

Example


<iframe>This text rendered in broswers not supporting iframe</iframe>

Required Attributes

NONE

Optional Attributes

align - deprecated - Use CSS instead.

longdesc - no browser support.

name - deprecated in XHTML - Use the id attribute instead.

frameborder - specifies a border.


<!-- Valid values are 0 and 1 (default is 1 - border ON) -->
<iframe frameborder="0">non iframe text here</iframe>

height - specifies the height of the iframe.


<!-- Valid values are % or a pixel value -->
<iframe height="20%">non iframe text here</iframe>

marginheight - specifies the top and bottom margins of the iframe.


<!-- A pixel value -->
<iframe marginheight="30">non iframe text here</iframe>

marginwidth - specifies the left and right margins of the iframe.


<!-- A pixel value -->
<iframe marginwidth="30">non iframe text here</iframe>

scrolling - specifies whether a scrollbar is viewable in the iframe.


<!-- Valid values are yes, no and auto -->
<!-- yes (scrollbars are always shown) -->
<!-- no (scrollbars are never shown) -->
<!-- auto - default (scrollbars are shown if needed) -->
<iframe scrolling="yes">non iframe text here</iframe>

url - specifies the name of a URL to display in the iframe.


<iframe url="aURL">non iframe text here</iframe>

width - specifies the width of the iframe.


<!-- Valid values are % or a pixel value -->
<iframe width="20">non iframe text here</iframe>

Common Attributes

class - specifies a classname for the element allowing you to apply the style of the predefined class to the content.


<iframe class="classname">non iframe text here</iframe>

id - specifies a unique id for the element allowing you to apply the style of the predefined id to the content.


<iframe id="idname">non iframe text here</iframe>

style - specifies an inline style for the element allowing you to apply the style to the content.


<iframe style="color:red;text-align:left">non iframe text here</iframe>

title - specifies extra information about the content.


<iframe title="information about the content">non iframe text here</iframe>

Language Attributes

NONE

Event Attributes

NONE



<i> tag    << Prev          Next >>   <img /> tag

go to home page Homepage go to top of page Top

HTML Elements

The complete set of HTML elements also known as HTML tags from the latest HTML 4.01 Specification.

Click the links for more information on individual tags and their attributes.

<!--...-->

<!DOCTYPE>

<a>

<abbr>

<acronym>

<address>

<applet>

<area />

<b>

<base />

<basefont />

<bdo>

<big>

<blockquote>

<body>

<br />

<button>

<caption>

<center>

<cite>

<code>

<col />

<colgroup>

<dd>

<del>

<dfn>

<dir>

<div>

<dl>

<dt>

<em>

<fieldset>

<font>

<form>

<frame />

<frameset>

<h1> - <h6>

<head>

<hr />

<html>

<i>

<iframe>

<img />

<input />

<ins>

<isindex />

<kbd>

<label>

<legend>

<li>

<link />

<map>

<menu>

<meta />

<noframes>

<noscript>

<object>

<ol>

<optgroup>

<option>

<p>

<param />

<pre>

<q>

<s>

<samp>

<script>

<select>

<small>

<span>

<strike>

<strong>

<style>

<sub>

<sup>

<table>

<tbody>

<td>

<textarea>

<tfoot>

<th>

<thead>

<title>

<tr>

<tt>

<u>

<ul>

<var>