DON'T USE FRAMES.
The MENU FRAME - This frame contains the site menu which remains perpetually within the browser viewport. Clicking on links in this frame will load new pages into the CONTENT FRAME. The MENU FRAME initially loads menu.htm which is a separate and distinct web page. Click here to see menu.htm displayed outside of the frame layout. (Restore frame layout.) |
The CONTENT FRAME - This frame can be scrolled and contains the main content pertaining to whatever link the user clicks on in the MENU FRAME on the left. The CONTENT FRAME initially loads chapter1.htm which is a separate and distinct web page. Click here to see chapter1.htm displayed outside of the frame layout. (Restore frame layout.) |
<body>...</body>
tags. These are replaced by the <frameset>...</frameset>
tags which are used to define the frames. Here's the frameset document source code used to create our basic frame layout:<html>
<head>
<title>HTML Frames - A Basic Frame Layout</title>
</head>
<frameset cols="25%,75%">
<frame src="menu.htm" name="menu">
<frame src="chapter1.htm" name="content">
</frameset>
</html>
cols
attribute is used in the <frameset>
start tag to split the page vertically into two or more columns. The value of the cols
attribute is a comma-separated list of width percentages totalling to 100% of the browser viewport. Hence, in this example, the cols="25%,75%"
attribute/value pair splits the browser viewport into two columns. The first column on the left spans 25% of the full width of the browser viewport while the second column on the right spans the remaining 75%. In this frame layout, each column represents one frame.<frameset>
start tag with a cols="150,*"
attribute/value pair will create two frame columns: a left frame column that spans 150 pixels in width and a right frame column that spans the remainder of the available space.rows
attribute is used in the <frameset>
start tag to split the page horizontally into two or more rows. The value of the rows
attribute is a comma-separated list of height percentages totalling to 100% of the height of the browser viewport. Hence, in this example, the rows="25%,75%"
attribute/value pair splits the web page into two rows. The top row spans 25% of the full height of the browser viewport while the bottom row spans the remaining 75%. In this frame layout, each row represents one frame.<frameset>
start tag with a rows="150,*"
attribute/value pair will create two frame rows: a top frame row that spans 150 pixels in height and a bottom frame row that spans the remainder of the available space.<frame>
tags in the frameset document. Note that the frame
element is an empty element thereby requiring no end tag. Each <frame>
tag in the frameset document corresponds to one framed section on your web page. cols
attribute in the <frameset>
tag and thereby requires two <frame>
tags. These are placed in between the <frameset>...</frameset>
tags in the frameset document. <html>
<head>
<title>HTML Frames - A Basic Frame Layout</title>
</head>
<frameset cols="25%,75%">
<frame src="menu.htm" name="menu">
<frame src="chapter1.htm" name="content">
</frameset>
</html>
src
attribute is used in each <frame>
tag to designate the HTML document to be initially loaded in that particular frame. Hence, in the above example, two frame source documents —menu.htm
and chapter1.htm
— are initially loaded into the frame layout. In this example, the src
attributes use relative addressing and hence all documents (both frameset and frame source) are placed in the same web directory in order to properly function together as a frame layout.name
attribute is used in each <frame>
tag to help with the special handling of hyperlinks required when using frames. The value of the name
attribute can be anything you want as long as it's unique.menu.htm
and chapter1.htm
) is written up using the standard or essential web page structure.
Free Text Editors
Free Graphics Editors
Website Analysis Tools
Free Website Templates
See also:
If you need a .COM web address, you can get one quick and easy at...
INTRO | TOP | NEXT ~> |