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

[whatwg] Placeholder option for text input boxes

From: Jonas Sicking <jonas@sicking.cc>
Date: Tue, 30 Sep 2008 02:28:32 -0700
Message-ID: <48E1F140.50106@sicking.cc>
Benjamin Hawkes-Lewis wrote:
> Garrett Smith wrote:
>> |placeholder| sounds a little like |alt|. Alt is a property and an
>> attribute on INPUT.
> 
> How is placeholder content for a form field alternative text?

The alt text is for situations where the <input> can not be displayed at 
all. For example an <input type=image> where the image fails to load or 
the user has disabled. Or you could imagine in theory if the UA 
supported turning off form controls entirely.

The placeholder is content that is displayed along with a rendered form 
control.

Thus placeholder is used along with the form control, alt is used 
instead of it.

/ Jonas
Received on Tuesday, 30 September 2008 02:28:32 UTC

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