Welcome to WebHeadStart.org

Web Technologies

Sponsored By

WebHeadStart.org is currently in beta.
Please pardon our appearance as we work to provide you with the most comprehensive reference on today's web technologies.

Interested in advertising on WebHeadStart? Become an advertising partner today!

[WWW-HTML Mailing List Archive Home] [Messages By Thread] [Messages By Date]

Re: sub/sup (was Re: samp, kbd, var)

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Tue, 22 Aug 2006 20:39:33 +0300 (EEST)
To: XHTML-Liste <www-html@w3.org>
Message-ID: <Pine.GSO.4.64.0608222027180.18786@korppi.cs.tut.fi>

On Tue, 22 Aug 2006, Patrick H. Lauke wrote:

> Along the same lines, what about sub and sup? To me, they seem dangerously 
> close to presentational markup, unless someone can enlighten me as to what 
> the semantic meaning of these two elements is...

The nature of subscripting and superscripting varies from purely 
presentational to strongly structural. It's a mistake to lump all kinds of 
usage under a simple model of just sub and sup.

> The examples given at http://www.w3.org/TR/xhtml2/mod-text.html#sec_9.12 . 
> aren't making it any clearer:
>
> H<sub>2</sub>O
> E = mc<sup>2</sup>

Those are traditional examples for HTML, but this does not make them any 
better. The former is "semi-structural". The meaning normally remains the 
same if <sub>2</sub> is replaced by mere 2, but subscripting is still part 
of the notation system and not just esthetic styling, and in some contexts 
it makes a semantic difference.

The latter uses strongly structural markup. To make the point even 
clearer, compare 2<sup>2</sup> by 22. The example is in error, since it 
purports to be physics formula but fails to use italics for the quantity 
symbols; it should be <i>E</i> = <i>m</i><i>c</i><sup>2</sup>, unless you 
define some semantic markup for quantity symbols. It's not a matter of 
styling; in physics, upright (Roman) "m" is a unit symbol, italicized "m" 
is a quantity symbol.

> Surely this should be marked up more rightly with something like MathML?

MathML is hopelessly complicated and thoroughly confuses structure and 
semantics with rendering. Too bad HTML 3 was never approved, or even made 
a complete draft; if implemented, it would have given something _useful_ 
in the area of mathematical markup.

> <span xml:lang="fr">M<sup>lle</sup> Dupont</span>

That's of course purely presentational (which doesn't mean irrelevant),
just as 1<sup>st</sup> vs. 1st is for English. So should it be eliminated? 
Do we really want to force people into writing foolish "structural" markup 
like M<span class="sup">lle</span>?

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/ 
Received on Tuesday, 22 August 2006 17:39:52 GMT
Valid XHTML 1.0! Valid CSS! Site Map | Privacy Policy | Terms of Use | WebHeadStart.org © 2005 All Rights Reserved.