So guys what is frame? Let's discuss frames in HTML, Frame is nothing but, divided rectangle area in a browser which is used to display more than one document at a time. Each frame is capable of displaying its own document. There are two tags related to frames i.e; frameset and frame. A collection of frames in the browser window is known as a frameset.
Frames in HTML:
<frameset> tag:
The <frameset> tag defines how to divide the window into frames each frameset defines a set of rows or columns. The value of the rows/column will occupy. The general form is:
<frameset cols="values" rows="value">
--------------------------
--------------------------
</frameset>
<frameset> Attributes:
rows
|
Sets the number of rows (horizontal frames) in the frameset. Separate the values assigned to these attributes with commas; each value represents the height of the row. Set to pixel value or percentage or use an asterisk to specify the remaining space.
|
cols
|
Sets the number of cols (vertical frames) in the frameset. Separate the values assigned to this attribute with commas; each value represents the height of the column. Set to pixel value or percentage or use an asterisk to specify the remaining space.
|
border
|
It accepts a pixel value, which determines the thickness of any border used within the frameset.
|
Example:
<frameset rows="20%,50%,10%">
<frame> attributes:
src
|
The src attribute takes the URL of the document to be displayed in this particular frame. Frames without src attributes are displayed as a blank space the size of the frame would have been.
|
name
|
The name attribute is used to assign a name to a frame so it can be targeted by links in other documents. The name attribute is optional; by default all windows are unnamed.
|
marginwidth
|
Sets the size of the right and left margins used in the frame.
|
marginheight |
Sets the size of the top and bottom margins used in the frame.
|
noresize
|
Stand-alone attributes indicating that the frame may not be resized. The default is that the frame may be resized by dragging the border.
|
scrolling
|
Determines scrollbar action.Possible values are auto,yes,no.
|
Sample program for creating the frame:
main.html:
<html>
<frameset rows=25%,75%>
<frame name=border src="top.html">
<frameset cols=25%,75%>
<frame name=course src="catagories.html">
<frame name=display src="displaycontent.html">
</frameset>
</frameset>
top.html:
<html>
<body bgcolor="bisque"><center><font name=bold size=5 color=#890765>
huda beauty store<br>vellore<br>
</center>
</body>
</html>
catagories.html:
<html>
<head>
<title>huda beauty store</title>
</head>
<body>
catagories:
<ul>
<li>moisturizer
<li>sun screen
<li>primer
<li>foundation
<li>concealer
<li>compact powder
<li>blush
<li>highlighter
<li>contour
<li>eyeshadow pallate
<li>kajal
<li>eye liner
<li>muscara
<li>eye lashes
<li>makeup fixer
<li>makup brush
</ul>
</body>
</html>
displaycontent.html:
<html>
<head>
<title>huda beauty store</title>
</head>
<body>
<center>
welcome to our cosmetic world
</center>
</body>
</html>
No comments:
Post a Comment