HTML Frameset Tag

The Frameset Element is used to define a set of frames in a page. The frameset element replaces the body element, pages which are using frames should use the frameset doctype.

Warning

Better results can often be achieved using HTML div elements to devide a page into several sections, CSS can be used to give the elements a scroll-bar. Using div elements allow for better indexing in search engines, and are more user-friendly then frames.

Attributes

Standard Attributes.

Attribute:Value:Description:DTD:
AttrsOther AttributesCommon, I18n, EventSTF
rowsLength UnitsList of LengthsF
colsLength UnitsList of LengthsF
onloadScriptAll the frames have been loadedF
unonloadScriptAll the frames have been unloadedF

DTD. Defines which document type the attribute is allowed. S=Strict, T=Transitional, F=Frameset.

Example

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
   "http://www.w3.org/TR/html4/frameset.dtd">

  <head>
    <title>My first Frameset</title>
  </head>

  <frameset cols="25%,75%">
    <frame src="First-Page.html">
    <frame src="Second-Page.html">
  </frameset>

</html>

Layouts

Extra examples dealing with Frames.

  1. Ad friendly 3column layout in Frames

Because frames are so rarely used, layout examples will be included here, or posted as comments.

Post comment

Links that you insert are not nofollowed, but will be removed by admins if they are considered spam.

[url=Absolute URL for page]TITLE[/url]

You should insert code boxes around code examples, which will be automatically syntax highlighted.

[code1 html|css|javascript|php|sql]Your Code Here[/code1]

You may want to read our Privacy Policy before submitting your comment.