W3C home > Mailing lists > Public > www-validator@w3.org > September 2005

Re: note from Prof Knuth

From: olivier Thereaux <ot@w3.org>
Date: Wed, 21 Sep 2005 12:06:59 +0900
Message-Id: <B0E22575-AC29-4B77-8333-BBD8E2993509@w3.org>
Cc: www-validator@w3.org
To: mam@theory.Stanford.EDU
Dear Don,

Thanks for your reply to my message. I am glad that some of the  
suggestions and ideas I have tried to convey have, at least, tickled  
your interest. Notably, I think it is very positive if we can help  
you painlessly switch your content from using the netscape DTD to the  
standard HTML 4.01.

Liam already answered some of your questions very well (including,  
shame on me, pointing to one stupid error I made), but here are a few  
more answers and suggestions.

First, let me make it clear that I am W3C staff, so in this  
community, I am actually the only person not being here as a  
volunteer. The developers and the large user community helping  
maintain and support the tool are all benevolent contributors.


On 21 Sep 2005, at 08:24, Maggie McLoughlin wrote:
> After receiving your note, I looked for about half an hour at
> "Cascading Style Sheets". The whole idea of such things
> has always been scary to me, because I haven't time to
> learn every new language that comes along. I find it far
> more efficient to stick to a few basic tools that let me
> get quality stuff out the door quite efficiently.

This is a fair point, and of course no-one forces you to use CSS. In  
your case, since your content is very simply styled, I can understand  
that you could be reluctant to learn how to use CSS, and that you'd  
find more convenient to have your style information within the markup.

Imagine however that one day you choose to change the background  
color in your site. You are likely to want to do it for every  
document. Having only one style sheet document that all HTML pages  
refer to would make it easy to change the style consistently across  
your site, at least easier than having to edit all the HTML documents.

This is one of many advantages of separating style and structure...  
But if you'd rather not do that, it's OK, document types such as HTML  
4.01 Transitional (the one I recommended for you) allow you to use  
presentational markup in your HTML.


> Certainly if I ever do use such a thing, it won't be by applying  
> somebody's
> "tidy" system software to my documents; then I'd have to upgrade their
> tool every time a new feature came out, etc etc.

I think my explanation on tidy was not clear enough, sorry about that.

I suggested that tidy could do a "quick and dirty job" of filling all  
the missing alt attributes, but this was not my primary  
recommendation: as Liam explained, for images that convey a meaning,  
it is better to actually write something meaningful. And in any case,  
my suggestion was to use tidy only once.

> I realize that accessibility is a great virtue, etc. But do
> you guys need to legislate morality? When I put up an image,
> I do ask myself "is there a useful alt?", but almost always the answer
> is "no". And indeed, all the normal reasons for having a default
> are present. Certainly in a "loose" standard DTD, at any rate.

Liam already gave an explanation of why it makes sense to have empty  
alt attributes instead of none at all. But your question on  
legislating morality is interesting.

I think its is not "legislating morality" as much as it is "trying to  
design a good web for everyone". I noticed in your Web Site that you  
are talking about the lack of unicode support to display your chinese  
name. Well, today unicode support is mature, and that's because  
organizations and people such as W3C are making and standardizing  
technologies with accessibility, internationalization and device  
independence (for example) as design goals, not just as "moral  
principles that would be nice to have everyone follow".

> You suggested that I try
>   valign="middle"
> in place of
>   align="absmiddle".

valign was my mistake, sorry.

The standard way to do this is:
style="vertical-align: middle"
or, better
class="absmiddle"
With a rule in your style sheet that sets
img.absmiddle { vertical-align: middle }


> If you can tell me something that works for align="absmiddle"
> with your transitional 4.01 DTD, I will probably switch all
> of my hundreds of pages to that DTD. You are right, it
> won't take a week.

I can even give you a script that does it for you...

Attached to this mail are three files:

- if you want to give CSS style sheets a try, then upload style.css  
to the top of your site (in http://www-cs-faculty.stanford.edu/ 
~knuth/) and run knuth_transition_css.sh. It's a simple script that  
will replace the DOCTYPE with the one for HTML 4.01, change  
align="absmiddle" into class="middle" and will add a reference to the  
style sheet file.

- knuth_transition_nocss.sh is a very simple shell script that will  
go through the tree of your web site and will replace the DOCTYPE and  
the align=absmiddle with the style example above. This is the one you  
will want to try if you don't want to use a CSS style sheet.

I have tested these two solutions and they seem to be working, but  
I'm not a script wizard and these are 5 minutes hacks, so they may be  
bugged... please make sure to backup your site before you use them!

Thanks, and regards.
olivier.
-- 
olivier Thereaux - W3C - http://www.w3.org/People/olivier/
W3C Open Source Software: http://www.w3.org/Status






Received on Wednesday, 21 September 2005 03:07:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:20 GMT