Frames are an extremely important part of HTML. They allow you to have multiple files open on separate parts of the page. You will notice that this page has a navigation bar and a header, then there is this part, where all the info goes. To achieve this, you would use frames. When using frames you need an index.html file which is where you define the frames and their properties. Each frame "links" to another .html file which contains the data you want in that frame.
- <FRAMESET></FRAMESET> - Frames. Instead of the <BODY> tag, we use this tag do declare the 'set of frames'. Say, for example, you had an index.html file, a main.html and a navigation.html file. You would set up the frames in the index, so that all you will see on the page is you navigation and main files.
- <FRAMESET ROWS="??,??"> - Frame Rows. To set up a number of rows in a page you would replace the question marks by the size of each row. Usually, the size of at least one row is known but the the others depend on the size of the window and the screen resolution. A * is then used as a wild card, say for instance: ROWS="50,*,100", would give you a top frame of 50 pixels high and a bottom frame of 100 pixels, then the rest of the screen would become the middle frame. The row sizes can also be a percentage of the page.
- <FRAMESET COLS="??,??"> - Frame Columns. Same as for the rows, a number of frames can be set out as a number of columns and can also be declared as a percentage.
- <FRAMESET FRAMEBORDER="?"> - Frame Border. To define wether or not to have a border you can set ths tag to 1 or 0. Set to 0 and used along with BORDER="0" ensures that there is no frame borders on most browsers.
- <FRAMESET BORDER="?"> - Frame Border Thickness. Similar to the border thickness of most object, the frame border thickness can be any number of pixels thick.
- <FRAMESET BORDERCOLOR="#??????"> - Border Colour. Use the Hex Color Codes to change the colour of the borders.
- <FRAMESET FRAMESPACING="?"> - Frame Spacing. The space between adjacent frames can be set to a certain thickness (in pixels).
- <FRAME SRC="url"> - Individual Frame. Each frame has to have a source page so it can display the contents.
- <FRAME NAME="***"> - Name of frame. Each frame created should be allocated a name. This is not always necessary although it doesnt hurt to put them in. Frame names are used when linking - if you to have a link in one of your frames and you want another page to come up in that frame, you need to specify the name of the frame as the target for the link. If your frame is called "main" then use <A ... HREF="url " TARGET="main"> whan you want a linkto open in that frame.
- <FRAME MARGINWIDTH="?"> - Horizontal Margin. The width of the space on either side of a frame specified in pixels.
- <FRAME MARGINHEIGHT="?"> - Vertical Margins. Size of top and bottom margins of a particular frame. (also in pixels).
- <FRAME SCROLLING="***"> - Scrolling. Each frame can have a vertical and horizontal scrollbar. To set whether or not the scrollbars can be seen SCROLLING must be set to YES, NO, AUTO.
- <FRAME NORESIZE> - Not Resizable. If it is required that a frame must not be resized, using this option will ensure the no-one can resize the frame.
- <FRAME FRAMEBORDER="?"> - Individual Frame Border. Same as FRAMESET FRAMEBORDER, this can also be set to 1, 0 to specify whether or not that frame must have a border.
- <FRAME BORDERCOLOR="?"> - Individual Frame Border Colour. Using the Hex colour codes once again you can alter the colour of any frames border.
- <NOFRAMES></NOFRAMES> - Unframed Content. Older browsers may not be able to use frames, and in this case you would need to specify what these browsers must display (usually an error message and a link to microsoft or netscape home pages). Even though this is not as much of a problem it is still suggested that you specify the unframed content. Generally, the unframed content is treated as the body of the document b older browsers but buy using the BODY tags in between the NOFRAMES tags you will ensure that the content will be seen by older browser. Note: anything between the NOFRAMES tags will NOT show up in modern browsers.
Example on Frames: Click Here to open the example below in an new window
<FRAME NAME="top" SRC="top.html">
<FRAME NAME="left" SRC="left.html">
<FRAME NAME="middle" SRC="middle.html">
<FRAME NAME="right" SRC="right.html">
Whatever you want to say to people who cant see frames
||Copyright © 1999 Robert Duncan