Skip to main content

Forms

Forms | HTML: Forms are using to get the data from user. The data will be used in server side.

Here is the forms.html:

  1. <!DOCTYPE html>
  2. <html lang="en" dir="ltr">
  3.   <head>
  4.     <link rel="stylesheet" href="css/stylesheet.css">
  5.     <meta charset="utf-8">
  6.     <title>Forms</title>
  7.   </head>
  8.   <body>
  9.     <p>Please Fill the Form</p>
  10.     <form class="form" action="submit.html" method="post">
  11.       <label for="fname">First Name:</label><br>
  12.       <input type="text" id="fname" name="fname"><br><br>
  13.       <label for="lname">Last Name:</label><br>
  14.       <input type="text" id="lname" name="lname"><br><br>
  15.       <input type="radio" id="male" name="gender" value="male">
  16.       <label for="male">Male</label><br>
  17.       <input type="radio" id="female" name="gender" value="female">
  18.       <label for="female">Female</label><br>
  19.       <input type="radio" id="other" name="gender" value="other">
  20.       <label for="other">Other</label><br><br>
  21.       <input type="submit" id="submit" value="Submit">
  22.     </form>
  23.   </body>
  24. </html>

Web view of Html:



Here is the Video: