Re: stylish semantics

On Tue, 8 Aug 2000, William Loughborough wrote:

> If I use a style to convey meaning how do I convey that to e.g. a Lynx
> user?

This is a question to which one can give a simple and straightforward
answer, or a rather complex and subtle one.

Here's the simple answer.  The whole point of the separation of style
from content is that your meaning is supposed to be put into the
content.  Anything which goes into the stylesheet is by definition not
part of your content, but part of your presentation.  The stylesheet
only suggests way(s) in which that content might be presented in one
or other viewing situation, if feasible.

However, the key to getting more elaborate styling than can be
expressed by keying style attributes to HTML elements alone, is to use
classes.  For example if I mark up a phrase with <strong
class="warning"> then I can be assured that all browsers will present
this with strong emphasis, whatever that might be in their terms.  
However, the subtlety which, as far as I can see, is still a bone of
contention, is the class name, which has no defined semantics and
which won't normally be presented to the reader.

In my visual stylesheet I naturally arrange for class="warning" to
be displayed in red.  But this might not be useful for some kinds of
colour blindness, and certainly will not be useful for a speaking
browser or an indexing robot.

I can take it for granted that it's obvious to you (once it's pointed
out to you that it's there) what additional "meaning" my
class="warning" carries, relative to an unandorned <strong> markup.
But there is no way of conveying this additional meaning to a reader
who does not have an appropriate stylesheet available for the purpose.

So, as far as the reader is concerned, <strong class="warning">
carries no more meaning than if it had been <strong class="k5368">,
even though to me as the author its intent was clear; it's just a
semantics-free handle used to tie between markups in the HTML, and
style suggestions in the stylesheet.  That's the one theory, as
opposed to the competing interpretation whereby <strong
class="warning"> is a kind of HTML extension mechanism that
effectively defines a new <warning> tag.

So, this still seems a bit of a grey area, about which some
fundamentally different views are held about principles.  Whichever
view you hold on the principles, it seems to be good practice to use
class names that are indicative of the significance in regard to
meaning (class=warning, charter, aimsandobjectives, whatever) rather
than in regard to one possible desired specification (class=red,
specialfont, bigitalics and so on).  But whichever way you go, the
class name isn't a part of the information that gets shown to the
normal reader.

> The example I have in mind is that I use a style that puts something up
> as a sidebar and my intent is that this represents the author's "voice"
> in a document otherwise using others' materials. 

That sounds like a <blockquote> to me. 

> It is perhaps evident
> to a sighted user that this is what's happening. What mechanism might we
> recommend to communicate this?

Good question.

The "title" attribute is available for additional textual information
about the resource to which it is applied.  This "resource" could be
as small as a few words enclosed in an appropriate element. An
appropriate browser would be able to make that additional information
available to the user if desired.  (Right, I realise that Lynx doesn't
offer that currently, but it could presumably be provided if desired.)

I don't think I have a better answer, that would work usefully when
needed, and not cause trouble when it's not needed.  But like most
things, it needs to be supported somehow in the relevant browsers.

best regards

Received on Tuesday, 8 August 2000 15:47:05 UTC