Mr. A. Selva Kumar, MCA., M.Phil.,
Assistant Professor
Department of Computer Applications
Ayya Nadar Janaki Ammal College
Sivakasi
Frames
Introduction to Frames
• The HTML tags that divide a browser screen into two or more HTML
recognizable unique regions is the <FRAMESET>…</FRAMESET> tags.
• Each unique region is called a frame.
• Each frame can be loaded with a different document and hence, allow
multiple HTML documents to be seen concurrently.
The<FRAMESET>tag
• The splitting of a browser screen into frames is accomplished with the
<FRAMESET> …</FRAMESET> tags embedded into the HTML
document.
• The <FRAMESET>…</FRAMESET> tags require one of the following
two attribute depending on whether the screen has to be divided into rows or
columns.
ROWS : This attribute is used to divide the screen into multiple rows.
It can be set equal to a list of values, depending on the required size of each row.
The values can be:
 A number of pixels
 Expressed as a percentage of the screen resolution
• The symbol *, which indicates the remaining space.
COLS : This attribute is used to divide the screen into multiple columns.
It can be set equal to a list of values, depending on the required size of each column. The values can be:
 A number of pixels
 Expressed as a percentage of the screen resolution
 The symbol *, which indicates the remaining space.
Example
<FRAMESET ROWS=”33%, 33%, 33 %”> --Divides the browser screen into 3 equal horizontal
sections
<FRAMESET COLS=”50%,50%”> --Splits the 1st
Horizontal section into 2 equal
Vertical Sections
<FRAMESET>
<FRAMESET COLS=”50%,50%”> -- Splits the 2nd
Horizontal section into 2
equal Vertical Sections
</FRAMESET>
</FRAMESET>
The <FRAME> tag
• Once the browser screen is divided into rows (Horizontal Sections) and
columns (Vertical Sections), each unique section defined can be loaded with
different HTML documents.
• This is achieved by using <FRAME> tag, which takes in the following
attributes.
SRC=”url” : Indicates the URL of the documents to be loaded into the frame.
MARGINHEIGHT=”n” : Specifies the amount of white space to be left at the top and bottom of the frame.
MARGINWIDTH=”n” : Specifies the amount of white space to be left along the sides of the frame.
NAME=”name” : Gives the frame a unique name so it can be targeted by other documents. The name given
must begin with an Alphanumeric character
NORESIZE : Disables the frames resizing capability.
SCROLLING : Controls the appearance of horizontal and vertical scrollbars in a frame. This takes the
values YES/NO /AUTO.
Example
• <HTML>
• <HEAD>
• <TITLE>A simple frameset document</TITLE>
• </HEAD>
• <FRAMESET COLS="50%,50%">
• <FRAME SRC="D:OfficialHTMLsample filesEx1.html">
• <FRAME SRC="D:OfficialHTMLsample filesEx2.html">
• </FRAMESET>
• </HTML>
Output
Example
• <HTML>
• <HEAD>
• <TITLE>A simple frameset document</TITLE>
• </HEAD>
• <FRAMESET ROWS="30%, *">
• <FRAME SRC="D:OfficialHTMLsample filesEx1.html">
• <FRAME SRC="D:OfficialHTMLsample filesEx2.html">
• </FRAMESET>
• </HTML>
Output
Nested Frameset
• Nesting framesets involves including one frameset within another, which can
provide more flexibility in designing complex layouts.
• It can achieve more complex layouts by using nested tags.
• Any frame within a frameset can contain another frameset.
• For example, shows a layout of two columns, the first with two rows and the
second with three rows.
• This is created by nesting two tags with row specifications within a top-level that
specifies the columns:
Example
• <frameset cols="50%, 50%">
<frameset rows="50%, *">
<frame src="frame1.html">
<frame src="frame2.html">
</frameset>
<frameset rows=“33%, 33%,*">
<frame src="frame3.html">
<frame src="frame4.html">
<frame src="frame5.html">
</frameset>
</frameset>
Output
Thank You

Frames.pptx Frames (using the <frame> tag) are used to divide a web browser window into multiple sections, each capable of loading a separate HTML document.

  • 1.
    Mr. A. SelvaKumar, MCA., M.Phil., Assistant Professor Department of Computer Applications Ayya Nadar Janaki Ammal College Sivakasi
  • 2.
  • 3.
    Introduction to Frames •The HTML tags that divide a browser screen into two or more HTML recognizable unique regions is the <FRAMESET>…</FRAMESET> tags. • Each unique region is called a frame. • Each frame can be loaded with a different document and hence, allow multiple HTML documents to be seen concurrently.
  • 4.
    The<FRAMESET>tag • The splittingof a browser screen into frames is accomplished with the <FRAMESET> …</FRAMESET> tags embedded into the HTML document. • The <FRAMESET>…</FRAMESET> tags require one of the following two attribute depending on whether the screen has to be divided into rows or columns.
  • 5.
    ROWS : Thisattribute is used to divide the screen into multiple rows. It can be set equal to a list of values, depending on the required size of each row. The values can be:  A number of pixels  Expressed as a percentage of the screen resolution • The symbol *, which indicates the remaining space. COLS : This attribute is used to divide the screen into multiple columns. It can be set equal to a list of values, depending on the required size of each column. The values can be:  A number of pixels  Expressed as a percentage of the screen resolution  The symbol *, which indicates the remaining space.
  • 6.
    Example <FRAMESET ROWS=”33%, 33%,33 %”> --Divides the browser screen into 3 equal horizontal sections <FRAMESET COLS=”50%,50%”> --Splits the 1st Horizontal section into 2 equal Vertical Sections <FRAMESET> <FRAMESET COLS=”50%,50%”> -- Splits the 2nd Horizontal section into 2 equal Vertical Sections </FRAMESET> </FRAMESET>
  • 7.
    The <FRAME> tag •Once the browser screen is divided into rows (Horizontal Sections) and columns (Vertical Sections), each unique section defined can be loaded with different HTML documents. • This is achieved by using <FRAME> tag, which takes in the following attributes.
  • 8.
    SRC=”url” : Indicatesthe URL of the documents to be loaded into the frame. MARGINHEIGHT=”n” : Specifies the amount of white space to be left at the top and bottom of the frame. MARGINWIDTH=”n” : Specifies the amount of white space to be left along the sides of the frame. NAME=”name” : Gives the frame a unique name so it can be targeted by other documents. The name given must begin with an Alphanumeric character NORESIZE : Disables the frames resizing capability. SCROLLING : Controls the appearance of horizontal and vertical scrollbars in a frame. This takes the values YES/NO /AUTO.
  • 9.
    Example • <HTML> • <HEAD> •<TITLE>A simple frameset document</TITLE> • </HEAD> • <FRAMESET COLS="50%,50%"> • <FRAME SRC="D:OfficialHTMLsample filesEx1.html"> • <FRAME SRC="D:OfficialHTMLsample filesEx2.html"> • </FRAMESET> • </HTML>
  • 10.
  • 11.
    Example • <HTML> • <HEAD> •<TITLE>A simple frameset document</TITLE> • </HEAD> • <FRAMESET ROWS="30%, *"> • <FRAME SRC="D:OfficialHTMLsample filesEx1.html"> • <FRAME SRC="D:OfficialHTMLsample filesEx2.html"> • </FRAMESET> • </HTML>
  • 12.
  • 13.
    Nested Frameset • Nestingframesets involves including one frameset within another, which can provide more flexibility in designing complex layouts. • It can achieve more complex layouts by using nested tags. • Any frame within a frameset can contain another frameset. • For example, shows a layout of two columns, the first with two rows and the second with three rows. • This is created by nesting two tags with row specifications within a top-level that specifies the columns:
  • 14.
    Example • <frameset cols="50%,50%"> <frameset rows="50%, *"> <frame src="frame1.html"> <frame src="frame2.html"> </frameset> <frameset rows=“33%, 33%,*"> <frame src="frame3.html"> <frame src="frame4.html"> <frame src="frame5.html"> </frameset> </frameset>
  • 15.
  • 16.