XHTML Reference
Frames
Use of these tags requires that you use the frames DOCTYPE. In this instance the only actual displayable content contained within the document should be contained within the <noframes> section for display by browsers which don't support frames.
Remember that, when you use frames, you are forcing the user to load multiple pages into their browser window and that this will make your page slower to load and for this reason I recommend that you avoid using frames wherever possible. Frameset definitions must be used when
- the individual frames are hosted on different servers, or
- you are using Javascripts attached to the frameset to perform interpage processing (like this)
Frameset definitions can also be used to provide a fixed navigation bar on all pages of your site (if you don't like the way we've done the navigation bar on our site). Other than for these three instances I recommend that framesets not be used.
Note that this page lists those attributes that I have seen used with frameset definitions, unlike the other pages in this command reference where I have checked the attribute list against the XHTML 1.0 transitional DTD, I have not checked the that the attributes listed on this page are all included in the XHTML 1.0 frames DTD. Entries shown in italics may not be in the DTD and all of the entries that are in the DTD may not be listed.
The following tags are used to define frames:
- <frameset> </frameset>
contains the definition of a group of frames. This may be either individual frames or further framesets.The following optional attributes can be specified on the <frameset> tag:
- border
- cols
- frameborder
- framespacing
- rows
- <noframes> </noframes>
defines what to display in place of the frames if the browser doesn't support frames. This needs to be coded within the end of the frameset definition and should contain the body contents to display in browsers that do not support frames.There are no optional attributes on the <noframes> tag.
- <frame> </frame>
defines an individual frame within a frameset.The following optional attributes can be specified on the <frame> tag:
- frameborder
- id
- marginheight
- marginwidth
- name (deprecated)
- noresize
- scrolling
- src
- <iframe> </iframe>
defines an inline frame which appears in the middle of another document.The following optional attributes can be specified on the <iframe> tag:
- align
- frameborder
- height
- id
- marginheight
- marginwidth
- name (deprecated)
- noresize
- scrolling
- src
- width
If you want to define a frameset that is a valid XHTML page, I suggest that you use our skeleton frameset definition as the starting point for your frameset page definition. The attributes used in that skeleton are all in the DTD.
Related Articles
- Want to ensure that browsers don't adjust your column Widths?
- Selection Lists
- Column Headings - thead
- Linking to Foreign Language Sites using Babelfish Translation
- Invalid XHTML



