On its own, the forms are useless. They must be connected to a program that processes the data entered by the user. They take all sorts of guises and are outside the remit of this website. If you use an Internet service provider to host your HTML, you can help with this and probably will be simple and clear instructions on how, for example, to make a form work email form.
The basic tags used in the HTML of the actual forms are form, input, text area, select and option.
Define the shape and form within this label, there is an attribute of action necessary to consider how your content will be sent to the date of submission.
The optional method attribute tells the form how the data that will be sent and that you can obtain the value (which is the default) or by mail. This is commonly used, and often set to post the information hiding (the closures of information in the URL).
Thus, a form element will look something like this:
<form action="processingscript.php" method="post">
</form>
The input tag is the daddy of the form world. It can take ten forms, outlined below:
Is a standard text box. This can also have a value attribute, which sets the initial text in the text box.
- Is similar to the text box, but the characters entered by the user will be hidden.
- Is a check box that may be activated by the user. This can also have an attribute set, to be used in the format, And makes the initial state of the checkbox to be on, so to speak.
- Is similar to a checkbox, but the user can select only one radio button in a group. This can also have an attribute set used in the same way that the check box.
- Is an area that displays the files on your computer, as seen when opening or saving a document in most programs, and is used to allow users to upload files.
- is a button that when selected the form is submitted. You can control the text on the submit button (as you can with the reset button and type - see below) with the value attribute, eg .
- Is an image that presented the coordinates of where the user clicked. This also requires a src attribute, as the img tag.
- Is a button that will do nothing without the extra code added.
- Is a button that when selected will reset the form fields to their default values.
- Is a field that will not be displayed and used to pass information as the name of the page that the user or the email address that the form should be sent a.
Note that the input tag and a closing "/>" at the end.
A text area is basically a large text box. Is required rows and cols attribute and used like this:
A big load of text here
The select works with the label of choice to make the selection drop down boxes.
They work like this:
- <select>
- <option value="first option">Option 1</option>
- <option value="second option">Option 2</option>
- <option value="third option">Option 3</option>
- </select>
0 comments:
Post a Comment