Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 311403 of <frame>

  • Revision slug: HTML/Element/frame
  • Revision title: frame
  • Revision id: 311403
  • Created:
  • Creator: avsaro
  • Is current revision? No
  • Comment

Revision Content

Summary

<frame> is an HTML element which defines a particular area in which another HTML document can be displayed. A frame should be used within a {{ HTMLElement("frameset") }}.

Using the <frame> element is not encouraged because of certain disadvantages such as performance problems and lack of accessibility for users with screen readers. Instead of the <frame> element, {{ HTMLElement("iframe") }} may be preferred.

Attributes

Like all other HTML elements, this element supports the global attributes.

{{ htmlattrdef("src") }}
This attribute is specify document which will be displayed by frame.
{{ htmlattrdef("name") }}
This attribute is used to labeling frames. Without labeling all links will open in the frame that they are in.
{{ htmlattrdef("noresize") }}
This attribute avoid resizing of frames by users.
{{ htmlattrdef("scrolling") }}
This attribute defines existence of scrollbar. If this attribute is not used, browser put a scrollbar when necessary. There are two choices; "yes" for showing a scrollbar even when it is not necessary and "no" for do not showing a scrollbar even when it is necessary.
{{ htmlattrdef("marginheight") }}
This attribute defines how tall the margin between frames will be.
{{ htmlattrdef("marginwidth") }}
This attribute defines how wide the margin between frames will be.
{{ htmlattrdef("frameborder") }}
This attribute allows you to put borders for frames.

Example

<frameset cols="50%,50%">
  <frame src="https://developer.mozilla.org/en/HTML/Element/iframe" />
  <frame src="https://developer.mozilla.org/en/HTML/Element/frame" />
</frameset>

See also

  • {{HTMLElement("frameset")}}
  • {{HTMLElement("iframe")}}

Revision Source

<h3 id="Summary">Summary</h3>
<p><code>&lt;frame&gt;</code> is an HTML element which defines a particular area in which another HTML document can be displayed. A frame should be used within a {{ HTMLElement("frameset") }}.</p>
<p>Using the <code>&lt;frame&gt;</code> element is not encouraged because of certain disadvantages such as performance problems and lack of accessibility for users with screen readers. Instead of the <code>&lt;frame&gt;</code> element, {{ HTMLElement("iframe") }}&nbsp;may be preferred.</p>
<h3 id="Attributes">Attributes</h3>
<p>Like all other HTML&nbsp;elements, this element supports the <a href="/en/HTML/Global_attributes" title="en/HTML/Global attributes">global attributes</a>.</p>
<dl>
  <dt>
    {{ htmlattrdef("src") }}</dt>
  <dd>
    This attribute is specify document which will be displayed by frame.</dd>
  <dt>
    {{ htmlattrdef("name") }}</dt>
  <dd>
    This attribute is used to labeling frames. Without labeling all links will open in the frame that they are in.</dd>
  <dt>
    {{ htmlattrdef("noresize") }}</dt>
  <dd>
    This attribute avoid resizing of frames by users.</dd>
  <dt>
    {{ htmlattrdef("scrolling") }}</dt>
  <dd>
    This attribute defines existence of scrollbar. If this attribute is not used, browser put a scrollbar when necessary. There are two choices; "yes" for showing a scrollbar even when it is not necessary and "no" for do not showing a scrollbar even when it is necessary.</dd>
  <dt>
    {{ htmlattrdef("marginheight") }}</dt>
  <dd>
    This attribute defines how tall the margin between frames will be.</dd>
  <dt>
    {{ htmlattrdef("marginwidth") }}</dt>
  <dd>
    This attribute defines how wide the margin between frames will be.</dd>
  <dt>
    {{ htmlattrdef("frameborder") }}</dt>
  <dd>
    This attribute allows you to put borders for frames.</dd>
</dl>
<h3 id="Example">Example</h3>
<pre class="brush: html">
&lt;frameset cols="50%,50%"&gt;
  &lt;frame src="https://developer.mozilla.org/en/HTML/Element/iframe" /&gt;
  &lt;frame src="https://developer.mozilla.org/en/HTML/Element/frame" /&gt;
&lt;/frameset&gt;
</pre>
<h2 id="See_also">See also</h2>
<ul>
  <li>{{HTMLElement("frameset")}}</li>
  <li>{{HTMLElement("iframe")}}</li>
</ul>
Revert to this revision