[whatwg] Text areas with pattern attributes?
Aryeh Gregor
Simetrical+w3c at gmail.com
Mon Aug 31 06:32:39 PDT 2009
On Sun, Aug 30, 2009 at 10:42 PM, Jonas Sicking<jonas at sicking.cc> wrote:
> The difference between <input type=text> and <textarea> is mostly a
> rendering one. One scrolls the text when it can't fit, the other
> wraps.
<input type=text> also can't contain newlines.
> Of course, another solution would be to allow <input type=text> to
> change rendering to be that of a textarea, and teach the world to
> migrate from <textarea> to <input type=text>. That would seem more
> semantically correct.
I actually think it's reasonable to argue that there's a meaningful
difference between a field designed to contain a single value, like a
username or social security number, and a field designed to contain
free-form text. I don't think things like autocomplete (or associated
features like datalist) really make any sense for textareas, for
example. Some browsers also spell-check textareas by default and not
<input type=text>, and so on.
Of course, by this logic, authors should use still <textarea> or
something for one-line free-form text inputs, like the subject field
of an e-mail form. But there are styling issues that would have to be
overcome for that to work.
More information about the whatwg
mailing list