top of page
×
lesson five.
HTML Frames
✮ HTML Frames:
- Frames are basically multiple regions on the browser. It is used to display more than one HTML on the same browser window. Frames are inserted within the <FRAMESET>...</FRAMESET> tag. The <FRAMESET>...</FRAMESET> tag replaces the <BODY>...</BODY> in the structure of the HTML document. This encompasses the entire frame area (usually the whole browser window).
✮ Using Frames
- The size of the frames can be represented by either relative or absolute measurement. The asterisk (*) is used to indicate that the next row or column will occupy the remaining space of the browser window.
✮ Defining a frameset:
However, there are still some disadvantages that should be considered:
✮ Too many frames in a single window can make downloading time slow.
✮ Frame-based site are sometimes ignored by search engines.
✮ Frames can have navigation problem if the user has accessed the HTML document contained in the frames instead of accessing the frameset document. Frame-based site usually places the site navigation on a separate HTML document.
✮ Some old browsers do not support frames.





















<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head><title>Basic Frameset Document</title></head>
<frameset>
<frame />
<frame />
</frameset></html>











- The idea of creating frames is almost the same as tables. It also consists of rows and columns. You can specify the number and sizes of these columns and rows. Shown below is the basic attributes of the <FRAMESET>... </FRAMESET> tag.
<frameset rows= "40%, 60%">...</frameset>
<frameset columns = "100,*">...<frameset>
- Inside the <FRAMESET>...</FRAMESET> tag, a number of <FRAME>...</FRAME> tags are inserted. Below are the basic attributes of the <FRAME>...</FRAME> tag:
<FRAME SRC="URL" NAME="name of frame" >
- Frames enable the browser to display more than one HTML document on the same window at the same time. Frames advantages and disadvantages are listed here to guide you in deciding whether or not implementing frames is suitable for your Web site. The frames is advantageous when creating the following effects on your Web site:
✮ Display multiple pages on the same window
✮ Keep some content static while other parts of the page changes
✮ When seamless frames are applied, it can create the illusion of a single page with dynamically changing content.
✮ Frames are created by defining elements on the frameset document. A frameset document is an HTML document that replaces the <body> tag with the
<frameset> tag.
The frameset document uses the following tags:
✮ <frameset> - container of the frames to be displayed on the browser window.
✮ <frame> the element that defines the HTML document that will be displayed on a specific region of the browser window.
✮ Code:
✮ Syntax:
<frameset cols="nl/nl%, nl|n1%...,*"
rows="nl|n1%, nl/nl%...,*" frameborder="110"
border="n" bordercolor="colorcode"
framespacing="n">
where:
✮ cols - divides the frameset vertically by specifying the dimensions of each frame.
The asterisk (*) is used to indicate the remaining unassigned space on the browser window.
✮ Rows divides the frameset horizontally by specifying the dimensions of each frame
✮ frameborder frame border - activate/deactivates the
✮ border specifies the thickness of the border
✮ bordercolor frame border specifies the color of the
✮ framespacing specifies the amount of space between the frames
The frameset is the master document that controls how other HTML document will be displayed on specific regions of the browser window. Use the following syntax and attribues to define a frameset:
✮ Frame:
- The <frame> tag is used to represent a region on the browser window and display the HTML document. To define a frame use the following syntax and attributes:
✮ Syntax:
<frame src="URL" marginheight="n"
marginwidth="" noresize="noresize"
longdesc="description here" frameborder="0|1" border="n" bordercolor="colorcode" name="name"
scrolling="yes|no">
where:
✮ src specifies the URL of the document to be displayed on the frame
✮ marginheight and marginwidth - controls the margins in the frame
✮ noresize frames - prevents users from resizing the
✮ frameborder activates/deactivates the - frame border of individual frames
✮ border specifies the thickness of the frame border
✮ bordercolor frame border specifies the color of the
✮ scrolling - activate/deactivates scrolling within the frame




bottom of page