- From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
- Date: Wed, 13 Jul 2005 18:58:54 +1000
- To: "Jukka K. Korpela" <jkorpela@cs.tut.fi>
- CC: XHTML-Liste <www-html@w3.org>
Jukka K. Korpela wrote: > _If_ such an attribute were added, the most obvious candidate for its > name would be "type", since that name is already used in some elements > where a data format is specified by its Internet media type, and > technically the value here, too, would probably have to be specified > that way, e.g. > <code type="text/html"><font></code> tags considered harmful.x That's certainly a possibility to consider, however my one concern with using the type attribute is that in this case, the element's content is not really the same as that indicated by the media type, but rather a marked up representation of it. Compare these: <code type="application/javascript"> var <var>foo</var> = document.getElementById("foo"); // Do something with foo... </code> <script type="application/javascript"> var foo = document.getElementById("foo"); // Do something with foo... </script> In the first case the content isn't really an executable block of javascript, whereas in the second case it is; yet the same attribute has been used for both purposes. -- Lachlan Hunt http://lachy.id.au/
Received on Wednesday, 13 July 2005 08:59:04 UTC