HTML frames are used to display more than one document in a given window, with each document the ‘frame’ referred to.
The <frameset> tag is used to utilize frames, and is used to determine how the screen is sectioned in terms of rows and columns.
Let’s have a look at an example:
Say we want to define a particular frameset as having two columns, and we want the fist column – the first frame, or document – to occupy 40 percent of the width of the window, with the second column – or document – the remaining 60 percent, the command would appear in the HTML as follows:
<frameset cols=”40%,60%”> <frame src=”frame_x.htm”> frame src=”frame_y.htm”></frameset>
Explaining the example:
Quite simply, the above says “First document to occupy 40%, second to occupy 60%; first document is x.htm, second is y.htm.”We can clearly see, book ending the command, the opening - <frameset.. – and closing - </frameset> tags that indicate this is a frame definition. Take note, also, that you do not have to use the percentage as a defining size – if you know the size of the document or image, you can set the command using pixels.