WordPress Websites for Engineers: Elevate Your Brand
Frames and its components
1. Frames and its components!
How to open different windows in one Webpage?
2. <frame> What is a frame? </frame>
Frames allow an author to divide a browser window into multiple (rectangular) regions. Multiple
documents can be displayed in a single window, each within its own frame. Graphical browsers
allow these frames to be scrolled independently of each other, and links can update the
document displayed in one frame without affecting the others.
You can’t just “add frames” to an existing document. Rather, you must create a frameset
document that defines a particular combination of frames, and then display your content
documents inside those frames. The frameset document should also include alternative non-
framed content in a NOFRAMES element.
3. Drawbacks or limitations of frame
• Some smaller devices cannot cope with frames often because their
screen is not big enough to be divided up.
• Sometimes your page will be displayed differently on different
computers due to different screen resolution.
• The browser's back button might not work as the user hopes.
• There are still few browsers that do not support frame technology.
4. <code> Explanation with example </code>
<!DOCTYPE html> Telling what standards should be used
<html> Opening of html document
<head> Starting of head
<title>HTML Frames</title> Title of the page
</head> Closing of head
<frameset rows = "10%,80%,10%"> frameset to define the sets of frame and rows to specify the rows in the frameset
<frame name = "top" src = "/html/top_frame.htm" /> frame name and the source address to display in this window
<frame name = "main" src = "/html/main_frame.htm" /> frame name and the source address to display in this window
<frame name = "bottom" src = "/html/bottom_frame.htm" /> frame name and the source address to display in this window
<noframes> noframes to display the thing when your browser doesn’t support frames
<body>Your browser does not support frames.</body> What to show when frames are not supported
</noframes> Closing of noframe
</frameset> Closing of frameset
</html> Closing of html document
5. • TOP with 10% row size.
• MAIN with 80% row size.
• BOTTOM with 10% row size.
<output>Output</output>
6. Browser Support for Frames
If a user is using any old browser or any browser which does not support frames
then <noframes> element should be displayed to the user.
So you must place a <body> element inside the <noframes> element because
the <frameset> element is supposed to replace the <body> element, but if a
browser does not understand <frameset> element then it should understand
what is inside the <body> element which is contained in a <noframes> element.
THE HTML 5 DOES NOT SUPPORT FRAMES INSTEAD IT SUPPORTS iFRAMES
7. <attributes> Attributes of frame tag </attributes>
Following are the important attributes of <frame> tag :-
Attribute Syntax
1. src <frame src=“URL of file to be loaded” />
2. name <frame name=“providing name to the frame” />
3. frameborder <frame frameborder=“0/1” /> true for 1 and false for 0.
4. marginwidth <frame marginwidth=“margin widths in pixels” />
5. marginheight <frame marginheight=“margin heights in pixels” />
6. noresize <frame noresize> doesn’t allow user to resize the frame.
7. scrolling <frame scrolling=“yes/no/auto”>
8. longdesc <frame longdesc=“link to long description(URL)” />
9. align <frame align=“vertical or horizontal alignment” />
8. In the above frames we have added noresize in FRAME 3 and
FRAME 4 because of this we can’t change the size of those
frames but,
we can change that of frame 1 and frame 2 as shown in the
screenshots here.
FRAME 4
FRAME 1
FRAME 3
FRAME 2