
Opening tag : <Form>
Closing tag: </Form>
Purpose:
Forms are used to interact with the user - they allow the website to collect information inputted by a user. Often text fields are placed on forms, as well as buttons.
Attributes:
Action=URL
- Here you can specify the webpage address of the page that should receive the data from the form - i.e. what action should be performed when the user clicks submit.
Class=class
- Specifies a class for formatting text on the form.
Dir=direction
- Useful for languages that should be read from right to left.
Enctype=data
- Specifies a MIME type for inputted data.
Event=Javascript
- Javascript can be associated with an event occurring on the form.
ID=name
- The form can be affected dynamically when using an ID
Lang=Language
- Specifies a language for text on the form.
Method=Method
- Specifies the method to be used when transferring the data to the next page. Choices are either GET or POST. When using GET, the data is added to the URL, while POST sends the data as part of the body.
Style=style
- Specifies a Style to be used for the form.
Title=title
- A title can also be given to the form. This is useful when dealing with some scripts.
Example:
<Form Method="Post" Action="submit.php">
Related Tags:
-
Back to:
Alphabetical Guide
Guide By Type