" is to define a single-line text field."/> " is to define a single-line text field.">

Home >Web Front-end >HTML Tutorial >What is html input

What is html input

青灯夜游
青灯夜游Original
2020-12-18 10:12:1411744browse

In HTML, input is an input box tag, used to specify an input field in which users can enter data; the input field can be changed in a variety of ways, depending on the type attribute within the tag, such as "< ;input type="text">" is to define a single-line text field.

What is html input

(Recommended tutorial: html tutorial)

HTML tag

The tag specifies an input field into which the user can enter data. Input fields can be changed in a variety of ways, depending on the type attribute.

The element is used in the

element to declare an input control that allows users to enter data.

Note: The element is empty, it only contains label attributes.

Example:

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
</head>
<body>

<form action="#">
用户名: <input type="text" name="Name" value="Mickey"><br><br>
密 码: <input type="password" name="Password" value="123456"><br><br>
<input type="submit" value="提交">
</form>

</body>
</html>

HTML type attribute

The type attribute specifies the type of element to be displayed.

The default type is: text.

Tip: This attribute is not required, but we think you should always use it.

Grammar:

<input type="value">

Attribute value:

What is html input

For more programming-related knowledge, please visit: Programming Teaching ! !

The above is the detailed content of What is html input. 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