Thursday, February 19, 2009

HTML FRAMES - Joannacel Paraiso


HTML FRAMES
  • With Frames, you can display more than one Web page in the same browser window.

FRAMES
  • Each HTML document is called a frame, and each frame is independent of the others.
  • The disadvantages of using frames are:
    *The Web developer must keep track HTML documents
    *It is difficult to print the entire page.

THE FRAMESET TAG
  • The "frameset" tag defines how to divide the window into frames
  • Each frameset defines a set of rows or columns
  • The values of the rows/columns indicate the amount of screen area each row/column will occupy
  • The "frame" tag defines what HTML document to put into each frame.
  • In the example below we have a frameset with two columns. The first column is set to 25% of the width of the browser window.
  • The second column is set to 75% of the width of the browser window.
  • The HTML document document “frame_a.htm” is put into the first column, and the HTML document “frame_b.htm” is put into the second column.

BASIC NOTES-USEFUL TIPS
  • If a frame has visible borders, the user can resize it by dragging the border. To prevent a user from doing this, you can add noresize-“noresize” to the frame tag.
  • Add the "no frames" tag for browser that do not support frames.
  • You cannot use the "body""/body" tags together with the "frameset""/frameset" tags.
  • However, if you will add "noframes" tag for browser that do not support frames, you will enclose the text in body /body tags.

Frameset Attributes Explained
  • Cols-“150,150” – it tells the browser to create columns (vertical setup) of 2. The left column’s width is 150 pixels, while the other is 850 pixels.
  • Frameborder-No or Yes – defines whether to make the frameborder dividing the windows become visible or not.
  • border-“n” – when the value for frameborder is YES, you can set the thickness of the border in pixels by entering a number to the value.
  • Framespacing-“n” – defines the spacing between the 2 framesets in the window. The expected value here is a number.
  • Bordercolor-“rrggbb” – applies color to the border when it is turned on. Replace “rrggbb” with hexadecimal color value.
  • Name-“anyname” – assigns a name to the frame on the left (if vertical) or top frame (if horizontal) in the frameset definition.
  • Noresise – tells the browser to lock the border.
  • Scrolling-“YES or NO” – controls whether the scrollbar is turned on or not. The default is NO. When turned on, and if the page of the document is long, the scrollbar will become visible.
  • Scr-“file.html” – the document you’re calling to load in the window. SRC is short for source file.
















No comments: