// References / The HTML Form Element

Posted The: 15/08/2008 - AT: 19:41

Edited The: 01/09/2008 - AT: 10:44

The Form element in HTML creates a form, this can be used to submit data to the server. The server wil handle any submitted data, with a server-side script.

Warning

Data submitted through forms should be validated on the server as well, because the client-side validation methods are easily omitted.

Atributtes

Standard atributes

Atributte:Value:Description:DTD:
AttrsOther AttributesCommon, I18n, EventSTF
actionURIserver-side form handlerSTF
methodGET|POSTHTTP submit methodSTF
enctypeContentTypeSTF
acceptContentTypeslist of MIME types for file uploadSTF
nameCharacter Dataname of formSTF
onsubmitScriptthe form was submittedSTF
onresetScriptthe form was resetSTF
accept-charsetCharacterSetslist of supported charsetsSTF
target
  • _self
  • _blank
  • _parent
  • _top
Target window of the formTF

DTD. Defines which document type the attribute is allowed. S=Strict, T=Transitional, F=Frameset.

Examples

Simple Example.

<form action="action.php" method="post">
</form>

Final Example

Complete Example.

<form action="action.php" method="post">
 <input type="text" name="name">
 <input type="text" name="email">
 <textarea cols="40" rows="5" name="textmsg"></textarea>
 <input type="submit" value="Submit">
</form>

The complete example was included to spare you the time, of looking each entry up in the reference.

Stumble It!

Author: BlueBoden

Comments: [0]

  1. HTML Tutorial
  2. CSS Tutorial
  3. XHTML Tutorial
  4. RSS Tutorial
  5. PHP Tutorial
  6. htaccess Tutorial
  7. Server Tutorial
  8. SEO Tutorial

Checked At:07:50

7 Guests

0 Users

Online doing the past 15 Minutes!

PageRanking.dk - Flere hits og højere PageRank - GRATIS tilmelding!

This page was created in 0.101526975632 seconds

Welcome Guest