Basic HTML

Advance HTML

HTML Tags Reference

HTML Code Generator


HTML <frame> Tag


HTML <frame> tag define a split the browser window in several individual frame that open URL source for seprate contain frame.

Frame are use to improve appearence and usebility of a site.

HTML <frame> tag remove in HTML5 specification.

HTML document within frame may be include link to other web pages can be opened in the desired frame.

to know Advantages of Frames or Disadvantages of Frames.


Frame Example.1       View Result

The frameset (frame_example1.html):

 
<html>
<head>
<title>Frameset Example.1<title>
</head>
 <frameset rows = "35%, 65%">
 <frame src ="frame_1.html" />
 <frame src ="frame_2.html" />
 </frameset>
</html>

The Frame.1 (frame_1.html):

 
<html>
<body style="background-color:#ff9900;">
<h2 align="center">First frame (frame_1.html)</h2>
</body>
</html>

The Frame.2 (frame_2.html):

 
<html>
<body style="background-color:#ffcc00;">
<h2 align="center">Second frame (frame_2.html)</h2>
</body>
</html>

Frame Example.1 View Result



Frame Example.2       View Result

The frameset (frame_example2.html):

 
<html>
<head>
<title>Frameset Example.2<title>
</head>
<frameset rows = "35%, 65%">
       <frameset cols = "50%, 50%">
<frame src ="frame_3.html" />
<frame src ="frame_4.html" />
      </frameset>
</frameset>
</html>

The Frame.1 (frame_1.html):

 
<html>
<body style="background-color:#ff9900;">
<h2 align="center">First frame (frame_1.html)</h2>
</body>
</html>

The Frame.2 (frame_3.html):

 
<html>
<body style="background-color:#a08029;">
<h2 align="center">Second frame (frame_3.html)</h2>
</body>
</html>

The Frame.3 (frame_4.html):

 
<html>
<body style="background-color:#ffcc00;">
<h2 align="center">Third frame (frame_4.html)</h2>
</body>
</html>

Frame Example.1 View Result


<frame> tag Attributes

Used to include the web page details into the <frame> tag.

Attributes Value Description
src "Specified_URL" Use to specify URL to wish open the web document.
name "alternate_name" Use to specify the name to idenfity this frame to open document.
scrolling "auto","yes","no" Used to display on scrolling.
marginwidth "Size_px" Display margin of the width of left or right.
marginheight "Size_px" Display margin of the height of left or right.
noresize
 
Used to you do not want to frames resize.

Dynamic Attributes

<frame> tag supported following Dynamic attributes.:

Attributes Value Description
id ID_Name Declared unique id for the element.
class Predefined_Class Used in Cascading Style Sheet (CSS).
style style_Attributes CSS code specify inline the HTML element is presented.
title Title_Description Display on the "tooltip" for your elements.

<frame> tag not support any event attributes.