Using Frames in
a Web Page
Tutorial V
FRAMES
are windows appearing within the
browser’s display area, each capable
of displaying the contents of a
different HTML file.
Things to consider before
creating your frames:
– What information will be displayed in
each of the frames?
– How do you want the frames placed on
the Web Page? What is the size of each
frame?
– Which frames will be static—that is,
always showing the same content?
Things to consider before
creating your frames:
– Which frames will change in response to
hyperlinks being clicked?
– What Web pages will users see first
when they access the site?
– Do you want to allow users to resize the
frames and change the layout of the
page?
Creating Frame Layout
<HTML>
<HEAD>
<TITLE> Page Title </TITLE>
</HEAD>
<FRAMESET>
Frame definitions
</FRAMESET>
</HTML>
Syntax:
• <FRAMESET ROWS=”row height,
row height, row height,…..”>
• <FRAMESET COLS=”column width,
column width, column width, …”>
Specifying a Frame Source
To specify the source for the frame’s
content, enter following HTML tag:
<FRAME SRC = document>
where document is the filename or
URL of the page that you want to
display in the frame.
Nesting <FRAMESET> Tags
EXAMPLE:
<HTML>
<HEAD>
<TITLE> The Colorado Experience </TITLE>
</HEAD>
<FRAMESET ROWS=”60, *”>
<!--- Company Logo --->
<FRAME SRC = “Head.htm”>
<!!--- Nested frames ---->
<FRAMESET COLS=”140,*”>
</FRAMESET>
</FRAMESET>
</HTML>
Controlling the Appearance of
Scroll Bars
Syntax:
<FRAME SRC=document
SCROLLING = value>
Where value can be either YES (to
display scroll bars) or NO (to
remove scroll bars)
Frame’s margin
MARGINWIDTH – is the amount of
space that appears to the page’s left
and right.
MARGINHEIGHT – is the amount of
space (in pixels) that appears above
and below the content of the page
margin.
Syntax:
<FRAME SRC=document
MARGINHEIGHT=value
MARGINWIDTH=value>
To keep users from resizing
frames, enter the tag:
<FRAME SRC=document
NORESIZE>
<BASE> tag
it appears within the <HEAD> tags of
your HTML file and used to specify
global options for the page. One
property of the <BASE> tag is the
TARGET property, which identifies
a default target for all of the page’s
hyperlinks.
Magic target names
are special names reserved by HTML
that can be used in place of a frame
name as a target for a hypertext link.
Magic Target
Magic target name Description
_blank Loads the document into a new
window
_self Loads the document into the
same frame or window that
contains the hyperlink tag.
_parent In a layout of nested frames,
loads the document into the
frame that contains the frame
with the hyperlink tag.
_top Loads the document into the full
display area, replacing the
current frame layout.
<NOFRAMES> tag
identifies a section of your HTML file
that contains code to be read by
frame-blind browsers.
Using Frames Extensions
To define a color for your frame borders,
use the following tags:
<FRAMESET BORDERCOLOR=color>
Or
<FRAME BORDERCOLOR=color>
where color is either the color name or
color value.
Using Frames Extensions
To change the width of your frame
borders, use the tag:
<FRAMESET BORDER=value>
where value is the width of the border
in pixels.
Fin

Html tutorial 5

  • 1.
    Using Frames in aWeb Page Tutorial V
  • 2.
    FRAMES are windows appearingwithin the browser’s display area, each capable of displaying the contents of a different HTML file.
  • 3.
    Things to considerbefore creating your frames: – What information will be displayed in each of the frames? – How do you want the frames placed on the Web Page? What is the size of each frame? – Which frames will be static—that is, always showing the same content?
  • 4.
    Things to considerbefore creating your frames: – Which frames will change in response to hyperlinks being clicked? – What Web pages will users see first when they access the site? – Do you want to allow users to resize the frames and change the layout of the page?
  • 5.
    Creating Frame Layout <HTML> <HEAD> <TITLE>Page Title </TITLE> </HEAD> <FRAMESET> Frame definitions </FRAMESET> </HTML>
  • 6.
    Syntax: • <FRAMESET ROWS=”rowheight, row height, row height,…..”> • <FRAMESET COLS=”column width, column width, column width, …”>
  • 7.
    Specifying a FrameSource To specify the source for the frame’s content, enter following HTML tag: <FRAME SRC = document> where document is the filename or URL of the page that you want to display in the frame.
  • 8.
    Nesting <FRAMESET> Tags EXAMPLE: <HTML> <HEAD> <TITLE>The Colorado Experience </TITLE> </HEAD> <FRAMESET ROWS=”60, *”> <!--- Company Logo ---> <FRAME SRC = “Head.htm”> <!!--- Nested frames ----> <FRAMESET COLS=”140,*”> </FRAMESET> </FRAMESET> </HTML>
  • 9.
    Controlling the Appearanceof Scroll Bars Syntax: <FRAME SRC=document SCROLLING = value> Where value can be either YES (to display scroll bars) or NO (to remove scroll bars)
  • 10.
    Frame’s margin MARGINWIDTH –is the amount of space that appears to the page’s left and right. MARGINHEIGHT – is the amount of space (in pixels) that appears above and below the content of the page margin.
  • 11.
  • 12.
    To keep usersfrom resizing frames, enter the tag: <FRAME SRC=document NORESIZE>
  • 13.
    <BASE> tag it appearswithin the <HEAD> tags of your HTML file and used to specify global options for the page. One property of the <BASE> tag is the TARGET property, which identifies a default target for all of the page’s hyperlinks.
  • 14.
    Magic target names arespecial names reserved by HTML that can be used in place of a frame name as a target for a hypertext link.
  • 15.
    Magic Target Magic targetname Description _blank Loads the document into a new window _self Loads the document into the same frame or window that contains the hyperlink tag. _parent In a layout of nested frames, loads the document into the frame that contains the frame with the hyperlink tag. _top Loads the document into the full display area, replacing the current frame layout.
  • 16.
    <NOFRAMES> tag identifies asection of your HTML file that contains code to be read by frame-blind browsers.
  • 17.
    Using Frames Extensions Todefine a color for your frame borders, use the following tags: <FRAMESET BORDERCOLOR=color> Or <FRAME BORDERCOLOR=color> where color is either the color name or color value.
  • 18.
    Using Frames Extensions Tochange the width of your frame borders, use the tag: <FRAMESET BORDER=value> where value is the width of the border in pixels.
  • 19.