<form> Tag Syntax

<body>
   ...
   ... flow content expected ...
   <form id="form-id" method="GET|POST|etc." action="target-URL">
       ... flow content ...
   </form>
   ...
</body>
Rules for coding HTML form elements

Make sure you understand the difference between a tag and element and are familiar with the definitions of namespace and other HTML terms.

  1. Include a form element where flow content is expected.
  2. Begin the form element with a starting <form> tag. The element name uses lower case letters and should be in the HTML namespace, which it will pick up automatically from the xmlns attribute on the <html> tag.
  3. Inside the form element, between the starting <form> tag and the ending </form> tag, code the inner HTML flow content.
  4. End the form element with a matching </form> closing tag.
Content Model
Contents of the form element

The content of the form element can include HTML comments, text content and any tags that can be used in flow content.