HTML Input Tag

The HTML tag is used to represent a form input control in HTML document. This form input control facilitate user to input data and communicate with a website or application. Let's take an example of an HTML form with three input fields, two text fields and one button for submission.

HTML Input Tag Example

Let's see the example of HTML input tag.

Test it Now


First name:
Last name:

Click the "Submit" button for sending the form-data to a page on the server.

Points to remember

1) Use the input element within the form element to declare input control that allow user to enter data.

2) The input element is empty. It contains attributes only. There is no need of an end tag in HTML.

3) If you want to define labels for input element, use the label element with each input tag.

Difference between HTML4.01 and HTML5

HTML5 does not support "align" attribute. There are several new attributes for tag in HTML5, and the type attribute has several new values.

Difference between HTML and XHTML

In HTML, tag is used without an end tag. In XHTML, the tag must be properly closed.

Supporting Browsers

Element chrome browser Chrome ie browser IE firefox browser Firefox opera browser Opera safari browser Safari
Yes Yes Yes Yes Yes
Next TopicHTML ins Tag

Hot Tutorials

Contact US

HTML input Tag