How to Make a Frameset

The frameset HTML tag defines the layout of a Web page using frames by creating a table consisting of rows and columns. Each cell within the table is then assigned a Web page to display using "<frame>" tags that are typed between the opening and closing frameset tags. Rows and columns are defined using the "rows" and "cols" properties in the frameset tag, along with the height of each row and width of each column. Frames can be complicated to understand at first, but with some experimentation, you can create a great frame layout for your own website.

Instructions

    • 1

      Open your Web page document in an HTML or text editor. To open the document using a native Windows text editor, right-click the document, then click "Open With." Click to highlight "Notepad" or "WordPad" in the applications list, then click the "OK" button.

    • 2

      Click to place your cursor after the "</head>" tag that defines the end of the "Head" portion of the document. Press "Enter" to create a blank line.

    • 3

      Type "<frameset" and press "Spacebar" to create the first part of the opening frameset tag.

    • 4

      Type "cols='50%,50%'" to create two columns, each with a width of 50 percent of the page. Replace the "50%" values with your desired width for each column. To add another column, type a comma followed by the width as a percentage for the new column. These column widths should add up to 100 percent to avoid layout problems. Column widths can also be defined as a number of pixels. For example, type "cols='100,200,600'" to create three columns with widths of 100, 200 and 600 pixels. You can also replace any column width value with the "*" symbol to make the column fill up the available width.

    • 5

      Type "rows='50%,50%'" to create two rows that are each 50 percent of the height of the page. Replace the "50%" value with the desired height for each row. To add another row, type a comma followed by the width of the row. The "rows" property may be used in place of the "cols" property or they can be combined to create a table with both columns and rows. Like the "cols" tag, you can replace any row height value with the "*" symbol to make the row fill up the available height and you can also define the row height using pixels instead of a percentage.

    • 6

      Type ">" to close the opening frameset tag, then press "Enter."

    • 7

      Type the "<frame>" tags to define the content of the frames. Depending on how many columns or frames you have defined, you may need to create several "<frame>" tags. The basic format of a frame tag is "<frame src='[webpage.html]'>". Replace the "[webpage.html]" text with the URL (if the page in not in the same directory as the current Web page document) and name of the page you want to display in the frame.

    • 8

      Type "</frameset>" to close the main frameset tags

    • 9

      Click the "File" menu, then click "Save" to save the document.

Tips & Warnings

  • If you want to divide the rows or columns defined in the main frameset tags into more rows or columns, type "<frameset cols='25%,*'>" or "<frameset rows='25%,*'>" between a pair of existing "<frameset>" and "</frameset>" tags. Change the width or height for each row or column to your desired value, or type a comma and add another value to break up the row or column into more rows and columns. Type "</frameset>" to close the frameset that divides the first row or column. Create another frameset tag to define the next row or column in order, if desired.

Related Searches:

References

Comments

Related Ads

Featured