HTML - The input tag
The input tag does not need an ending tag and can have numerous attributes:
- text
- password
- radio
- checkbox
- reset
- submit
HTML - Text fields and passwords
...of which you have certainly completed a lot of, over the time, on the Internet.
<input type="text" /> <input type="password" /> |
|---|
Display
|
|---|
Write something in the boxes above to note the difference.
HTML - Checkboxes
Ideal for offering the user the option of selecting more than one answers
<input type="checkbox" /> <input type="checkbox" /> <input type="checkbox" /> |
|---|
|
|---|
HTML - Radio
And I am not meaning a music radio, but a little circle which offers the possibility of choosing only one answer for a single question.
<input type="radio" /> <input type="radio" /> <input type="radio" /> |
|---|
Display
|
|---|
HTML - Submit buttons
Here, we will have to give a value to the submit attribute, this being the text that will be shown on the generated button.
<input type="submit" value="Submit" /> <input type="submit" value="Next step >>" /> |
|---|
|
|---|
HTML - Reset Buttons
Here, same as with the submit button, we will have to give a value, that being the text
that will be shown on the generated button. This button is extremely useful in the cases
in which the user completes the majority of the forms with wrong information.
<input type="reset" value="Reset" /> <input type="reset" value="Delete All " /> |
|---|
|
|---|
HTML Input fields - Note
It must be specified that those forms and buttons will not fully act without the help of a php or javascript files that will execute the wanted action once one of these buttons is pressed. In the next tutorial we will go more in depth with the shown attributes and you will also show some things that we have not yet mentioned.
