HTML < form > Tag - Learn About Website | DaddyFile

0

HTML <form> Tag

Example

An HTML form with two input fields and one submit button:

<form action="demo_form.asp" method="get">
  First name: <input type="text" name="fname"><br>
  Last name: <input type="text" name="lname"><br>
  <input type="submit" value="Submit">
</form>

Definition and Usage

The <form> tag is used to create an HTML form for user input.
The <form> element can contain one or more of the following form elements:

Differences Between HTML 4.01 and HTML5

HTML5 has added two new attributes: autocomplete and novalidate, and removed the accept attribute.

Differences Between HTML and XHTML

In XHTML, the name attribute is deprecated. Use the global id attribute instead.

Post a Comment

 
Top