Frame tag and Example

 

Frame tag 

Elements of frame tag

The <frameset> tag provides us with the facility to divide our windows into multiple sections and each section has the same capability to execute individually.

Attribute

rows:  Rows divide our window into rows and the format of division is 

<frameset rows=”50%,*”> or<frameset rows=”50%,50%”>

Cols:  Cols divide our window into columns and the format of division             is <frameset Cols =”50%, *”>  or <frameset Cols =”50%,50%”>

 

Border: Border provides border format at a pixel rate. Example:                              <frameset border="1>

<frame> tag: The frame tag provides a window frame with the src attribute.

Attributes: 

  • src: Src provides the URL of the to-be executed document or window file. Example <frame src=”d:/p1.html”>
  • name: Name allows name for src file.

NOTS: The Src file must be in the same file. No need to body tag.

Example:1

<html>

<head>

<title>frame</title></head>

<frameset rows="50%,50%" cols="50%,50%">

<frame src="pg1.html">

<frame src="pg2.html">

<frame src="pg3.html">

<frame src="pg4.html">

</frameset>

</html>

OUT-PUT


Example:2

<html>

<head>

<title>frame</title></head>

<frameset rows="15%,*,15%">

<frame src="pg2.html">

<frameset cols="20%,*">

<frame src="pg3.html">

<frame src="pg4.html">

</frameset>

<frame src="pg2.html">

</html>

OUT-PUT

Example:3

<html>

<head>

<title>frame</title></head>

<frameset rows="15%,*,10%">

<frame src="pg1.html">

<frameset cols="20%,60%,20%">

<frame src="pg2.html">

<frame src="pg3.html">

<frame src="pg4.html">

</frameset>

<frameset>

<frame src="pg1.html">

</html>

OUT-PUT

Example 4:

<html>

<head>

<title>frame</title></head>

<frameset cols="20%,60%,20%">

<frame src="pg1.html">

<frame src="pg2.html">

<frame src="pg3.html">

</frameset>

<frameset>

</html>

Example 5

<html>

<head>

<title>frame</title></head>

<frameset rows="20%,60%,20%">

<frame src="pg1.html">

<frame src="pg2.html">

<frame src="pg3.html">

</frameset>

<frameset>

</html>

OUT-PUT

Example:6

<html>

<head>

<title>frame</title></head>

<frameset cols="20%,60%,20%">

<frame src="pg1.html">

<frameset rows="*,*">

<frame src="pg2.html">

<frame src="pg3.html">

</frameset>

<frameset>

<frame src="pg1.html">

</frameset>

</html>

 

OUT-PUT



Comments

Popular posts from this blog

The structure of HTML and some basic tags

Introduction and objective of HTML