< HyperText Markup Language < Tag List

Use

This lets the user create a form. This element lets the web page owner gather information from the users.

For a brief introduction, see the HyperText Markup Language/Forms section of this book.

Example

<form method="post" action="SignIn.php">
<input type="text" name="UserName" size="6">
<input type="password" name="Password" size="6">
</form>

Required attributes

method

Specifies how information from a form transfers to a Web Server.

action

Identifies the Web Page or CGI that the information from the form is to be sent.

Optional attributes

class

Associated CSS classes.

id

A string that will be unique throughout the page.

lang

The ISO language code.

onreset

A declared script that is run before a form's data is erased.

onSubmit

A declared script that is run before a form is submitted.

style

Inline CSS commands.

title

Advisory title.

Standard attributes

More info

A link to a page with more info, then the name of the site the info came from (i.e. W3Schools).

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.