HTMLforall

  HTML | PHP | Forum

HTML <iframe> tag

Syntax

<iframe> - </iframe>

Definition and Usage

The IFRAME element defines an inline frame for the inclusion of external objects including other HTML documents.

Optional Attributes

Attribute Value Description
align left
right
top
middle
bottom
Specifies how to align the iframe according to the surrounding text
frameborder 1
0
Specifies whether or not to display a frame border
height pixels
%
Defines the height of the iframe
longdesc URL An URL to a long description of the frame contents
marginheight pixels Defines the top and bottom margins of the iframe
marginwidth pixels Defines the left and right margins of the iframe
name frame_name Specifies a unique name of the iframe
scrolling yes
no
auto
Defines scroll bars
src URL The URL of the document to be shown in the iframe
width pixels
%
Defines the width of the iframe

Standard Attributes

id, class, title, style

For a full description, go to Standard Attributes.

Example

Source Output
<iframe 
src ="main.htm"
width="100%">
</iframe>

Home

Learn HTML
HTML Tutorial

HTML Reference
HTML by function
HTML by Alphabet

HTML events
HTML attributes
HTML color names

Top-Level Elements
<!--...-->
<!DOCTYPE> 
<html>
<head>
<body>
<frameset>
Head Elements
<base>
<isindex>
<link>
<meta>
<script>
<style>
<title>
Generic Block-level Elements
<address>
<blockquote>
<center>
<del>
<div>
<h1> to <h6>
<hr>
<ins>
<isindex>
<noscript>
<p>
<pre>
Lists
<dd>
<dir>
<dl>
<dt>
<li>
<menu>
<ol>
<ul>
Tables
<caption>
<col>
<colgroup>
<table>
<tbody>
<td>
<tfoot>
<th>
<thead>
<tr>
Forms
<button>
<fieldset>
<form>
<input>
<label>
<legend>
<option>
<optgroup>
<select>
<textarea>
Special Inline Elements
<a>
<applet>
<area>
<basefont>
<bdo>
<br>
<font>
<iframe>
<img>
<map>
<object>
<param>
<q>
<script>
<span>
<sub>
<sup>
Phrase Elements
<abbr>
<acronym>
<cite>
<code>
<del>
<dfn>
<em>
<ins>
<kbd>
<samp>
<strong>
<var>
Font Style Elements
<b>
<big>
<i>
<s>
<small>
<strike>
<tt>
<u>
Frames
<frame>
<frameset>
<noframes>

 

Copyright 2005-8 Sunilcare.  All Rights Reserved.
Comments or suggestions? Contact us.About us