Glubase - share your knowledge


All / Computers / Programming / HTML / XHTML





  • View Command

HTML / XHTML Reference

HTML / XHTML form definition

Syntax

<form> ... </form>

Description

The form element defines a form where users can interact through the controls inside of the form. The different controls are: input, select, textarea and button.

Attributes

Attribute Description
action = uri The action the form should execute when the form is submitted.
method = [get | post] Wheter to use get or post method when submitting a form. Variables submitted with get method is shown in the URL. Variables submitted with post method is not.
enctype = contenttype  
accept-charset = charset list  
accept = content-type-list  
target = frame-target The target frame
onsubmit = script  
onreset = script  

Common attributes

Example

[Try this example yourself]
<form action="somepage.php" method="get">
<input type="submit" name="submit" value="Submit Form" \>
</form>

Output

  • Comments

No comments added.