<!DOCTYPE html>
<html>
<head>
<title>2</title>
</head>
<body>
<body>
<form name="myForm" action="" method="POST" autocomplete="off" enctype="multipart/form-data">
<h2>Student Directory</h2>
<p>Name <input type="text" name="firstname" > </p>
<p>Class <input type="text" name="class"> </p>
<p>Roll No. <input type="text" name="rollno"> </p>
<p> E-mail <input type="text" name="email"> </p>
<input type="submit" value="Reset" >
<input type="submit" value="Save">
1 Create Simple Form
<!DOCTYPE html>
<html>
<head>
<script type = "text/javascript" src="password.js">
</script>
</head>
<body>
<form name="myForm" action="" method="POST" >
<h3><u>Create Password</u></h3>
<label>Password: <input type="password" id="pass1" name="password" size="20"/></label>
<br/><br/>
<label>Re-enter password: <input type="password" id="pass2" name="password" size="20" /></label>
<br/><br/>
<input type="submit" value="Submit Query" onsubmit="myfunction()"/>
<input type="reset" value="reset" onsubmit="myfunction()" />
</form>
</body>
</html>
*************************************************************************
2. Simple Form
<!DOCTYPE html>
<html>
<head>
<title>Form</title>
</head>
<body>
<body>
<form name="myForm" action="" method="POST" autocomplete="off" enctype="multipart/form-data">
<h2>Student Directory</h2>
<p>Name <input type="text" name="firstname" > </p>
<p>Class <input type="text" name="class"> </p>
<p>Roll No. <input type="text" name="rollno"> </p>
<p> E-mail <input type="text" name="email"> </p>
<input type="submit" value="Reset" >
<input type="submit" value="Save">
</form>
</body>
</html>
**********************************************************************
3. Form with option,textarea
<!doctype html>
<html>
<head>
</head>
</body>
<form name="myForm" action="" method="POST" autocomplete="off" enctype="multipart/form-data">
<p>Name <input type="text" name="firstname"></p>
<p>Password <input type="text" name="pw"> </p>
<p> Gender: <input type="radio" name="gender" value="Male">Male <input type="radio" name="gender" value="Female">Female</p>
<p>Subject: <select name="subject" >
<option value="" selected>--Select-- </option>
<option value="M" >Math</option>
<option value="WT" >Web Technology</option>
<option value="C">C</option>
<option value="C++">C++</option>
</select>
</p>
<p>
Feedback: <textarea name="feedback" rows="5" cols="20">
</textarea>
<p><input type="submit" value="Submit"></p>
</form>
</body>
</html>
*************************************************************************
3.Form with HTML and HTML5 element
<!DOCTYPE html>
<html>
<head>
<title>HTML Form</title>
</head>
<body>
<form name="myForm" action="" method="POST" autocomplete="off" enctype="multipart/form-data">
<h3>Normal Input Elements</h3>
<input type="hidden" name="studentId" value="1"/>
<p>First name: <input type="text" size="20" name="firstname"></p>
<p>Last name: <input type="text" name="lastname"> </p>
<p>User password: <input type="password" name="psw"></p>
<p>Email: <input type="text" name="email"> </p>
<p>
Gender: <input type="radio" name="gender" value="male" checked="checked" > Male
<input type="radio" name="gender" value="female"> Female
<input type="radio" name="gender" value="other"> Other
</p>
<p>
Vechicle: <input type="checkbox" name="vehicle1" value="Bike" checked > I have a bike
<input type="checkbox" name="vehicle2" value="Car"> I have a car
</p>
<p>
Upload Photo: <input type="file" name="myFile" multiple="multiple" >
</p>
<p><input type="button" onclick="alert('Did you understand Form?')" value="Click Me!">
</p>
<h3>HTML5 Input Elements</h3>
<p>Select your favorite color:
<input type="color" name="favcolor"></p>
<p>Birthday:
<input type="date" name="bday"></p>
<p>
Birthday (date and time):
<input type="datetime-local" name="bdaytime">
</p>
<p>E-mail:
<input type="email" name="email"></p>
<p>Age:
<input type="number" name="age"></p>
<h3>Drop-down list</h3>
<p>Program: <select name="program" >
<option value="">--Select--</option>
<option value="se" selected >Software Engineering</option>
<option value="it" >IT-Engineering</option>
<option value="ce">Computer Engineering</option>
</select>
</p>
<h3>Textarea</h3>
<p>
Describe about yourself: <textarea name="message" rows="5" cols="20">test
</textarea>
</p>
<p><input type="submit" value="Submit"> <input type="reset" value="Reset"></p>
</form>
</body>
</html>
Comments