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: code and blockcode

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Wed, 13 Jul 2005 18:58:54 +1000
Message-ID: <42D4D7CE.3010401@lachy.id.au>
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">&lt;font&gt;</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 GMT
Valid XHTML 1.0! Valid CSS! Site Map | Privacy Policy | Terms of Use | WebHeadStart.org © 2005 All Rights Reserved.