[whatwg] Thoughts on HTML 5
scampa.giovanni at gmail.com
Tue Dec 16 05:32:23 PST 2008
2008/12/16 Nils Dagsson Moskopp <
nils-dagsson-moskopp at dieweltistgarnichtso.net>
> Am Dienstag, den 16.12.2008, 14:14 +0100 schrieb Giovanni Campagna:
> > Maybe so-called "invalid" HTML attributes are not the only solution,
> > but in my opinion it is a simple way to embed metadata within any
> > element.
> What metadata are you talking about ? Microformats already exist.
I'm talking of any data that is related semantically to element and should
not be printed to the user or interact with default browser behaviour. There
is an example in the HTML5 spec of an element representing a spaceship in a
browser game, with data- attributes to provide fire / armour values
Imagine the spaceship has class "spaceship", then i can write the following
content: "Attack value " attr(data-attack,string);
content: "Defence value " attr(data-defence,string);
(The same behaviour can be achieved also with a @namespace rule, putting
non-standard attributes in an application-specific namespace)
> > Personally I prefer the latter (XML) solution, but there are context
> > where using XML serialization is not possibile (for example in user
> > generated content) so there is a definite need for a SGML way to add
> > custom attributes without conflicting with standards.
> HTML5 is not derived from SGML anymore.
My fault, I meant the HTML serialization of HTML5.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the whatwg