Page 237 - DCAP109_GRAPHIC_TOOLS
P. 237

Graphic Tools




                    Notes
                                       !
                                     Caution Use frames with care. Too many of them can make it very tough for the users as
                                     they tend to get lost.

                                   Frame has the following properties:
                                   z   It loads the URL independently of other frames.
                                   z   It can be accessed via the name given to it and so allows HTML contents to be targeted by
                                       other URL’s.
                                   z   It resizes itself dynamically in response to changes in the size of the visible area.

                                   10.4.1 Tags for the Frame

                                   There are two major tags available for the use of frames. We will discuss them in detail below.

                                   Frameset

                                   The <frameset> tag replaces the <body> element in frameset documents. It defines how to
                                   divide the window into frames. Each frameset defines a set of rows or columns. If you define
                                   frames by using rows then horizontal frames are created else with columns vertical farms are
                                   created. The values of the rows/columns indicate the amount of screen area each row/column
                                   will occupy. Each frame is created by <frame> tag and it defines which HTML document to put
                                   into the frame.
                                   Let us now illustrate the use of the frameset and frame tags.
                                   <html>
                                   <head>
                                   <title>Frames example</title>

                                   </head>
                                       <frameset rows=”10%,80%,10%”>
                                           <frame src=”/html/top_frame.htm” />
                                           <frame src=”/html/main_frame.htm” />
                                           <frame src=”/html/bottom_frame.htm” />
                                         <body>
                                         Frames
                                         </body>
                                       </frameset>

                                   </html>
                                   Now create three HTML files called top_frame.htm, main_frame.htm  and bottom_frame.htm  to be
                                   loaded into three frames with some content.
                                   Following are important attributes of <frameset> tag:

                                   z   cols:  specifies how many columns are contained in the frameset and the size of each
                                       column. You can specify the width of each column in one of four ways:

                                       ™    Absolute values in pixels.



          230                               LOVELY PROFESSIONAL UNIVERSITY
   232   233   234   235   236   237   238   239   240   241   242