W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2008

[whatwg] Placeholder option for text input boxes

From: Adrian Sutton <adrian.sutton@ephox.com>
Date: Fri, 03 Oct 2008 20:41:50 +0100
Message-ID: <C50C340E.8B08%adrian.sutton@ephox.com>
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.htm>
Received on Friday, 3 October 2008 12:41:50 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:06 UTC