W3C home > Mailing lists > Public > www-html@w3.org > October 2001

RE: textarea syntax

From: Christian Wolfgang Hujer <Christian.Hujer@itcqis.com>
Date: Thu, 18 Oct 2001 11:04:22 +0200
To: "ptaff ptaff" <ptaff@beer.com>, <www-html@w3.org>
Message-ID: <000001c157b3$e09e0760$9a8f9b3e@andromeda>

> -----Original Message-----
> Hi;
>   i've been toying with the textarea tag while
> building a webpage with HTML 4.0/XHTML 1.0; I
> found it very hard to manage and here is why:
>   * the only 'presentation' tags allowed are
> 'cols' and 'rows' which hint the user browser
> about the size of the area in which the user may
> enter his data;
Since this is a serious list, just for your information: cols and rows
aren't tags, they are attributes.

>   now, the trouble is, you can't get any info
> about the user screen width without resorting to
> 'external' help like javascript.  Using the
Yes, you can't, and it is not needed, anyway :)
(See below, why)

> Galeon browser (which uses the Gecko rendering
> engine (brought by Mozilla)), if you use a too
> large value for 'cols', the canvas simply expands
> horizontally and the user has to scroll
> horizontally (annoying).  I don't know about
> other browsers, but the point is that the html
> code has to suggest appearance, and that is
> non-conforming to new standards.
Other browsers behave the same way. And I agree.

>   the displaying tags like <p> don't require any
> info about the screen size and these tags format
> text according to the user screen width.  I don't
> see why a textarea has to be as static as rows
> and columns.
That's true, I agree.

>   it'd be nice to have a parameter like 'length'
> (or whatever name you select) in the textarea tag
> to allow proper formatting.  As in:
> <textarea name="x" length="512"></textarea>
>   which would basically mean "cols=32 rows=16" in
> a 32-column environment and "cols=64 rows=8" in a
> 64-column environment.
That's a good idea, though to me it sounds like just another way of
presentational formatting in HTML.

>   i just hope that this isn't already on topic (
> i just subscribed to the list for that very reason)
I think your posting is okay :)

So here is what I suggest to you: use CSS.
<textarea cols="32" rows="16" class="mytextarea"></textarea>

and in your stylesheet something like this:
.mytextarea {

As you can see, this will allow proper formatting relative to the screen
size regardless of what the screen size actually is.
Of course, sorry, this is no solution for your "I want exactly 512 chars
space visible!"-problem.

But I hope this gives new ideas to you.

If you think, you have discussed enough with other list members, you might
post your request to the editors. But I'd first wait for other opinions on
that list.

>   good day to all,
Good day to you, too.


Christian Hujer
Received on Thursday, 18 October 2001 05:04:47 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:05:58 UTC