0% found this document useful (0 votes)
8 views

HTML Codings Forms

The document contains HTML code snippets for creating various forms, including personal details, feedback, surveys, and registration forms. Each form includes fields for user input such as name, age, address, and preferences, along with submit and reset buttons. The examples demonstrate the use of different input types like text, radio buttons, checkboxes, and dropdown lists.

Uploaded by

radhakavandar5
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

HTML Codings Forms

The document contains HTML code snippets for creating various forms, including personal details, feedback, surveys, and registration forms. Each form includes fields for user input such as name, age, address, and preferences, along with submit and reset buttons. The examples demonstrate the use of different input types like text, radio buttons, checkboxes, and dropdown lists.

Uploaded by

radhakavandar5
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Q1. Create a webpage to accept First Name, Age, Address with Submit button.

<!DOCTYPE html>
<html> <head> <title>form </title> </head>
<body>
<form>
Name: <input type=text> <br> <br>
Age: <input type=text> <br> <br>
Address: <textarea> </textarea> <br> <br>
<input type=submit value=SUBMIT>
</form>
</body> </html>

Q2. Write a program using HTML to create a form and submit it with personal data like name, address and
standard.

<!DOCTYPE html>
<html> <head> <title>form </title> </head>
<body>
<h1> Personal Details:</h1>
<form>
Name: <input type=text> <br> <br>
Address: <textarea> </textarea> <br> <br>
Standard: <input type=radio name=s value=f> FYJC
<input type=radio name=s value=s> SYJC <br> <br>
<input type=submit value=SUBMIT>
<input type=reset value=RESET>
</form>
</body> </html>

Q3. Create a webpage to accept Customer Name, DOB, Email ID, Contact Number with Submit & Reset button.

<!DOCTYPE html>
<html> <head> <title>form </title> </head>
<body>
<h1> Customer Details:</h1>
<form>
Customer Name: <input type=text> <br> <br>
DOB: <input type=text> <br> <br>
E‐mail ID: <input type=text> <br> <br>
Contact Number: <input type=text> <br> <br>
<input type=submit value=SUBMIT>
<input type=reset value=RESET>
</form>
</body> </html>

Q4. Create a webpage to accept Student Name, Gender, Address, Hobbies with Submit & Reset button.

<!DOCTYPE html>
<html> <head> <title>form </title> </head>
<body>
<form>
Student Name: <input type=text> <br> <br>
Gender: <input type=radio name=s value=f> Female
<input type=radio name=s value=m> Male <br> <br>
Address: <textarea> </textarea> <br> <br>
Hobbies: <input type=checkbox name=c1 value=p> Painting
<input type= checkbox name=c2 value=s> Singing
<input type= checkbox name=c3 value=d> Dancing
<br> <br>
<input type=submit value=SUBMIT>
<input type=reset value=RESET>
</form>
</body> </html>

Q5. Create a webpage to design a Feedback form to accept Name, Gender, Comments with Submit & Reset button.

<!DOCTYPE html>
<html> <head> <title>form </title> </head>
<body>
<form>
<h3> <u> Feedback Form </u> </h3>
Name: <input type=text> <br> <br>
Gender: <input type=radio name=s value=f> Female
<input type=radio name=s value=m> Male <br> <br>
Comments: <textarea> </textarea> <br> <br>
<input type=submit value=SUBMIT>
<input type=reset value=RESET>
</form>
</body> </html>

Q6. Create a webpage to design a Survey form to get the data related to “Online Lectures” for the following:
Name of the student:
Do you have access to a device for learning online:
Time you spend online each day:
Do you enjoy learning remotely?
Use appropriate objects to get the data and also provide Submit and Rest buttons.

<!DOCTYPE html>
<html> <head> <title>form </title> </head>
<body>
<form>
<h3> <u>Survey Form ‐ Regarding "Online Lectures":</u> </h3>
Name of the Student: <input type=text> <br> <br>
Do you have access to a device for learning online?: <input type=radio name=s value=y> Yes
<input type=radio name=s value=n> No <br> <br>
Time you spend online each day: <input type=text> <br> <br>
Do you enjoy learning remotely?: <input type=radio name=s value=y> Yes
<input type=radio name=s value=n> No <br> <br>
<input type=submit value=SUBMIT>
<input type=reset value=RESET>
</form>
</body> </html>

Q7. Write a html code to display a webpage allowing the user to choose his college from a given list of five different
college under title “My Details”. Use Drop down list to take user input. Provision should be made to submit the
content to server and to clear the form content.

<!DOCTYPE html>
<html> <head> <title>form</title> </head>
<body> <form> <p>MY DETAILS:</p>
<select name="college">
<option value="1"> DSJ College</option>
<option value="2"> K.C. College</option>
<option value="3"> H.R. College</option>
<option value="4"> N.M. College</option>
</select> <br> <br>
<input type="submit" value="Submit"> <input type="Reset" value="Reset">
</form> </body> </html>

Q8. Write HTML code to display 4 snacks items with checkbox and also display order button on webpage.

<!DOCTYPE html>
<html> <head><title> User Information</title></head>
<body>
<h3>SNACKS ITEMS</h3>
<form name=f1>
<input type=checkbox name=c1 value=s1>Samosa<br>
<input type=checkbox name=c2 value=v1> Vada Pav<br>
<input type=checkbox name=c3 value=s2>Sandwitch<br>
<input type=checkbox name=c4 value=cu>Cutlet<br> <br>
<input type=submit name=s1 value=Submit>
</form> </body> </html>

Q9. Write a program to display Menu card of "Hotel Royal" with heading and minimum 3 Veg and Non‐Veg items
displayed with checkboxes and place "ORDER".
<!DOCTYPE html>
<html> <head><title> User Information</title></head>
<body>
<h1>Hotel Royal</h1>
<form name=f1>
<h3>Veg Items: </h3>
<input type=checkbox name=c1 value=s1>Kadai Mashroom<br>
<input type=checkbox name=c2 value=v1> Palak Paneer<br>
<input type=checkbox name=c3 value=s2>Paneer Tikka<br>
<h3> Non‐Veg Items:</h3>
<input type=checkbox name=c4 value=cu>Keema Samosa<br>
<input type=checkbox name=c2 value=v1> Butter Chicken<br>
<input type=checkbox name=c3 value=s2>Fish Biriyani<br> <br>
<input type=submit name=s1 value=Submit>
<input type=reset name=re1 value=Cancel>
</form> </body> </html>

Q10. Write html code to create a user registration form having the fields name, gender, address, city, field of
interest, submit button and reset button by making the use of form elements.

<!DOCTYPE html>
<html> <head><title> User Information</title></head>
<body> <h3>USER REGISTRATION FORM</h3>
<form name=f1>
Name: <input type=text name=n1> <br>
Gender: <input type=radio name=r1 value=m>Male
<input type=radio name=r1 value=f>Female <br>
Address<textarea name=add> </textarea><br>
City: <select name=c1>
<option value=n>Nagpur
<option value=p>Pune
<option value=a>Aurangabad
<option value=m>Mumbai
</select> <br>
Field of Interest :<br>
<input type=checkbox name=c1 value=g>Sports<br>
<input type=checkbox name=c2 value=p> Politics<br>
<input type=checkbox name=c3 value=s>Social Activity<br>
<input type=checkbox name=c4 value=a>Agriculture<br> <br>
<input type=submit name=s1 value=Submit>
<input type=reset name=re1 value=Cancel>
</form> </body> </html>

Q11. Design a feedback form in html that accepts Name, Address, City, Zip code, Email id & Comment from the
user. Button should be provided for clearing & submitting the form. Use table without border for proper
arrangement of elements on the web page.

<!DOCTYPE html>
<html><head> <title>form</title> </head>
<body> <h2 >FEEDBACK FORM</h2>
<form> <table> <tr> <td> Name: </td><td> <input type="text" name="name"></td> </tr>
<tr><td>Address:</td>
<td> <textarea> </textarea></td> </tr>
<tr> <td>City: </td>
<td> <input type="text" name=city></td> </tr>
<tr> <td>Zip Code: </td>
<td> <input type="text" name=zip></td> </tr>
<tr> <td>Email Id: </td>
<td> <input type=" text" name=email> </td> </tr>
<tr> <td>Comment: </td>
<td> <textarea name="com"> </textarea> </td> </tr>
<tr> <td colspan=2 align=center> <input type="submit" name="s1" value="Submit">
<input type="reset" name="r1" value="Clear">
</td> </tr> </table> </form> </body> </html>

You might also like