W3C home > Mailing lists > Public > whatwg@whatwg.org > December 2006

[whatwg] Semantic styling languages in the guise of HTML attributes.

From: Matthew Raymond <mattraymond@earthlink.net>
Date: Wed, 20 Dec 2006 06:57:45 -0500
Message-ID: <45892539.5060502@earthlink.net>
Benjamin Hawkes-Lewis wrote:
> Matthew Raymond wrote:
>> semantic styling language
> 
> Sorry to interrupt, but I don't understand what this phrase means. How
> would you define a "semantic styling language" differently from a
> "semantic markup language", a "presentational markup language", and a
> "markup language for semantics and presentation"?

   A "presentational markup language" would be like SVG or X3D. They use
markup to create a presentation that may or may not be meaningful. HTML
is a "semantic markup language". It generally doesn't define how to
present an element. Instead, it defines the what that element is
supposed to mean in an abstract sense.

   A "semantic styling language" would be a language to assign semantics
to elements in a manner similar to how CSS controls their presentations.
One could change attributes like |href| and |rule| into style sheet
properties and they'd still work in the exact same way, except that you
would be able to use selectors rather than placing them on each element
individually. This is what I meant by my insensitive "half-a**ed"
comment. If you're going to do semantic assignment in a global fashion,
wouldn't you rather select entire categories of elements and assign a
set of semantic properties to them all at once?

   As powerful as this is, though, I strongly oppose it for two reasons:

1) HTML elements themselves would no longer have any meaning. They would
just be targets for semantic property assignment. Think about what
happens to the <a> element if |href| allows every element to be a hyperlink.

2) Semantics can interact in ways presentation never could. For
instance, what happens when you put |href| on an <input> element? What
does <h1 role="note"> mean? When attributes (or properties) are global,
every element has to define who it interacts with that property. The
number of interactions grows exponentially. (This is also a problem with
microformats that don't specify what elements certain classes, et
cetera, can be used on.)

   Markup for semantics AND presentation? That would be the <b> and <i>
elements. ;)
Received on Wednesday, 20 December 2006 03:57:45 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:31 UTC