[whatwg] Placeholder option for text input boxes

Adrian Sutton adrian.sutton at ephox.com
Fri Oct 3 12:41:50 PDT 2008


On 03/10/08 18:34, "Tab Atkins Jr." <jackalmage at gmail.com> wrote:
>    @Jonas: The question that presents itself is what semantic @placeholder
could present that isn't already covered by <label>.

Placeholder contains example text really nicely.  It¹s quite distinct from
the field label, aids usability and is too useful and important to be
considered just a display attribute.  For example:

<form>
<fieldset>
<legend>Address</legend>
<label for="name">Name:
<input type="text" placeholder="John Doe" id="name">
</label>
<label for="address1">Address line 1:
<input type="text" placeholder="1 Infinite Loop" id="address1">
</label>
<label for="address2">Address line 2:
<input type="text" placeholder="Cupertino" id="address2">
</label>
</fieldset>
</form>

Addresses prove to be an extremely good example because there are so many
different formats around the world and people get confused.  Dates also
matter, eg:

<label for=²date²>Date: <input type=²text² placeholder=²1 Jan 2008²
id=²date² /></label>

While ideally the server would deal with a huge variety of date formats
giving a subtle hint about a format that would work particularly well is
very useful and a lot more user-friendly than (DD/MM/YY).  I¹m sure there
are plenty of other examples of data types that would benefit from an
example rather than just a lot of text describing the field.

Regards,

Adrian Sutton.
______________________
Adrian Sutton, CTO
UK: +44 1 753 27 2229  US: +1 (650) 292 9659 x717
Ephox <http://www.ephox.com/>
Ephox Blogs <http://planet.ephox.com/>, Personal Blog
<http://www.symphonious.net/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20081003/3d5bf650/attachment-0001.htm>


More information about the whatwg mailing list