HTML Frame Tag

<frame> tag is a website organising tool of HTML. It is used to divide your browser window in various segments for multiple purposes. Here every segment can load separate HTML document. Each segment can work autonomously or alongwith other segments/frames.

There is one more important term i.e. A Frameset which is a collection of all the frames in a browser window. Browser's screen can be splitted into frames using <frameset> tag.

Why Frames?

  • The user can see multiple pages in one browser window.
  • It reduces server load as if you visit a new page, it does not reload all the pages.
  • With the help of frames, we can use the page as static as well as dynamic i.e. we can maintain one part static and other parts as dynamic at the same time.

Disadvantages of using Frames

  • There is a possibility that the webpage is displayed differnt on different csystems due to screen resolution.
  • Search engines will face a problem while dealing with them in a proper manner as simple webpage.
  • Some browsers do not support frames.
  • Page navigation becomes problematic or slow if a webpage has many frames.

Syntax

<frameset rows="20%,20%,60%">
   <frame name="X" src="../X_Frame.htm" />
   <frame name="Y" src="../Y_Frame.htm" />
   <frame name="Z" src="../Z_Frame.htm" />
</frameset>

Example

<!DOCTYPE html>
<html>
<head>
<title>My HTML Frame Tag Example</title>
</head>
<frameset rows="50%,50%">
   <frame name="X" src="html-phrase-tag-Live-Demo.php" />
   <frame name="Y" src="html-phrase-tag-Live-Demo.php" />
</frameset>
</body>
</html>

This will produce following result

Frame Attributes List

The below table contains Frame Attributes and their description which is supported by HTML version.

Attribute NameAttribute ValueAttribute Description
srcURLrefers to the url of the document to be loaded into the frame
marginwidthpixelsrefers to space to be left along the sides of the frame
marginheightpixelsrefers to space to be left at the top and bottom sides of the frame
nametextrefers to a unique name for the frame
noresizepixelsrefers to disabling the resizing of the frame
scrollingpixelsrefers to to decide whether to have scrollbarsin a frame
longdescURLrefers to to decide whether to have scrollbarsin a frame
frameborderpixelsrefers to URL to the document containing long description of the frame

See Also

HTML Form Tags
HTML Page Formating Tags
HTML Other Tags


 
 
SHARE THIS IF YOU LIKE!
submit to reddit

SUBSCRIBE FOR LATEST UPDATES
HAVE WE CONNECTED ON FACEBOOK?
TOP TUTORIALSTOP CODE EXAMPLESTOP LIVE DEMOLINKSSTAY CONNECTED
HTML Tutorial
HTML5 Tutorial
Bootstrap3 Tutorial
Javascript Tutorial
TypeScript Tutorial
AngularJS Tutorial
CSharp Tutorial
PHP Tutorial
Developer Tools
Javascript
AngularJS
Google MAP API V3
ASP.NET
Javascript
AngularJS
Google MAP API V3
Contact Us
Advertise with Us
Privacy Policy
Disclaimer
Stay connected. We actually like you. If you want to get up to the minute updates, then connect with us on your fav below.
 
Twitter   Linkedin   Facebook   Google+    RSS   Pinterest
 
Protected by Copyscape Original Content Checker
 
 
Copyright ©2017 www.techstrikers.com Unauthorized reproduction/replication of any part of this site is prohibited.