Re: stupid multiple definitions for the TYPE attribute

At 06:31 PM 9/6/97 -0400, Joel N. Weber II wrote:
>The TYPE attribute has been used for a variety of things, such as
>the TYPE of input field in a form, the TYPE (media type) of an OBJECT,
>etc.

So far so good.


>Then it was defined for nearly every attribute when you use
>inline style.

No, the current draft of HTML 4.0 does *NOT* allow the TYPE attribute
with most elements.  Instead, you are advised to use a META
element to indicate the default style sheet language (see below).


>Here's an example where it specifies the style sheet language:
>   <P type="text/css" style="font-size: 12pt; color: fuschia">Aren't  
>   style sheets wonderful?

No, according to the HTML 4.0 draft [1], TYPE is not a valid attribute
for the P element.  Instead, the style section [2] recommends that you
use this META element to set the style sheet language for inline
style excerpts:

<META http-equiv="Content-Style-Type" content="text/css">

Putting this in the head section a document declares that all
future inline style sheets (with the STYLE attribute) are written
in text/css.


>(Both of these examples come from one version of the HTML 4.0 spec.)

To quote Dan Connolly, "Cite a source!" [3]  Please cite exactly where
your quoted code comes from.  I agree that an earlier version of HTML
4.0 may have allowed the TYPE attribute for most elements, but the
current draft does not. 


>[If you reply to this, please reply only to www-style or www-html; not
>both.]

Excellent advice, but this will leave all of the readers of www-style
unable to see my reply and someone there may duplicate my work of
replying to this message.  It's better to post to just one list in the
first place.  Since you're writing about HTML 4.0 attributes, it seems
to me that www-html is more appropriate.

[1] http://www.w3.org/TR/WD-html40/struct/text.html#edef-P
[2] http://www.w3.org/TR/WD-html40/present/styles.html#h-8.1.1.1
[3] http://www.w3.org/People/Connolly/index.html#opinions
-- 
E. Stephen Mack <estephen@emf.net>    http://www.emf.net/~estephen/

Received on Sunday, 7 September 1997 01:53:19 UTC