Html tutorial 5

Embed Size (px)

Citation preview

Slide 1

Using Frames in a Web Page

Tutorial V

FRAMES

are windows appearing within the browsers 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 staticthat 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

Page Title Frame definitions

Syntax:

Specifying a Frame Source

To specify the source for the frames content, enter following HTML tag:

where document is the filename or URL of the page that you want to display in the frame.

Nesting Tags

EXAMPLE:

The Colorado Experience

Controlling the Appearance of Scroll Bars

Syntax:

Where value can be either YES (to display scroll bars) or NO (to remove scroll bars)

Frames margin

MARGINWIDTH is the amount of space that appears to the pages left and right.

MARGINHEIGHT is the amount of space (in pixels) that appears above and below the content of the page margin.

Syntax:

To keep users from resizing frames, enter the tag:

tag

it appears within the tags of your HTML file and used to specify global options for the page. One property of the tag is the TARGET property, which identifies a default target for all of the pages 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 nameDescription

_blankLoads the document into a new window_selfLoads the document into the same frame or window that contains the hyperlink tag._parentIn a layout of nested frames, loads the document into the frame that contains the frame with the hyperlink tag._topLoads the document into the fulldisplay area, replacing thecurrent frame layout.

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:

Or

where color is either the color name or color value.

Using Frames Extensions

To change the width of your frame borders, use the tag:

where value is the width of the border in pixels.

Fin