HTML in Hindi Forms




HTML मे Forms का उपयोग Data को Capture करने के लिए करते है. HTML मे Form को <form> Tag से Define करते है और इसे <body> Tag के अंदर रखा जाता है.

HTML Form एक User और एक Website या Application के बीच बातचीत के मुख्य Points मे से एक है. Form Users को Website पर Data भेजने की अनुमति देता है. Form से अधिकांश समय मे Web Server पर Data भेजा जाता है. लेकिन Web Page भी इसे स्वयं के उपयोग के लिए इसे Blocked कर सकता है.

HTML Form एक या एक से अधिक Widget का बना होता है यह Widget Text Field Box, Button, Checkbox या Radio Button हो सकते है अधिकांश समय उन Widgets को उनके उद्देश्य का वर्णन करने वाले Label के साथ रखा जाता है.

HTML Form को विभिन्न प्रकार के User से Inputs को इकट्ठा करने की आवश्यकता होती है जैसे Name, Email Address, Phone Numbers Credit Card की जानकारी आदि. HTML Form से आप किसी भी User से Data को Store करा सकते है.

HTML Form Syntax

<form action="server url" method="get|post">  
  //input controls e.g. textfield, textarea, radiobutton, button  
</form>  

HTML Form Tags

TagDescription
<form>यह प्रयोग किए गए पक्ष द्वारा Inputs Enter करने के लिए एक HTML Form को Define करता है.
<input>यह Input Control को Define करता है.
<textarea>यह एक Multi-line Input Control को Define करता है.
<label>यह एक Input Element के लिए एक Label को Define करता है.
<fieldset>यह Related Rlement एक Form मे समूह करता है.
<legend>यह एक <fieldset> Element के लिए एक Caption को Define करता है.
<select>यह एक Drop-down List को Define करता है.
<optgroup>यह एक Drop-down List मे Related Options के समूह को Define करता है.
<option>यह एक Drop-down List में एक options को Define करता है.
<button>यह एक Clickable करने योग्य Button को Define करता है.

HTML Form Example

<!DOCTYPE>
<html> 
   <head>
      <title>HTML Form Example</title>
   </head> 
   <body>
      <h3>HTML Form Example</h3>  
      <form action="#">  
         <table>  
            <tr>  
               <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>  
            </tr>  
            <tr>  
               <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>  
            </tr>  
            <tr>  
               <td class="tdLabel">
                  <label for="register_email" class="label">Enter Email:</label>
               </td>  
               <td>
               <input type="email" name="email" value="" id="register_email" 
               style="width:160px"/></td>  
            </tr>  
            <tr>  
               <td class="tdLabel">
                  <label for="register_gender" class="label">Enter Gender:
                  </label>
               </td>  
               <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>  
            </tr>  
            <tr>  
               <td class="tdLabel">
                  <label for="register_country" class="label">Select 
                  Country:</label></td>  
               <td><
                  <select name="country" id="register_country"
                     style="width:160px">  
                     <option value="india">india</option>  
                     <option value="pakistan">pakistan</option>  
                     <option value="africa">africa</option>  
                     <option value="china">china</option>  
                     <option value="other">other</option>  
                  </select>  
               </td>  
            </tr>  
            <tr>  
               <td colspan="2">
                  <div align="right"><input type="submit" id="register_0"
                     value="register"/>  
                  </div>
                </td>  
               </tr>  
         </table>  
      </form>  
   </body>
</html>  

Output