Form using HTML

<!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 &nbsp;&nbsp;&nbsp; <input type="text" name="firstname" > </p>

   <p>Class &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="class"> </p>

   <p>Roll No. <input type="text" name="rollno"> </p>

  <p> E-mail &nbsp;&nbsp; <input type="text" name="email"> </p>

   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="Reset" >&nbsp;&nbsp;&nbsp;

<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:&nbsp;<input type="password" id="pass1" name="password"  size="20"/></label>

<br/><br/>

<label>Re-enter password:&nbsp;<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 &nbsp;&nbsp;&nbsp; <input type="text" name="firstname" > </p>

   <p>Class &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="class"> </p>

   <p>Roll No. <input type="text" name="rollno"> </p>

  <p> E-mail &nbsp;&nbsp; <input type="text" name="email"> </p>

 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="Reset" >&nbsp;&nbsp;&nbsp;

<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 &nbsp; <input type="text" name="firstname"></p>
   <p>Password &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="pw"> </p>
  <p> Gender:&nbsp;<input type="radio" name="gender" value="Male">Male&nbsp;<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:&nbsp;<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:&nbsp;<input type="text" size="20" name="firstname"></p>
<p>Last name:&nbsp;<input type="text" name="lastname"> </p>
<p>User password:&nbsp;<input type="password" name="psw"></p>
<p>Email:&nbsp;<input type="text" name="email"> </p>
<p>
Gender:&nbsp; <input type="radio" name="gender" value="male" checked="checked" > Male &nbsp;
<input type="radio" name="gender" value="female"> Female &nbsp;
<input type="radio" name="gender" value="other"> Other
</p>
<p>
Vechicle:&nbsp;<input type="checkbox" name="vehicle1" value="Bike" checked > I have a bike &nbsp;
<input type="checkbox" name="vehicle2" value="Car"> I have a car
</p>
<p>
Upload Photo: &nbsp;<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: &nbsp;
<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:&nbsp;<textarea name="message" rows="5" cols="20">test

</textarea>
</p>
<p><input type="submit" value="Submit"> &nbsp; <input type="reset" value="Reset"></p>
</form>
</body>
</html>


Comments