Introduction: In my "HTML For Beginners: Part 4" I provided an introduction to HTML form element form controls.
In this part 5 I will explain more about forms and its some validations and get and post method of form.
Form Element Attributes: HTML tag can have one or more attributes. Attributes provides more information about that tag. HTML forms have following attributes:
accept-charset : Specifies the charset encoding which will be accepted by the server. The default value of this will be the page charset or “UNKNOWN”.
Example:
  1. <form action="example.php" accept-charset="UTF-8">
  2. Email: <input type="email" name="_email"><br>
  3. <input type="submit" value="Submit">
  4. </form>
action: Specifies what script the form data should be sent to for processing. Specifies the URL or URI of that page where the data will be process or submit.
Example:
  1. <form action="example.php">
  2. Email: <input type="email" name="_email"><br>
  3. <input type="submit" value="Submit">
  4. </form>
autocomplete: This attribute specifies whether the form fields should be automatically completed based on user's history or not. If it is autocomplete then users information can be fill from history. The autocomplete attribute is enumerated, which has two states; "on" and "off". The default value is "on".
Example 1: When autocomplete is "ON"
  1. <form autocomplete="on">
  2. First name:<input type="text" name="FirstName"><br><br>
  3. Last name:<input type="text" name="LastName"><br><br>
  4. E-mail: <input type="email" name="email"><br><br>
  5. <input type="submit">
  6. </form>
Output: