W3C home > Mailing lists > Public > www-html@w3.org > December 2005

RE: HTML Improvement/Suggestion

From: Anne van Kesteren <fora@annevankesteren.nl>
Date: Mon, 12 Dec 2005 10:49:10 +0100
Message-ID: <20051212104910.l25zt8phjio0w488@webmail.annevankesteren.nl>
To: Mark Birbeck <mark.birbeck@x-port.net>
Cc: www-html@w3.org

Hi Mark,

Quoting Mark Birbeck <mark.birbeck@x-port.net>:
> I'll explain what I mean. People often say that you only need <div> and
> <span> (and perhaps now we're adding <object>). I always find that a little
> daft, because if you followed that logic right to its conclusion, then you
> actually only need <element> or even <node>, and you could just mirror the
> DOM in mark-up. (A *lot* of mark-up.)

Not sure what mean here. XHTML 2.0 introduced a way so any element could be a
hyperlink and any element could embed some document/image. From a "semantic"
point of view |<a href="">| is not really any different from |<span href="">|
(same for html:object) so I don't see the point in keeping html:a and

(XHTML 2.0 also introduced RFD and "role" with which you in fact can build an
entire document using just <div> and <span> and some attributes with
appropriate values...)

> However, as with any programming language, you would shortly find that you
> often did the same things over and over again, and so would want another
> element, one that captures the semantics of an <element> plus attribute
> combination. The result might be more usable, easier to explain, more
> compact, or whatever.

I'm arguing here about combinations which are exactly equal. Not an 
element plus
an attribute becomes a new element. No, an element plus an attribute has a
special case version of an element plus an attribute. (Where special case does
not actually add anything.)

As the html:a element is in a different namespace it is not very backwards
compatible and won't work in today's browsers so that can't be the argument.
And html:object would not be even compatible if you changed the namespace back
as the "data" attribute has been renamed to "src" to be more in line with the
general purpose attributes.

> I'm therefore saying that it is more art than science because there are no
> simple formulae that can be applied to work out where to draw the dividing
> line. <img> is used far more than an <object> that refers to a video, but
> how much more does it need to be used before it gets its own tag?

Well yeah, people love spacer gifs ;-) The way <img> is defined in 
XHTML 2.0 is
also not backwards compatible (letting aside the namespace) with the 
way it was
defined in HTML 4.01.

> Would it be the end of the world to lose the <img> tag? Of course not--and
> for me you could, since I'd rather see all external objects load the same
> way. But you have to agree, it's a pretty common pattern, so using <img> as
> a shorthand for <object src="..." type="image/*"> (or whatever the right
> attribute is) seems a pretty reasonable addition to me.

As the "type" attribute is merely a hint you do not really need that attribute
at all. Note also that the <img> element still accepts the "type" attribute.



Anne van Kesteren
Received on Monday, 12 December 2005 09:49:44 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:06:12 UTC