In this article we will lean what is html form or how to use html form or how to design an html form with example.


An HTML form is a section of a html document which contains input controls such as text fields, password fields, select fields, checkboxes, radio buttons, submit button etc. An HTML form provides facility to the user to enter data that is to be sent to the server for processing.

For example: If a user want to purchase some items on internet, he/she must fill the form such as shipping address and payment method such as credit/debit card details so that item can be sent to the given address.

Let’s see, Example of HTML form:

<!DOCTYPE html>
    <title>Example of HTML form</title>   
    <form action="#">
                    <td class="tdLabel"><label for="register_name" class="label">Enter name:</label></td>
                    <td><input type="text" name="name" value="" id="register_name" style="width:160px" /></td>
                    <td class="tdLabel"><label for="register_password" class="label">Enter password:</label></td>
                    <td><input type="password" name="password" id="register_password" style="width:160px" /></td>
                    <td class="tdLabel"><label for="register_email" class="label">Enter Email:</label></td>
                        <input type="email" name="email" value="" id="register_email" style="width:160px" />
                    <td class="tdLabel"><label for="register_gender" class="label">Enter Gender:</label></td>
                        <input type="radio" name="gender" id="register_gendermale" value="male" />
                        <label for="register_gendermale">male</label>
                        <input type="radio" name="gender" id="register_genderfemale" value="female" />
                        <label for="register_genderfemale">female</label>
                    <td class="tdLabel"><label for="register_country" class="label">Select Country:</label></td>
                        <select name="country" id="register_country" style="width:160px">
                            <option value="india">india</option>
                            <option value="pakistan">USA</option>
                            <option value="africa">africa</option>
                            <option value="china">Japan</option>
                            <option value="other">other</option>
                    <td colspan="2">
                        <div align="right">
                            <input type="submit" id="btnregister" value="register" />

 Let's check live example

Leave a comment

Make sure you enter the (*) required information where indicated. HTML code is not allowed.

You may also like