You are on page 1of 4

Home work - 01

CAP305: WEB PROGRAMMING


DOA: 23/8/2010 DOS: 30/8/2010
Part-A

Q1) Create a HTML Form which uses hyperlinks, text formatting to display static data
about a Hotel.
<html>
<h1 align="center" title="5 Star Rated"> Djatoxd *****Hotel</h1>

<hr pixel="123" width= 20% align=center></hr>


<marquee direction="left"> <font size="20"><font color= "white">Holiday
In</marquee> </font>
<body bgcolor= "red">
<hr pixel="123" width= 50% align=center></hr>
<B><ul><u>Hotel Facilities</u><li> 24hour
service<li>fooding<li>lodging<li>transporst facilities</ul>
<sub>Dj Hotel "luxurious hotel"</sub>
<br><blink> HURRY </blink></br>
<pre>
<u><b>Fill you Form here...</u></b>
<ul>
<li>Name <input type="text box">
<li>Address <input type="text box">
<li>Date of birth <input type="text box">
<li>Occupation <input type="text box">
<li>Email address <input type="text box">
<li>Pass word <input type="text box">
</ul>
</pre>
<b><a href="http://www.holidayin.com">hotel</b> </a>

</html>

Q2) Can we access a website without using WWW? If yes how we achieve it?

Yes we can access a website without using the WWW. We can achieve a website for Ums
of LPU. We can directly type with http:\ \172.19.2.250. similarly we can access any website
with Http:\\ IP address.

Q3) Is the processing of a wb page dependent on Web Browser? If yes how? If no then
does web browser has any impact on how page is shown, If yes what is the impact &
why?

A web browser is a software application for retrieving, presenting, and traversing


information resources on the World Wide Web. An information resource is identified by a
Uniform Resource Identifier (URI) and may be a web page, image, video, or other piece of
content. Hyperlinks present in resources enable users to easily navigate their browsers to
related resources.

Although browsers are primarily intended to access the World Wide Web, they can also be
used to access information provided by Web servers in private networks or files in file
systems. Some browsers can be also used to save information resources to file systems.

The primary purpose of a web browser is to bring information resources to the user. This
process begins when the user inputs a Uniform Resource Identifier (URI), for example
http://en.wikipedia.org/, into the browser. The prefix of the URI determines how the URI will
be interpreted. The most commonly used kind of URI starts with http: and identifies a
resource to be retrieved over the Hypertext Transfer Protocol (HTTP). Many browsers also
support a variety of other prefixes.

Part-B

Q 4 Create a HTML Form which acts as registration form a customer when it visits
website of a organization.
<html>
<head>
<title>customer registration form</title>
<script language="javascript">
function ver(form1)
{
v=form1.elements.length;
if(form1.elements[3].name=="button1")
{alert('first form name:'+document.forms[0].name);
{alert('no of form elements of:'+document.forms[0].name+'='+v);
}

else if(form1.element[4].name=="button2")
{alert('second form name:'+document.forms[1].name);
{alert('no of form elements of:'+document.forms[1].name+'='+v);
}
for(i=0;i<v;i++)
alert(form1.elements[i].name+'+is at position+i');
}
</script></head>

<body>

<form name:"Customer Registration">


customer form:<i><b>Customer Registration</i></b><br<br>
First Name:<Input name="text1" type="text" value=""><br><br>
Last Name:<Input name="text1" type="text" value=""><br><br>
<Input name="radio1" type="radio" value="">male

<Input name="radio2" type="radio" value="">female


<br><br>

address:<Input name="text1" type="text" value=""><br><br>


Date of birth:<Input name="text1" type="text" value=""><br><br>
Nationality:<Input name="text1" type="text" value=""><br><br>

<Input name="button1" onclick="ver(form1)" type="button" value="click1">


</form>
</body>
</html>

Q5) Create an HTML form that interacts with the user. On this form, collect the first
name, last name, and birth date. After its captured, display this information back to the
user.
<html>
<head>
<title> user</title>
<body>

<form name:"User information">


<b>User</b><br<br>
First Name:<Input name="text1" type="text" value=""><br><br>
Last Name:<Input name="text1" type="text" value=""><br><br>

<Input name="radio1" type="radio" value="">male

<Input name="radio2" type="radio" value="">female


<br><br>

address:<Input name="text1" type="text" value=""><br><br>


Qualification: <select>
<option>M.sc.IT</option>
<option>MCA</option>
<option>BCA</option>
</select><br><br>

Date of birth:<Input name="text1" type="text" value=""><br><br>


Nationality:<Input name="text1" type="text" value=""><br><br>
Country: <select>
<option>Bhutan</option>
<option>India</option>
<option>Nepal</option>
</select><br><br>

<Input name="button1" onclick="" type="button" value="ok">


</form>
</body>
</html>

Q6) Create HTML Form to enter details of a student & get it result displayed using
tables.

<html>
<head><title>Registration Form</title></head>
<body>
<marquee height=70 bgcolor="red" behavior="scroll" ><font size=15 color="Black" >
Lovely Professional University</marquee></font>
<hr></hr>
<center><h1>Student Registration</h1></center>
<hr></hr>
<body bgcolor="white">

<form Name="input" action="html_form_action.asp" method="get">


<pre><font size=4 color="#ff0000" > <b>
First Name : <input type="text" Name="FirstName" ><br>
Last Name : <input type="text" Name="LastName" ><br>
Father Name : <input type="text" Name="FatherName" ><br>
Class : <input type="text" Name="class" ><br>
Birhday : (dd-mm-yyyy) <input type="text" Name="Birthday" ><br>
Sex : <input type="radio" Name="sex" value="male">Male
<input type="radio" Name="sex" value="female">Female<br>
Address : <input type="text" Name="Address" ><br>
Phone No : <input type="text" Name="PhoneNo" ><br>
E-Mail : <input type="text" Name="Email" ><br>
Country : <input type="text" Name="Country" ><br>
State : <input type="text" Name="State" ><br>
City : <input type="text" Name="City" ><br>
ZIP Postal Code : <input type="text" Name="Zipcode" ><br>
Stream Board Percentage Year
10+2 : <input type="text" Name="Zipcode" > <input
type="text" Name="Zipcode" > <input type="text" Name="Zipcode" > <input
type="text" Name="Zipcode" ><br>
Graduation : <input type="text" Name="Zipcode" > <input
type="text" Name="Zipcode" > <input type="text" Name="Zipcode" > <input
type="text" Name="Zipcode" ><br>
Post Graduation : <input type="text" Name="Zipcode" > <input
type="text" Name="Zipcode" > <input type="text" Name="Zipcode" > <input
type="text" Name="Zipcode" ><br>

<input type="submit" value="Submit" /></b>


</font></pre>
</form>
</body>
</html>

You might also like