HTML frames

                                                           HTML frames

HTML frames,If you define the frameset by using either the rows or cols attribute and try to display it in the browser window, you will get the page without any contents. for contents you must specify which HTML document should by displayed in each frame. for this <FRAME> element is used.

HTML frames


This <FRAME> element is used to specify the contents of different frames. It is an empty tag, so no closse </FRAME> tag. <FRAME> element must contain the SRC attribute to indicate which page should be loaded in the frame.

For example--
                         <FRAME SRC="link.html">

                            HTML CODE:    
                                           
                   

                                                                OUTPUT:
                                                                   

FRAME HAS SOME ATTRIBUTES--
  • Frameborder-- This attribute allows you to turn the border on or off for the individual frame. By default value, border is on. You can set the border by setting this attribute to value 0 or 1.
For example--
                         <FRAME SRC="A.HTML"    FRAMEBORDER="0">
  • Marginwidth-- This attribute is used to specify the amount of space that frame's contents will have from its left and right border. The value can be specified in pixels.
For example--
                         <FRAME SRC="A.HTML" MARGINWIDTH="10">

  • Marginheight-- This attribute is used to specify the amount of space that frame's contents will have from its top and bottom border. The value can be specified in pixels.
For example--
                         <FRAME SRC="A.HTML" MARGINHEIGHT="10">
  • Name--This attribute is used to give name to the frame so that it can be refrenced. It is usually used when links are created in one frame, wants to load pages in other frames.
For example--
                         <FRAMR SRC="A.HTML" NAME="F1">
  • Noresize--This attribute is used to prevent the user from resizing the frame, By default it is disabled.
For example--
                         <FRAME SRC="A.HTML" NORESIZE>
  • Scrolling--This attribute is used to control the appearance of scrollbar in the frame. Its value can be YES, NO or AUTO.
For example--
                       <FRAME SRC="A.HTML" SCROLLING="NO">

                         
If you want to know about the <FRAMESET> element click on this link--frames-in-html.html

Post a Comment

1 Comments