Quackit Logo

FREE Hosting!

With every domain name you register with ZappyHost, you get FREE hosting.

PLUS you get:

  • FREE Website Builder
  • FREE Blog
  • FREE Starter Web Page
  • FREE Email Account
  • & much more! (Total value $123 for FREE!)
Get your FREE hosting today! >>

HTML form Tag

Print Version
 

The HTML form tag is used for declaring a form.

Example
<form action="/html/tags/html_form_tag_action.cfm" method="get">
First name:
<input type="text" name="first_name" value="" maxlength="100" />
<br />
Last name:
<input type="text" name="last_name" value="" maxlength="100" />
<input type="submit" value="Submit" />
</form>

The above code produces the following form:

First name:
Last name:
Attributes:
Attributes specific to this tag:
AttributeDescription
actionSpecifies a URI/URL of the page that will process the form.
methodSpecifies the HTTP method to use when the form is submitted. Possible values:
  • get (the form data is appended to the URL when submitted)
  • post (the form data is not appended to the URL)
enctypeSpecifies the content type used to encode the form data set when it's submitted to the server. Possible values:
  • application/x-www-form-urlencoded (default)
  • multipart/form-data (use this when uploading files)
accept-charsetSpecifies a list of character encodings that the server accepts. The default value is "UNKNOWN".
acceptSpecifies a comma-separated list of content types that the server accepts.
nameAssigns a name to the form. This is used when referencing the image with stylesheets or scripts. However, you should use the id attribute instead.
Other Attributes:
AttributeDescription
classDocument wide identifier.
idDocument wide identifier
dirSpecifies the direction of the text
langLanguage code
targetSpecifies the target frame to load the destination page as indicated with the action attribute.
onSubmitIntrinsic event (see event handlers)
onResetIntrinsic event (see event handlers)
onclickIntrinsic event (see event handlers)
ondbclickIntrinsic event (see event handlers)
onmousedownIntrinsic event (see event handlers)
onmouseupIntrinsic event (see event handlers)
onmouseoverIntrinsic event (see event handlers)
onmousemoveIntrinsic event (see event handlers)
onmouseoutIntrinsic event (see event handlers)
onkeypressIntrinsic event (see event handlers)
onkeydownIntrinsic event (see event handlers)
onkeyupIntrinsic event (see event handlers)

Also see the complete list of HTML tags


Enjoy this website?

  1. Link to this page (copy/paste into your own website or blog):
  2. Add this page to your favorite social bookmarks sites:
                     
  3. Add this page to your Favorites

Oh, and thank you for supporting Quackit!