[thelist] Non-Deprecated HTML Presentational Elements (was, C SS Font Sizes)

Aylard JA (James) jaylard at equilon.com
Fri Mar 2 13:20:50 CST 2001


Calum,

> We could argue a need for <TELEPHONE>, <SURNAME>, <BRAND> and <PRICE
> currency=GBP>.

	I'll argue the need. And the answer is XML. ;)
	The increasingly fractured, proprietary path of HTML was getting out
of hand, helping to foster demand for standards and standards-compliance.
XML is part of that reaction (as is CSS), eliminating the need to further
expand HTML and its constellation of predefined elements. But I assume your
comment was rhetorical, and that you already knew that anyway. :)

James Aylard

<tip type="the script element and its type attribute">
	Being the hip coders that we are, many of us desire to conform to
the W3C HTML 4.x recommendation by including the "type" attribute in our
script elements (e.g., type="text/javascript") in addition to the
(now-deprecated) language attribute. However, be forewarned that using the
"type" attribute in most browsers will render the use of a specific language
version in the language attribute (e.g., language="javascript1.2")
ineffective. Most browsers will then execute the script regardless of the
language value indicated.
	So what's the solution? Use object detection whenever possible
(e.g., if (document.images)) and (but only if absolutely necessary) browser
sniffing, to determine whether a particular browser should execute your bit
of scripting. In rare cases when an explicit version number is required in
the "language" attribute, you will need to axe the "type" attribute from
your script element.
	To see whether this is true of the particular browser you are using,
go to:
http://members.evolt.org/jaylard/dev/js/js_JavascriptVersions.html
</tip>




More information about the thelist mailing list