Form Tag in Html -Html Basics

 FORM TAG IN HTML IN HINDI:



FORM TAG IN HTML HINDI

  • What is Form Tag?

So in simple words, imagine that you are filling a form which is used to provide the required information of the user to the website same is with the <form> tag, it is like the container where it holds various information like your name, phone number, e-mail address and many more.

तो सरल शब्दों में, कल्पना करें कि आप एक फॉर्म भर रहे हैं जिसका उपयोग उपयोगकर्ता की आवश्यक जानकारी वेबसाइट पर प्रदान करने के लिए किया जाता है, वही <form> टैग के साथ होता है, यह कंटेनर की तरह होता है जहां इसमें आपका नाम, फोन जैसी विभिन्न जानकारी होती है नंबर, ई-मेल पता और भी बहुत कुछ

  • Understanding Form Tag and its attributes with example:

1. Form Tag:
        Purpose: The form tag is just like a container where users can provide required information to the website.
                              Attributes:
   "action": Specifies where to send the form data when its submitted, it is just like a url.
  "method":Specifies how to send the form data by using ('GET' or 'POST') 'POST' is commonly used for forms that submit sensitive information like "passwords" where 'GET' is used for less sensitive data.
   Example- <form action="/submit-form.php" method="post">

2.Input Tag:
          Purpose: The input tag is used to create various types of input fields ('text', 'password', 'checkbox', 'radio','submit', etc.)
                          Attributes:
  "type": Specifies the type of input field (text,password, checkbox,radio,submit etc)
   "id":  A unique identifier for labelling and scripting.
   "name": A name associated with the input field which is sent along with the server.
   "value": The value of the input field, used for text inputs, checkboxes and radio      buttons.
   "placeholder": Provides an hint or an example of input field.
   
            Example(text input):
 <input type="text" id="username" name="username" placeholder="enter your name">
But this tag is incomplete without label tag it looks like this:


3. Label Tag:
            The label tag is used to associate with a text label with an input element. It helps users to understand what each input field is for. For example: <label for="username">Username:</label>would be associated with <input id="username" type="text"> now our input tag is complete.
                                                               
 Output:
4.<textarea> Tag:
                This tag creates a larger text area input where users can enter multiple lines of text. it's useful for things like comments or long messages.
Example:


Output:


5. "Select" and "Option" tags are used together to create dropdown menus. <select> creates an overall dropdown list and <option> tags inside it define each option in the list that users can choose from don't worry I explain in my next heading which contains particularly different types of input fields.
Example:


Output:





That's it for today guys but this was not the complete blog post for understanding form tag, one more blog is coming to understand you this tag briefly, some most important points are still remaining, so stay tuned with us some more wonderful content is arriving soon...
You can check out our previous blogs








Post a Comment

0 Comments