HTML Basics for Servlets & JSP

Code for creating an HTML Form


  <!DOCTYPE html>
  <html>
  <head>
  <meta charset="ISO-8859-1">
  <title>Practicing HTML</title>
  </head>
  <body>
  <form method="post" name="registration">
  <label for="studentname">Enter your Name</label>
  <input type="text" name="studentname" id="sname" required><br>
  <label for="password">Enter your Password</label>
  <input type="password" name="password" id="spass"><br>
  <label for="gender">Select your Gender</label><br>
  <input type="radio" name="Male" value="Male">Male<br>
  <input type="radio" name="Female" value="FeMale">Female<br>
  <input type="radio" name="Others" value="Others">Others<br>
  <!-- lets get the favourite subjects -->
  <label for="subjects">select your subjects</label><br>
  <input type="checkbox" name="subjects" value="English">English<br>
  <input type="checkbox" name="subjects" value="DBMS">DBMS<br>
  <input type="checkbox" name="subjects" value="Physics">physics<br>
  <label for="email">Enter your email</label>
  <input type="email" name="email"><br>
  <label for="date">Select your Date of Birth</label>
  <input type="date" name="inputdate"><br>
  <label for="country">Select your country</label>
  <select>
  <option name="India" value="India">India</option>
  <option name="US" value="US" selected>US</option>
  <option name="UK" value="UK">UK</option>
  </form>
  </body>
  </html>