HTML FRAMES (12.1)

HTML frames 1

A container window which can display a web page is known as Frame. Each frame can display separate HTML document. A webpage can be divided into many frames, each displaying different HTML documents simultaneously. The tag used for this purpose is <frameset>….</frameset>. This tag specifies the number of frames in a web page and their styles. Following are important attributes of this tag:


FRAMESET ATTRIBUTES VALUES
Cols It divides the screen in specified no of columns. Its value can be given in:

  • Percentage of screen
  • No of Pixels
  • “*” this symbol means all the remaining space.
Rows It divides the screen in specified no of rows. Its value can be given in:

  • Percentage of screen
  • No of Pixels
  • “*” this symbol means all the remaining space.

In each frame <frame>…</frame> tag is used to specify which HTML document is going to be displayed. Following is the syntax to divide a page into frames: <frameset> <frame> . . . </frame> </frameset> Note that frame tag is used inside frameset tag.
The attributes to <frame> …</frame> tag pair are following:

FRAME TAG ATTRIBUTES DISCRIPTION
Src It is used to specify the source of page to be displayed in the frame.
Marginheight It is used to specify the space to be left at the top and bottom sides of the frame.*
Marginwidth It is used to specify the space to be left at the sides of the frame.
Name It is used to name the frame.
Scrolling It is used to specify the appearance of horizontal and vertical scrollbars. It can have three values:

  • Yes
  • No
  • Auto

The <noframes>…..</noframes> tag is used in browsers which do not support frames. You can write a text that you want to be displayed in case no frames are displayed in the user browser. The syntax of <noframes> is:

<noframes>

<body>……..</body>

</noframes>

For more visit next posts in this category.To go back to Contents of this tutorial: Contents of HTML Tutorial

 

email

One Response to HTML FRAMES (12.1)

  1. Matt Damon says:

    Awesome blog! I just bookmarked it.

Leave a Reply