0% found this document useful (0 votes)
11 views5 pages

HTML FRAMES (1)

HTML frames allow a browser window to be divided into multiple sections, each displaying separate HTML documents, which can be useful for keeping certain elements stationary. However, frames are considered obsolete in HTML5 due to compatibility issues with smaller screens. The document also explains the <frameset> and <frame> tags, their attributes, and how to use them, including the <NOFRAMES> tag for unsupported browsers.

Uploaded by

saudmirzabaig
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views5 pages

HTML FRAMES (1)

HTML frames allow a browser window to be divided into multiple sections, each displaying separate HTML documents, which can be useful for keeping certain elements stationary. However, frames are considered obsolete in HTML5 due to compatibility issues with smaller screens. The document also explains the <frameset> and <frame> tags, their attributes, and how to use them, including the <NOFRAMES> tag for unsupported browsers.

Uploaded by

saudmirzabaig
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

HTML FRAMES

1. Write the advantages and the disadvantages of using frames


HTML frames are used to divide a browser window into multiple sections where each section can
load a separate html document in it. Frames are very useful when you want to keep some elements
on the page stationary while changing the content of the other areas.

Disadvantages of frames
Frames are obsolete in HTML5 as most devices with small screens are not compatible with frames

2. What’s a frameset?
A collection of frames in the browser window is called as a frameset. To use frames on a web page
instead of <body> we use <frameset>. <frameset> tag defines how to divide the window into
multiple frames. FRAMESET is a master HTML document that defines the arrangement of the
frames on the page. FRAMESET is responsible for allotting space for each frame in it.

3. Attributes of <FRAMESET>
 ROWS- Specifies that the window is to be split into horizontal frames with the width of
frames separated by commas
<frameset rows="50% , 50%">

 COLS- specifies that the window is to be split into vertical frames with the width of each
frame separated by commas
<frameset cols="50% , *">
Width could be in pixels, % or it could be given in * (asterisk represents the remaining
available space)
 Border – specifies the thickness in pixels. Default is 5px
<frameset border=6> (specifies that all frames which are part of this frameset will be having
a border of 6px)

 Bordercolor – specifies the color of the frame border


<frameset border=6 bordercolor=red>

 Frameborder – specifies whether the border of all frames in the frameset should be visible
or not.

Values it could be Yes or No


<frameset frameborder=no>

Page 1 of 5
4. What is the use of <FRAME> tag?
A frame defines a rectangular region with in the frameset. Each frames can display separate
documents, including scrollbars and borders.
5. Attributes of <FRAME>
 src – specifies the URL of the document to be displayed in the frame. If src is not given, an
empty frame will be displayed
<frame src="trial1.html">

 name - specifies the name of the frame. Its required for linking between frames. Frame name
must start with an alpha numeric character or an underscore
<frame name="frm1">

 Frameborder – specifies whether the border of the frameset should be visible or not.
It takes Yes or No value

 Marginheight- specifies the distance between the top and bottom edges of the frame and the
frame contents

 Marginwidth- specifies the distance between the left and right edges of the frame and the
frame contents

 Scrolling – specifies the status of the scrollbars. It can take values YES, NO or AUTO

YES- scrollbars are always available


NO- scrollbars are never available
AUTO- the browser decides whether to display scrollbars depending on the size and content
of the frame

 NORESIZE- It prohibits users from resizing a frame. Without this attribute the visitors can
drag and resize the frames

VERTICAL FRAMES

FRAME A FRAME B

Page 2 of 5
HORIZONTAL FRAMES

FRAME A

FRAME B

EQUISIZED FRAMES
FRAME A FRAME B

FRAME C FRAME D

UNEQUAL SIZED FRAMES


FRAME A

FRAME B FRAME C

Page 3 of 5
7. What is the purpose of <NOFRAMES> tag?
If a browser does not support frames the message between the <NOFRAMES> tags will be
displayed. The browsers supporting FRAMES ignore the message given in <NOFRAMES>
<HTML>
<FRAMESET COLS=" 50%, * ">
<FRAME SRC=" home.html ">
<FRAME SRC=" table.html ">
</FRAMESET>
<NOFRAMES>
<P> Your browser doesn’t support frames </p>
<A href=" home1.html "> click here to see the page without frames </A>
</NOFRAMES>

8. How to link to a frame using target attribute?


Target attribute can take the name of a frame in which the hyperlink information should be
displayed.
<frame src="LIST.html" name="WIN"> (There is a frame named WIN)

<A href = "home.html" TARGET="WIN"> (home.html will be opened in the window WIN, so it
will overwrite the content in that fame to display home.html)

9. Explain any 3 values of TARGET attribute.


TARGET is an attribute of <A> tag (Anchor tag). It determines where the linked page should open.
 Target=_self
The page will be opened in the current window itself
 Target=_blank
The page will be opened in a new window
 Target=_top
The page will be loaded in a new page which is placed over the top of the current
frameset

Page 4 of 5
10. Write html code to create the following frame set

D.html
A.html

C.html
B.html E.html

<html>
<head> <title> frame1 </title> </head>
<frameset cols="*,*,*">
<frameset rows="50%, 50 %">
<frame src="A.html">
<frame src="B.html">
</frameset>
<frame src="C.html">
<frameset rows="50%, 50 %">
<frame src="D.html">
<frame src="E.html">
</frameset>
<html>

Page 5 of 5

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy