0% found this document useful (0 votes)
10 views5 pages

Practicals 4

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views5 pages

Practicals 4

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

FRAMES

Generalized form: clicking on a link the left frame enables one to view the linked documents
in the right frame

<frameset> tags replace <body> tags


<frameset> tag describes the number, locations and sizes of component frames.

General format:
<frameset
cols="n1[%],n2[%]" ***specifies number and widths of frame as %s of width of browser
rows="n1[%],n2[%]" ***Specifies number and height of frames as %s of height of browser
frameborder="1|0" ***specifies whether a 3-D border should be displayed btn frames.
bordercolor="color"
framespacing="n" ***amount of spacing between frames (in px)
>
...
</frameset>

Example:

<frameset cols = "50%, 50%" frameborder="1">

<frame name="Picture" src="Linda.JPG"/> ***SRC loads content for the frames


<frame name="Page" src="12 March.html"/> ***frame name assigns names

</frameset>
</html>

Students to read:
The scrolling attribute, marginwidth attribute, marginheight, Nested frames, Targetting
frames, Document coding

1
FORMS

A data capture device that allows users to interact with the page. These are a variety of
standard controls that can be coded on a Web form….

XHTML forms are backed by processing routines written in languages like VB, PHP or Java.

Textbox controls

The <input> Tag

<input type="text|password" ***either as text (visible) or as password (masked)


id="id"
size="n"
maxlength="n"
value="text"
Deprecated:
name="name"
/>

2
EXAMPLE:

<form>
<p>Please enter the following information :</p>
<table>
tr>
<td>Name: </td>
<td><input id="TheName" type="text"/></td>
</tr>
<tr>
<td>Password: </td>
<td><input id="ThePassword" type="password"/></td>
</tr>
<tr>
<td>City: </td>
<td><input type="text" id="City" size="15"/></td>
</tr>
<tr>
<td>Region: </td>
<td><input type="text" id="Region" size="3"/></td>
<tr>
<td>GPS </td>
<td><input type="text" id="GPS" size="11"/></td>
</tr> </table>
</form>

The Value Attribute

A textbox can include the value attribute to pre-enter text in the field, like a tool-tip.

Name: <input type="text" id="FullName" size="30" value="Enter your full name here"/>

Radio Buttons
<input type="radio"
id="id"
name="name"
value="text"
checked="checked"
/>

3
Example:
<p>What is your favorite color?</p>
<input type="radio" name="Color" value="Red" checked=”checked”/>Red<br/>
<input type="radio" name="Color" value="Green"/>Green<br/>
<input type="radio" name="Color" value="Blue"/>Blue<br/>

Checkboxes

<input type="checkbox"
id="id"
name="name"
value="text"
checked="checked"
/>

<p>What are your favorite foods?</p>


<input type="checkbox" name="Food" value="Fried Rice"/>Fried Rice<br/>
<input type="checkbox" name="Food" value="Ripe plantain and beans"/>Ripe plantain and
beans<br/>
<input type="checkbox" name="Food" value="Jollof Rice"/>Jollof Rice<br/>
<input type="checkbox" name="Food" value="Diehuo"/>Diehuo<br/>
<input type="checkbox" name="Food" value="Fufu and palmnut soup"/>Fufu and palmnut
soup<br/>

The <select> and <option> Tags

General format:

<select
id="id"
name="name"
size="n"
multiple="multiple"
>
<option
value="text"
selected="selected"
>
Label
</option>
...
</select>

4
Choose your favorite color:<br/>
<select id="Color" size="4"> **Size shows number to be displayed at a time
<option value="R">Red</option>
<option value="G">Green</option>
<option value="Y">Yellow</option>
<option value="V">Violet</option>
<option value="O">Orange</option>
<option value="A">Aqua</option>
<option value="B">Black</option>

</select>

Multiple attributes

***<select id="Color" size="4" multiple=”multiple”>

Submit Button

<input type="submit"
id="id"
name="name"
value="text"
/>

Example:

<input type="submit" name="SubmitButton" value="Submit Form"/>

Reset Button
<input type="reset"/>

Students to Read:
The mailto: Action, Using FTP to Publish Files, FTP

You might also like