Skip to: content, navigation

by Ian Lloyd

input (HTML element)

Spec
Depr. Empty Version
No Yes HTML 2
Browser support full matrix
IE5.5+ FF1+ Saf1.3+ Op9.2+
Full Full Full Full

Example

Here’s a simple text input (see type for other input examples):

<form>
  <label for="firstname">First name</label>
  <input type="text" name="firstname" id="firstname"/>
</form>
Type
inline element
Contains
nothing—empty element
Contained by
block-level elements, inline elements (except button)

Description

Describing the input element simply is not straightforward, as there is much variation in the way an input appears—and the attributes it uses or requires—depending on the type attribute specified. But whatever the type, the feature that’s common to all input elements is that they allow users to enter data.

The specific features of each kind of input are covered in the type attribute section of this reference. Other type-specific attributes are indicated as such in their own sections.

Use This For …

The input element is used to capture user information. The kind of control that’s used will vary on a case-by-case basis, as explained in type.

Compatibility

IE5.5Full
6.0Full
7.0Full
Firefox1.0Full
1.5Full
2.0Full
Safari1.3Full
2.0Full
3.0Full
Opera9.2Full
9.5Full

It causes no compatibility issues, and has excellent support across all tested browsers.

In this Section

Related Reading

User-contributed notes

There are no comments yet.

Add a note

To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.

Related Products

The Principles of Beautiful Web Design

Best Seller!

You don’t need to go to Art School to design great looking web sites!

Book Cover: The Principles of Beautiful Web Design

Download the FREE sample chapters