Working with HTML Frames - PowerPoint PPT Presentation

1 / 27
About This Presentation
Title:

Working with HTML Frames

Description:

Creating a framed page is like specifying a 'blueprint' for a house ... Can detract from message conveyance. Can be distracting if not used correctly ... – PowerPoint PPT presentation

Number of Views:37
Avg rating:3.0/5.0
Slides: 28
Provided by: lab2147
Category:

less

Transcript and Presenter's Notes

Title: Working with HTML Frames


1
Working with HTML Frames
  • The Good, The Bad The Ugly

2
Frames Overview
  • Method of dividing the browser window into two or
    more sub-windows
  • Creating a framed page is like specifying a
    blueprint for a house
  • No content is specified in the HTML script that
    creates a framed page
  • Use frames only when absolutely needed

3
Frames A Blessing A Curse
  • Can be used to organize information
  • Can be used for consistency
  • Can detract from message conveyance
  • Can be distracting if not used correctly

4
Frame Basics
  • No ltbodygtlt/bodygt Container
  • Individual framesets can only be specified in
    rows or columns, but never both
  • Nested framesets are okay to use (allows us to
    use both rows and columns in the same page)

5
Frame Syntax - ltframesetgt
  • Container that acts as a blueprint in which all
    frames are specified
  • Can be specified only in rows or columns, but
    never both
  • Can contain nested framesets
  • Several attributes
  • Syntaxltframesetgtlt/framesetgt

6
Attribute border
Found In ltframesetgt
  • Specifies the frame border thickness between
    frames
  • Takes a value in pixels
  • Syntaxltframeset border2gt

7
Attribute bordercolor
Found In ltframesetgt
  • Specifies the border color
  • Takes color names or hex values
  • Support for this attribute is limited
  • Syntaxltframeset bordercolorbluegt

8
Attribute cols
Found In ltframesetgt
  • Specifies how the frameset is to be built using
    columns
  • Establishes both number of columns and their
    sizes
  • Sizes can be specified in relative or absolute
    measurements
  • Syntaxltframeset cols85,,85gt

9
Attribute rows
Found In ltframesetgt
  • Specifies how the frameset is to be built using
    rows
  • Establishes both number of rows and their sizes
  • Sizes can be specified in relative or absolute
    measurements
  • Syntaxltframeset rows30,gt

10
Attribute frameborder
Found In ltframesetgt
  • Specifies whether or not a 3-D separator will be
    added between frames
  • IE and Navigator differ in frameborder values
  • IE takes 1 for yes and 0 for no
  • Navigator takes yes or no
  • Syntaxltframeset frameborder0 frameborder
    nogt

11
Frame Syntax - ltframegt
  • Independent tag that defines a single frame
  • Helps define the content of a frame
  • Found nested within ltframesetgtlt/framesetgt
  • Several attributes
  • Syntaxltframe attribute1 attribute2 gt

12
Attributes bordercolor frameborder
Found In ltframegt
  • Same purpose as the same attributes found in
    ltframesetgtlt/framesetgt
  • Same syntaxltframe bordercolorFF0000 framebo
    rder1 frameborderyesgt

13
Attribute name
Found In ltframegt
  • Gives a frame a name
  • Required for referencing that frame as a target
    in hypertext references
  • Syntaxltframe nametopTitlegt

14
Attribute src
Found In ltframegt
  • Specifies the source of the HTML file initially
    loaded into a given frame
  • Required
  • Can take absolute or relative pathnames
  • Syntaxltframe srclabs/lab1.htmlgt

15
Attribute src
Found In ltframegt
  • Specifies the source of the HTML file initially
    loaded into a given frame
  • Required
  • Can take absolute or relative pathnames
  • Syntaxltframe srclabs/lab1.htmlgt

16
Attribute marginwidth
Found In ltframegt
  • Specifies the amount of space between the left
    and right edges of a frame and the frame contents
  • Specified in pixels
  • Syntaxltframe marginwidth10gt

17
Attribute marginheight
Found In ltframegt
  • Specifies the amount of space between the top and
    bottom edges of a frame and the frame contents
  • Specified in pixels
  • Syntaxltframe marginheight10gt

18
Attribute noresize
Found In ltframegt
  • Specifies that the user will not be able to
    resize a frame
  • Needs only to be specified once in an individual
    frameset
  • Takes no values
  • Syntaxltframe noresizegt

19
Attribute scrolling
Found In ltframegt
  • Specifies whether or not a scrollbar appears in a
    frame
  • Three possible values
  • yes
  • no
  • auto
  • Syntaxltframe scrollingautogt

20
Attribute longdesc
Found In ltframegt
  • Specifies a link to a document containing a text
    description of a frame
  • Used for non-visual browsers
  • Syntaxltframe longdesclabs/lab1Desc.htmlgt

21
Frame Syntax - ltnoframesgt
  • Container that defines content for browsers that
    do no read frames
  • Found after lt/framesetgt tag
  • No attributes
  • SyntaxltnoframesgtYour browser does not support
    frames. Upgradeor die a slow, painful
    death!lt/noframesgt

22
Nesting Framesets
  • ltframeset rows20,gt
  • ltframe nametitlegt
  • ltframeset cols120,gt
  • ltframe nametocgt ltframe namemaingt
  • lt/framesetgt
  • lt/framesetgt

23
Targeting Frames
  • Target frames using the standard anchor tag - lta
    href gt
  • Target is defined in content pages only, not in
    ltframesetgtlt/framesetgt
  • Uses the target attribute
  • target attribute identifies the frames name

24
Targeting Frames
  • Syntaxlta hrefmypage.html targetmaingtOpen
    page in main frame!lt/agt

25
Targeting Frames
  • Reserved target values_blank_self_parent_top
  • Syntaxlta hrefmypage.html target_blankgtOp
    en page in a new window!lt/agt

26
Using the ltbasegt tag
  • Allows you to specify a default target for all
    links in a document
  • Saves a lot of typing
  • Found in the ltheadgtlt/headgt
  • Syntaxltheadgt ltbase targetmaingtlt/headgt

27
Questions?
Write a Comment
User Comments (0)
About PowerShow.com