Home>Article>Web Front-end> How to use html input tag
The
tag is used to specify an input field in which the user can enter data. Input fields can take many forms depending on the value of the type attribute. Input fields can be text fields, checkboxes, masked text controls, radio buttons, buttons, etc.

html How to use the input tag?
Function:is used to specify the input fields in which users can enter data.
Description:
According to different type attribute values, the input field has many forms. Input fields can be text fields, checkboxes, masked text controls, radio buttons, buttons, etc.
Note:
In HTML, thetag does not have a closing tag. In XHTML, thetag must be closed properly. Theelement is empty, it only contains the label attribute.
Differences between HTML 4.01 and HTML5
In HTML 4.01, "align" data is no longer used. This attribute is not supported in HTML5. You can use CSS to define the alignment of theelement.
In HTML5,adds several attributes and adds corresponding values.
Differences between HTML and XHTML
In HTML, thetag does not have a closing tag.
In XHTML, thetag must be closed properly.
html input tag Example 1
Output:

The above is the detailed content of How to use html input tag. For more information, please follow other related articles on the PHP Chinese website!