Frames are considered transitional by W3C. I use them because they are quite reliable when used within a frameset, more so than the methods designed to replace them. They have the advantage that:
Other means of accomplishing the same effects are possible with some browsers. See Layout with Positioning for a discussion of the issues.
The disadvantage of frames is that the address bar does not change with changes in the main frame. It remains fixed with the address of the outermost frame, that which contains all the other frames. Similarly, search engines have a hard time finding their way around frames.
<frameset cols="12%,24%,*">The above example provides for three columns, one occupying 12% of the space, one 24%, and the other the rest of the space.
Between the start and stop frameset tags are placed as many <frame> elements, as were designated by the frameset tag.
Each <frame> tag has a src attribute, giving the name of the html file to be opened in the frame. There is no closing frame tag.
<html> <head> <title>An Example of Frames</title> </head> <frameset cols="12%,*"> <frame src="htmside" name="side"> <frame src="htmmain" name="main"> </frameset> </html>
<head> <title>Nested Framesets</title> </head> <frameset rows="9%,*"> <frame src="htmbannr.html" name="top"> <frameset cols="18%,*"> <frame src="htmtoc.html" name="menu"> <frame src="htmhome.html" name="main"> </frameset> </frameset>
The frame on the left side of this page, containing my menu, is populated with links such as the following.
<a href="htmhome.html" target="main">Home </a> <br>This code causes the file "htmhome.html" to open in the frame named "main".