Home  >  Article  >  Web Front-end  >  What does input mean in HTML?

What does input mean in HTML?

清浅
清浅Original
2019-05-14 10:04:2213273browse

Input in HTML means an input field that allows users to enter data. According to different type attribute values, its input field can have many forms, such as text fields, check boxes, radio options, and buttons. etc.

What does input mean in HTML?

input tag

The input tag is used to collect user information. Input fields have many forms depending on the type attribute value. Input fields can be text fields, checkboxes, masked text controls, radio buttons, buttons, etc.

Tag Definition and Usage Instructions

Tags specify input fields in which users can enter data. The

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

Input fields can be changed in a variety of ways, depending on the type attribute.

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

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 elements.

In HTML5, several attributes are added and corresponding values ​​are added.

Differences between HTML and XHTML

In HTML, the tag does not have a closing tag.

In XHTML, tags must be closed correctly.

Example:

<html>
<body>
<form>
  <p>First name: <input type="text" name="fname" /></p>
  <p>Last name: <input type="text" name="lname" /></p>
  <input type="submit" value="Submit" />
</form>
</body>
</html>


The above is the detailed content of What does input mean in HTML?. 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