Form html

HTML Forms are required when you want to collect some data from the site visitor. For example, during user registration, you would like to collect information such as name, email address, credit card, etc.
Adding a simple search box to your website or you need to create a more complicated application. Html gives you the platform to collect the data from your users.

The HTML <form> tag is used to create an HTML form and it has following syntax −
<form action = "Script URL" method = "GET|POST">
   form elements like input, textarea etc.
</form> 
 

 Form Controls
There are different types of form controls that you can use to collect data using HTML form −
  • Text Input Controls
  • Checkboxes Controls
  • Radio Box Controls
  • Select Box Controls
  • File Select boxes
  • Clickable Buttons
  • Submit and Reset Button



For example:-

<head>
    <title>table form</title></head>
    <body>
    <form>
        <table>
        <tr>
            <td>Name:-</td>
            <td><input type="text" name="fname"/>  </td>
            </tr>
        <tr>
            <td>Phone no:-</td>
            <td><input type="number" name="num"/>  </td>
            </tr>
        <tr>
            <td>E-mail:-</td>
            <td><input type="email" name="email"/>  </td></tr>
        <tr>
            <td></td>
            <td><textarea name="comment">comment plz..</textarea>  </td></tr>
       </table>
        </form>  
    </body>




Comments

Popular posts from this blog

Client Side Scripting Vs Server Side Scripting

The 5 Best WYSIWYG HTML Editors

About CSS