From: David Alan Black Date: 2001-09-05T20:14:50+09:00 Subject: [ruby-talk:20914] Re: Minor cgi.rb question Hello -- On Wed, 5 Sep 2001, Tobias Reif wrote: > W. Kent Starr wrote: > > > > A suggestion: use "standard" language for your passed hash keys, say > > "bgcolor" rather than "H_bcolor". The result would be that anyone reasonably > > skilled in HTML could look at the Ruby code and gain an immediate > > understanding of what is happening. > > > http://www.w3.org/TR/html4/appendix/changes.html#h-A.3.2 > * Almost all attributes that specify the presentation of an HTML > document (e.g., colors, alignment, fonts, graphics, etc.) have been > deprecated in favor of style sheets. The list of attributes in the > appendix indicates which attributes have been deprecated. > > http://www.w3.org/TR/html4/index/attributes.html > Index of Attributes > Legend: D = Deprecated, L = Loose DTD, F = Frameset DTD > > Use CSS. > > Ruby libraries should be up to date. For writing HTML, though, a tool like the CGI library (or the kind of HTML writer we've been talking about) is just a convenience, because it doesn't validate or even impose any mild constraints based on the DTD (such as limiting choice of elements). You can always just print whatever you want, which means that whether or not there's a specific method to print doesn't really have any deep implications. So something like having an HTML 3.2 mode, as opposed to an HTML 4.01 mode, or whatever, is mainly a matter of saving some typing. Excluding the older modes would just inflict a mild punishment on people who wanted to write HTML 3.2. (Maybe that's what you want :-) In case it's not clear, I'm not saying not to use stylesheets. (That's "a whole 'nother" topic, as they say.) I'm just saying that since the CGI library isn't a validating SGML/XML tool, the question of what convenience methods it does or does not provide is separate from the question of what Web authors should or should not be doing. David -- David Alan Black, dblack@candle.superlink.net ** Register for RubyConf 2001! ** http://www.rubyconf.com/regform.php ** Time is short... we need to reach the sign-up quota by Sep. 11!