<input> element – vastly improved over HTML4 and XHTML. Many new attributes (types of input). Unfortunately most are not presently supported in many browsers. Opera (current versions) seem to provide the best support.

Usage: typically used as part of a form to collect information from a visitor.

Permitted Content: typically self contained (part of <form> element.

Tag omission: both start and end tag must be present (or element must be self contained).

Example code:

<input type=”text” name=”homePlanet” id=”homePlanet”¬† />
Example page (opens in a new tab/ window – view source code):

Default display properties: will appear as text input box.

Common Attributes:

  • autocomplete = “on | off” – on is default
  • placeholder = “some value” – will display in entry area until field is selected
  • required = “required” (I know this syntax may seem overkill to those who have not coded a lot of XHTML) – means this field is required
  • type=”text | password | checkbox¬† | radio | button | submit | reset | file | hidden | image | datetime | datetime-local | date | month | time | week | number | range | email | url | search | tel | color” – these are the current alternatives for the type attribute. Those in bold are new to HTML5.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.