Home>Article>Web Front-end> How to use html input tag

How to use html input tag

青灯夜游
青灯夜游 Original
2019-05-26 17:45:28 4220browse

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.

How to use html input tag

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:

How to use html input tag

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:How to use html dfn tag Next article:How to use html dfn tag