INPUT Tag
What It Does:
The INPUT tag allows the user to enter data.
The Syntax:
<input type="button" value="Press Me!">
The code above translates into this:
- The INPUT tag is empty, it only works with attributes
- In HTML, the input tag has no end tag, while XHTML requires it.
List of common attributes:
-
Type = Tells what element to display.
Here are some common ones :
-
Text = Shows a 1 line text box.
-
Button = Shows a button with text inside.
-
Checkbox = Something that you could select 0 or more.
-
Radio = Something that you could only select once.
- Submit = Defines a submit button.
-
The submit button will submit data from input inside of a form tag.
-
There are many input types that are new in HTML 5 but do not have good browser support.