0% found this document useful (0 votes)
4 views10 pages

IT Assignment-HTML Forms

Uploaded by

sameerpal859
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)
4 views10 pages

IT Assignment-HTML Forms

Uploaded by

sameerpal859
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

Note: Above are some of the HTML programs asked in last years questions

1. Write a html program to create registration form to accept name, mobile no, date
of birth .The form should have register caption on the button to submit the data.
<!DOCTYPE html>
<html>
<head>
<title>Registration Form</title>
</head>
<body>
<h2>Registration Form</h2>
<form>
Name: <input type="text" name="name" required><br><br>
Mobile No: <input type="tel" name="mobile"><br><br>
Date of Birth: <input type="date" name="dob"><br><br>
<input type="submit" value="Register">
</form>
</body>
</html>

2. Write an HTML5 program to create a form with fields for the voter’s ID
number, voter’s assembly (e.g. Mumbai) and age. Ensure the age is between 18
and 120. Include a Submit button.

<!DOCTYPE html>
<html>
<head>
<title>Voter Form</title>
</head>
<body>
<h2>Voter Registration Form</h2>
<form>
Voter ID Number: <input type="text" name="t1" ><br>
Voter's Assembly: <input type="text" name="t2" placeholder="e.g. Mumbai"> <br>
Age: <input type="number" name="t3" min="18" max="120" ><br>
<input type="submit" value="Submit">
</form>
</body>
</html>
3. Write an HTML5 program to create a form that accepts the student ID (a
combination of alphabets and numbers), date of joining of college and percentage
in the previous class (in digits). The data should be sent to the server.

<!DOCTYPE html>
<html>
<head>
<title>Student Form</title>
</head>
<body>
<form action>
Student ID :<input type="text" name="t1" >
<br>
Date of Joining :<input type="date" name="t2">
<br>
Percentage : <input type="number" name="percentage" >
<br>
<input type="submit" value="Submit">
</form>
</body>
</html>
4. Write an HTML5 program to create a registration form with fields for the user’s
name, mobile number, and name of the college. Include a submit button with the
caption “Register.”

<!DOCTYPE html>
<html>
<head>
<title>Registration Form</title>
</head>
<body>
<h2>Registration Form</h2>
<form>
Name:
<input type="text" name="uname" >
<br>
Mobile Number:
<input type="tel" name="mobile" >
<br>
College Name:
<input type="text" name="college" >
<br>
<input type="submit" value="Register">
</form>
</body>
</html>

5. Write a html program to accept Name of the Employee (cannot be blank), Email
Id of the Employee, Salary (maximum 50000). The data should be sent to the
server.

<!DOCTYPE html>
<html>
<head>
<title>Employee Form</title>
</head>
<body>
<form>
Name: <input type="text" name="name" required><br><br>
Email: <input type="email" name="email"><br><br>
Salary: <input type="number" name="salary" max="50000"><br><br>
<input type="submit" value="Submit">
</form>
</body>
</html>

6. Write a html program to accept Email Id of the Hotel, Date of foundation ,


Number of tables in hotel. The data should be sent to the server.
<!DOCTYPE html>
<html>
<head>
<title>Hotel Form</title>
</head>
<body>
<form>
Email ID: <input type="email" name="email"><br><br>
Date of Foundation: <input type="date" name="date"><br><br>
Number of Tables: <input type="number" name="tables"><br><br>
<input type="submit" value="Submit">
</form>
</body>
</html>
7. Design a web page that should accept Name of the user,Email ID, Number of
years completed in office,Office contact number(Compulsory),image with submit
button.

<!DOCTYPE html>
<html>
<head>
<title>Office Details</title>
</head>
<body>
<form>
Name: <input type="text" name="name"><br><br>
Email ID: <input type="email" name="email"><br><br>
Years Completed: <input type="number" name="years"><br><br>
Office Contact No: <input type="tel" name="contact" required><br><br>
Upload Image: <input type="file" name="image"><br><br>
<input type="submit" value="Submit">
</form>
</body>
</html>

8. Write an HTML program to create Feedback form.


<!DOCTYPE html>
<html>
<head>
<title>Feedback Form</title>
</head>
<body>
<h2>Feedback Form</h2>
<form>
Name: <input type="text" name="t1"><br><br>
Email: <input type="email" name="email"><br><br>
Feedback:<br>
<textarea rows="4" cols="30"></textarea><br><br>
<input type="submit" value="Submit">
</form>
</body>
</html>

9. Write an HTML program to create Registration form.


<!DOCTYPE html>
<html>
<head>
<title>Registration</title>
</head>
<body>

<form>
Name: <input type="text" name="name"><br><br>
Password: <input type="password" name="password"><br><br>
Gender:
<input type="radio" name="gender" value="Male"> Male
<input type="radio" name="gender" value="female"> Female<br><br>
<input type="submit" value="Register">
</form>
</body>
</html>

[Link] an HTML program to create Login form.


<!DOCTYPE html>
<html>
<head>
<title>Login Form</title>
</head>
<body>
<form>
Username: <input type="text" name="name"><br><br>
Password: <input type="password" name="password"><br><br>
<input type="submit" value="Login">
</form>
</body>
</html>

[Link] a web page that should accept name of user, Select file for upload,color
picker tool,website URL,search and submit button.

<!DOCTYPE html>
<html>
<head>
<title>Advanced Form</title>
</head>
<body>
<form>
Name: <input type="text" name="name"><br><br>
Select File: <input type="file"><br><br>
Choose Color: <input type="color"><br><br>
Website URL: <input type="url"><br><br>
Search: <input type="search"><br><br>
<input type="submit" value="Submit">
</form>
</body>
</html>
15. Write a html program to accept Name of the College, Total number of
students in the college, Total number of halls (range till 100)The data should be
sent to the server .
<!DOCTYPE html>

<html>
<head>
<title>Hotel Form</title>
</head>
<body>
<form>
Name of the College : <input type="text" name="t1"><br><br>
Total Number of students : <input type="number" name="n1"><br><br>
Number of Halls: <input type="range " name="halls" max="100"><br><br>
<input type="submit" value="Submit">
</form>
</body>
</html>

16. Write a html program to design a Bank Account Opening FORM 1) Select
Account Type from the drop down list (Savings/Current/Fixed Deposite etc), 2)
Type Your Name 3) Select Your date of birth 4) Select your Gender :
Male/Female (Only one) 5) submit the form.

<!DOCTYPE html>
<html>
<head>
<title>Bank Account opening form</title>
</head>
<body>
<form>
<h1>Bank Account opening form </h1>
Select Account type:
<select name="account ">
<option value="Saving">Saving </option >
<option value="Current ">Current </option >
<option value="Fixed Deposit ">Fixed Deposit </option >
</select><br>
Name: <input type="text" name="name"><br><br>
Date of birth: <input type="date" name="dob"><br><br>
Gender:
<input type="radio" name="gender" value="Male"> Male
<input type="radio" name="gender" value="female"> Female<br><br>
<input type="submit" value="submit ">
</form>
</body></html>
17. Write HTML code to design a FORM with the following : 1) Create drop
down list for Title with values: Mr / Mrs / Miss/ Ms / Dr 2) Enter Your Name : 3)
Select your Gender: Male / Female 4) Do you like playing computer games? Yes /
No 5) Select your hobbies : Dancing, Signing, Reading, Swimming. None of these.
(User may select more than one options)

<!DOCTYPE html>
<html>
<head>
<title>Form</title>
</head>
<body>
<form>
<h1>Bank Account opening form </h1>
Title:
<select name="t">
<option value="Mr">Mr</option >
<option value="Mrs">Mrs</option >
<option value="Miss">Miss </option >
<option value="Ms">Ms </option >
<option value="Dr">Dr</option >
</select><br>
Name: <input type="text" name="name"><br><br>
Gender:
<input type="radio" name="gender" value="Male"> Male
<input type="radio" name="gender" value="Female"> Female<br><br>
Do you like playing games :
<input type="radio" name="games" value="Yes"> Yes
<input type="radio" name="games" value="No"> No<br><br>
Select your hobbies :
<select name="hobbies" multiple>
<option value="Dancing">Dancing </option >
<option value="Singing">Singing </option >
<option value="Reading">Reading </option >
<option value="Swimming">Swimming</option >
<option value="None of these">None of these </option >
</select><br>

<input type="submit" value="submit ">


</form>
</body></html>
18. Write a html program to create a form to accept students roll no(In number
format) , Unit test marks(maximum 25 marks), Terminal exam marks(maximum
50 marks). Include the name of the Subject teacher and send the data to the
server.
<!DOCTYPE html>
<html>
<head>
<title>Student Marks Form</title>
</head>
<body>
<h2>Student Marks Submission Form</h2>
<form method="post">
Student Roll No: <input type="number" name="t1" ><br>
Unit Test Marks :
<input type="number" name="t2" max="25" min="0" ><br>
Terminal Exam Marks :
<input type="number" name="t3" max="50" min="0" ><br>
Subject Teacher Name:
<input type="text" name="t4" ><br>
<input type="submit" value="Submit">
</form>
</body>
</html>

You might also like