Example:
<form action="demo_form.asp"> First name: <input type="text" name="fname"><br> Last name: <input type="text" name="lname"><br> <input type="submit" value="Submit"> </form>
Browser Support
The <input> tag is supported in all major browsers.
input標籤是被大多數的瀏覽器所支持的。
Definition and Usage
The <input> tag specifies an input field where the user can enter data.
input標籤,就是一個用戶可以輸入數據的字段。
<input> elements ares used with a <form> element to declare input controls that allow users to input data.
input元素是和form元素一起使用作爲允許用戶輸入數據的輸入操作。
An input field can vary in many ways , depending on the type attribute.
input可以有多種用法,由它的type屬性來決定。
Tips and Notes
Note: The <input> element is empty , it contains attributes only.
注意: input元素是空的,它只包含有屬性。
Tips: Use the <label> element to define labels for <input> elements.
技巧:使用<label>元素去定義<input>元素的標籤
Differences Between HTML 4.01 and HTML5
In HTML 4.01, the "align" attribute is deprecated , and it is not supported in HTML5. Use CSS to align <input> elements.
在HTML 4.01中,align屬性是棄用的,不贊成使用的,並且這在HTML5是不被支持的。(可以使用CSS排列<input>元素)
Attributes:
Attribute | Value | Description |
maxlength | number | Specifies the maximum number of characters allowed in an <input> element |
size | number | Specifies the width , in characters , of an <input> element. |
原文鏈接:http://www.w3schools.com/tags/tag_input.asp