html5 Site Icon CSS3 Site Icon CSS Site Icon

HTML4 Reference

HTML <frame /> tag (Frameset DTD)


The <frame /> is a self closing tag that is used to define a subwindow that holds another document.

Avoid Frames

Frames allow more than 1 document to be loaded on a page!

  1. Bang go bookmarks to the page
  2. Makes navigation hell for people using screen readers
  3. Search engines get confused
  4. You need to use the Frameset DTD
  5. Say goodbye to mobile web viewers that require XHTML
  6. Adds avoidable complexity


<frameset cols="50%,50%">
  <frame src="aURl" />
  <frame src="anotherURl" />

Required Attributes


Optional Attributes

longdesc - no browser support.

frameborder - specifies a border.

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

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

<!-- A pixel value -->
<frame marginheight="30" />

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

<!-- A pixel value -->
<frame marginwidth="30" />

name - specifies the width of the frame.

<!-- Used for reference -->
<frame name="aName" />

noresize - specifies that the frame cannot be resized.

<frame noresize="noresize" />

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

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

src - specifies the name of a URL to display in the frame.

<frame src="aURL" >

Common Attributes

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

<frame class="classname" />

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

<frame id="idname" />

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

<frame style="color:red;text-align:left" />

title - specifies extra information about the content.

<frame title="information about the content" />

Language Attributes


Event Attributes


<form> tag    << Prev          Next >>   <frameset> tag

go to home page Homepage go to top of page Top