Table of contentsBypass table of contents
The HTML frameset element divides the space in the document (using the "rows" and "cols" attributes) where it is inserted, to load a different document on each spot. These spaces should be occupied by a frame (HTML frame element), that will act as container for a specific document, or another frameset.
This anidation gives many possibilities and may help solve many problems, but actually, frames are not very popular, mainly because the relationship between the different documents isn't correctly interpreted in some cases. Besides, frames may cause incompatibility or accessibility issues.
Because of this, the use of frames has been tagged by experts as a "bad practice" and its use is not recommended.
In the following example, the space is divided vertically in two identical frames, and a document is loaded in each of them. This example is useful for documents comparison.
Other frameset document could divide the space in columns and rows. This is the case of the following document, where the space is divided exactly in four identical rectangles.
The next example shows the use of anidated framesets, in a document with a title at the top, a menu at the left and a content area in the rest. To do this, the document is first split horizontally in two, where the title (top) takes 200 pixels of height. The resulting space is divided vertically in two again: the menu (left) takes 180 pixels and the rest of the space is assigned to the content.
The "id" attribute assigns an identifier to the associated element. This identifier must be unique in the document and can be used to refer to that element in other instances (e.g., from client-side scripts).
The "class" attribute assigns a class name (or a list of class names separated by spaces) to the container element. It is used together with style sheets and tells the browser the class (or classes) to which the element is associated.
A class gives presentational attributes to elements (read more at the Cascading Style Sheets tutorial).
This attribute is used to define presentational attributes for the containing element, and its value should be composed by style sheets properties. Although in some cases it can become useful, a better practice is to place presentational attributes in external files, relating them to elements with the "class" attribute. This way you keep the semantic and presentational parts of your document separated.
You can find more information about presentational attributes at the Cascading Style Sheets tutorial.
The purpose of this attribute is to provide a title for the element. Its value must be a short and accurate description of the element. Browsers usually render it as a "tool tip" when the user puts the mouse pointer over the element for a short period of time.
Takes for value a comma separated list of widths, representing the width of the successive frames. The number of widths in this list will set the number of frames that will be inserted horizontally.
Takes for value a comma separated list of heights, representing the height of the successive frames. The number of heights in this list will set the number of frames that will be inserted vertically.
See a complete list and information about events in HTML
Diseño y desarrollo: Latitud29.com