Re: request from a colleague

My personal approach (rant) to the question "When to use style sheets?":

Whenever you want to determine a preferred presentation for your web content.
(In most commercial cases this means always). Use transitional HTML to add
some of the features that style sheets can provide, but do not accept the
idea that the graphic design is so important that the utility of the content
can be sacrificed to it, or that breaking the future to maintain the failures
of the past is a good process.

The long version:

The fact that you are designing for the lowest common denominated browser to
work means you need a strategy that transforms gracefully. Style sheets
provide just such a strategy.

If you want to provide greater control over presentation in old technologies,
there are two alternatives:
1. Design specifically for those old technologies, tothe exclusion of new
technology. This is similar to the strategy that brought you the Y2K bug,
countless cases of incompatibility increasing cost and decreasing
productivity, and retards widespread adoption of more appropriate and better
designed technology.
2. Design for the future, and then add whatever features can be safely
incorporated for people who remain bound to the past.

In the specific case of HTML, there are some hard choices. Stylesheets
provide a high degree of control over virtually all presentation, including
aural (sound) styles, positioning, etc. Some of these features (most notably
font styles and colours) can be happily provided by HTML 4.0 transitional
(and even by XHTML transtional) in a way which allows a few specific browsers
(Netscape 2 and 3, Explorer 2, Opera 2 I think) which did not implement CSS,
to be catered for in the same way as more modern browsers. In addition, there
are some features in CSS such as control of layout, which can be replicated
by the use of TABLE in HTML. 

*** This is a bad idea *** (Charles' personal opinion)

Using TABLE to control presentation is not easily compatible with CSS layout
control. It violates the semantics of a web page, and it is common that from
that decision comes, consciously or otherwise, an acceptance of web content
where the critical semantics are regarded as completely irrelevant. Most
users of the web will not thank you for this. Most of the users who might
think it is a fine thing won't know if you have done it or not, but for all
the rest it will be clear, and it will be a problem that you caused by making
a decision (or allowing it to be made for you).

Using font markup (EM, B, I, FONT, etc) to denote semantic structure such as
headings is a mistake. Although itwill always be possible, and is more
compatible with CSS than table-based layout, this is only by a small amount.
It does destroy one of the great strengths of CSS which also happens to be a
feature in most good browsers: the ability for the user to easily reconfigure
presentation of web content to suit their particular needs.

So do use CSS, if for no other reason than to learn the rules of the future
(remember all those people who said I don't need to learn computers - I'll
only be working another 20 years? Many of those who said it in the 80's
worked even less than 20 years), but mostly because it is a good way to
achieve a common goal. Many browsers, after all, do support CSS - it is
hardly new technology. Use transitional markup to extend the presentation
control that is a common goal. But do not use it in place of, or contrary to,
the underlying semantics of HTML (or any other markup language).

end of rant...

Charles McCathieNevile

On Sat, 29 May 1999, John O'Rourke wrote:

  John - thank you for running all these.  I will have to go to the
  Bobby site
  to see how to interpret the reports.  Do you have any suggestions
  as to what
  to do with ALT text if the message on the report says
  
  "If any of the images on this page convey important information
  beyond
  what is in each image's alternative text, add (whatever is
  appropriate such
  as longdesc)..."
  
  Also do you have any suggestions as to when to use style sheets?
  For
  instance, the report for Dialogue on Diversity, says to use style
  sheets to
  control layout and presentation, but we refrain from using style
  sheets as
  there are a lot of browsers that do not recognize this format and
  we try to
  design to the lowest common denominator.
  
  Hi Folks,
  
  I've received a request from a colleague.
  Does anyone have any opinions.
  John - thank you for running all these.  I will have to go to the
  Bobby site
  to see how to interpret the reports.  Do you have any suggestions
  as to what
  to do with ALT text if the message on the report says
  
  "If any of the images on this page convey important information
  beyond
  what is in each image's alternative text, add (whatever is
  appropriate such
  as longdesc)..."
  
  Also do you have any suggestions as to when to use style sheets?
  For
  instance, the report for Dialogue on Diversity, says to use style
  sheets to
  control layout and presentation, but we refrain from using style
  sheets as
  there are a lot of browsers that do not recognize this format and
  we try to
  design to the lowest common denominator.
  
  
  
  John O'Rourke
  

--Charles McCathieNevile            mailto:charles@w3.org
phone: +1 617 258 0992   http://www.w3.org/People/Charles
W3C Web Accessibility Initiative    http://www.w3.org/WAI
MIT/LCS  -  545 Technology sq., Cambridge MA, 02139,  USA

Received on Sunday, 30 May 1999 19:30:23 UTC