Re: MostlySemanticMarkup

On Mar 27, 2007, at 6:09 PM, Murray Maloney wrote:

> The Design Principle:
> [[
> MostlySemanticMarkup: In general, markup that express semantics, is  
> preferred to presentational markup. However, semantic markup is a  
> means to an end such as MediaIndependence. Profound and detailed  
> semantic encoding is not necessary if the end can be sufficiently  
> reached otherwise, for example by defining reasonable default  
> presentation for different media. It is preferrable to keep a  
> balance between semantic expressiveness and practical usefulness.  
> To some extent, semantics may include behavior. Names of elements  
> and attributes in the markup may be pragmatic (for brevity,  
> history, simplicity) rather than completely accurate.
> ]]
> I am an old SGML guy. I have heard about "Separation of information  
> from presentation"
> since the mid 1980's. Back then, information was buried inside  
> WordStar files and such.
> Your data was held hostage by the word processor that you used.
> Since then, a lot of people, SGML, HTML, XML and otherwise, have  
> taken up this idea
> as if it were a religious tenet. It's time to get over yourselves.

Perhaps I should make this principle more clear. It's an attempt to  
say that while expressing semantics is preferred, we must be  
pragmatic about this, and something that seems presentational may be  
better at achieving practical goals. That's why it's "mostly semantic  
markup", not "purely semantic markup" -- we *don't* want to treat it  
as a religious tenet.

On the other hand, it's clear that HTML isn't meant to be a purely or  
even mostly presentational format. We don't aim for it to become the  
next PDF, or SVG or XSL-FO.

> Sometimes you just want to
> say that "this text" should be emphasized, preferably as bold or  
> italic or red or blue.
> Sure, we could define an <emphasis> element and let people go wild  
> with CLASS
> attribute values, whose actual semantic is buried in a style sheet,  
> but that seems to
> be against PriorityOfConstituencies, DontReinventTheWheel, and  
> PaveTheCowpaths.

The principles too are not absolutes, and sometimes they may have to  
be weighed against each other. It's not guaranteed they will always  
be aligned.

I don't think we actually disagree here, I think the principle just  
needs more clear statement.

> If you really want semantic markup, use XML or SGML. Write a DTD or  
> a schema
> and document it well. Preferably, provide link ends for your  
> namespace so that
> the meaning of your elements can be discovered by following your nose.

In reality, presentational vs semantic, is a continuum, not a black- 
or-white statement. HTML clearly leans towards the semantic side. It  
is not as presentational as SVG, but neither is it as semantic as,  
say, DocBook. I think that this is ok and HTML should stick to this  
sweet spot. See this message from Tantek on the topic from a while back:

How can we better change the wording to reflect this continuum model  
and the proper places for HTML on it?

[... snip abbr vs. acronym discussion ...]

> We really do want to have <b> <i> <small> and a few other tags that  
> can be used
> to simply designate that a specific typographic effect is desired.

I agree! Although these could also be taken as expressing the most  
typical semantics of these typographic effects, which for instance  
the Web Apps 1.0 spec does.

> Yes, it's true that HTML tables are abused by designers. It's a  
> rotten shame. But there it is.

Note that your purpose in using tables doesn't affect conformance of  
either the document or the implementation, so I don't think  
presentational use of tables is relevant here. I don't see any  
reasonable way to ban this even if we wanted to.

[... snip remainder ...]


Received on Wednesday, 28 March 2007 00:57:38 UTC