W3C home > Mailing lists > Public > www-validator@w3.org > November 2009

Re: [VE][127] Regarding cols and rows attributes in textarea.

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Sun, 22 Nov 2009 10:20:04 +0200
Message-ID: <752B914E226741C9B7E9A81276513AA6@JukanPC>
To: "Eugen" <eugen@creativelines.ca>, <www-validator@w3.org>
Eugen wrote:

> If I have a <textarea> where the width and height is defined by CSS,
> why is it still required to add cols and rows attributes?

As far as markup validation is concerned, they are required because the 
document type definition (DTD) that you declare in your document makes them 
mandatory. CSS is something completely external.

> Why is it considered an error if I don't?

Because a markup validator, by definition, reports reportable markup errors.

If you would like to know why it is useful to specify the width and height 
attributes (and to use DTDs that make them mandatory, so that you don't 
accidentally omit or misspell them), think about the dozen or so reasons why 
your CSS rule might get ignored (see 
http://www.cs.tut.fi/~jkorpela/css-caveats.html for a quick list).

Yucca, http://www.cs.tut.fi/~jkorpela/ 
Received on Sunday, 22 November 2009 08:20:48 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:18:00 UTC