[whatwg] Fwd: Can <var> possibly work?

To list.

---------- Forwarded message ----------
From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, Sep 19, 2008 at 6:23 PM
Subject: Re: [whatwg] Can <var> possibly work?
To: Ozob the Great <ozob1337 at gmail.com>


On Fri, Sep 19, 2008 at 5:41 PM, Ozob the Great <ozob1337 at gmail.com> wrote:

> I am concerned about the existence of HTML5's <var>. This was brought to my
> attention during a technical debate on Wikipedia which amounted to: Where is
> use of <var> appropriate? The problem is that while <var> can be used to
> distinguish variables from non-variables, there are many other mathematical
> constructs which cannot properly be called variables. If variables are going
> to be distinguished by the markup, then these other constructs ought be
> distinguished by the markup. But they can't be put inside <var> because
> they're not variables, and furthermore, they can't always said to be
> constants, functions, spaces or any short list of allowable objects; the
> number of different types of objects occurring in mathematics is tremendous,
> and specifying all the allowable objects in HTML markup is undesirable.
>

Your error is in assuming that HTML5 wants to be very specific about math
markup.

<var> *can* be used to mark up variables in a mathematical expression.  It's
primary use, though, is to mark up variables in things like, say, computer
code, because these are often styled differently than the rest of text.
Frex, a <code> block may be generally just white-space:pre, but the vars
will be bold as well.

In simple math expressions (the kind that can be expressed in vanilla
html5), there is usually also a special convention for marking up
variables.  Oftentimes they are simply italicized.

If you are wanting to mark up complex mathematical text with explicit
semantics, one should indeed use MathML.  <var> is not meant to replace it;
it's meant to provide a simple bit of semantics for a relatively common
use-case.

~TJ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20080919/93205ef3/attachment.htm>

Received on Friday, 19 September 2008 16:24:32 UTC