HTML Frames:, and
HTML Frames:, and
HTML Frames
Intro to Frames
HTML frames allow you to display more than
1 HTML document in the same browser
window. Every HTML document is called a
frame and each frame is independent.
There are some disadvantages of using
frames:
you must keep track of more HTML documents
difficult to print the entire page
Frame element
Arranging Frames
Vertical Frameset:
Creates frames arranged in columns
Example:
<frameset cols=20%,80%">
<frame src="frame1.html" />
<frame src="frame2.html" />
</frameset>
Horizontal Frameset:
Creates frames arranged in rows
Example:
<frameset rows=50%,50%">
<frame src="frameA.html" />
<frame src="frameB.html" />
</frameset>
frameA.html:
Creates frames arranged in columns
height-25%
& rows
<html>
<frameset rows="25%,75%">
<frame src="frameA.html">
<frameset cols=70%,30%">
frameB.ht
<frame src="frameB.html">
<frame src="frameC.html">
ml:
</frameset>
height-75%
</frameset>
width-25%
</html>
frameC.htm
:
width-30%
height-75%
The frameset column or row size can also be set in pixels such as
cols=100,600
One of the columns or rows can be set to use the remaining
space of the browser window, with an asterisk (cols=33%,*")
You can not use the <body></body> tags together with the
<frameset></frameset> tags!
Frames: Review
HTML frames allow you to display more than
1 HTML document in the same browser
window in the following ways:
Vertical Frameset Horizontal Frameset
Mixed Frameset
iFrame
frames.ht
ml
<head><title>Frames Example</title></head>
<frameset cols="180px,*,150px">
<frame src="left.html" />
<frame src="middle.html" />
<frame src="right.html" />
</frameset>
</html>
<iframe name="iframeGoogle"
height="400" src="http://www.google.com"
frameborder="yes" scrolling="yes"></iframe>
HTML
Forms
Entering User Data from a
Web Page
HTML Forms
Example:
Form Fields
Fieldsets
13
Checkboxes:
<input type="checkbox" name="fruit"
value="apple" />
Radio buttons:
14
Dropdown menus:
<select name="gender">
<option value="Value 1"
selected="selected">Male</option>
<option value="Value 2">Female</option>
<option value="Value 3">Other</option>
</select>
Submit button:
<input type="submit" name="submitBtn"
value="Apply Now" />
15
17
18
form.html
19
20
21
TabIndex