HTML Forms
HTML Form Example
The <form> Element
The HTML <form> element defines a form that is used to collect user input<form>
<form>
.
form elements
.
</form>
The <input> Element
he <input> element is the most essential frame element.
The <input> element can be shown in several courses, contingent upon the sort trait.
some examples:
Type | Description |
---|---|
<input type="text"> | Defines a one-line text input field |
<input type="radio"> | Defines a radio button (for selecting one of many choices) |
<input type="submit"> | Defines a submit button (for submitting the form) |
Text Input
<input type="text"> defines a one-line input field for text input:
Example:
<form>
First name:<br>
<input type="text" name="firstname"><br>
Last name:<br>
<input type="text" name="lastname">
</form>
This is how it will look like in a browser:
This is how the HTML code above will be displayed in a browser:
First name:
0 comments:
Post a Comment