W3C home > Mailing lists > Public > www-html@w3.org > February 2000

RE: inline CSS (was: is anyone interested in XHTML?)

From: Jelks Cabaniss <jelks@jelks.nu>
Date: Wed, 23 Feb 2000 00:08:24 -0500
To: <www-html@w3.org>
Message-ID: <NBBBICMNIPCICMKJECCBOEIFDGAA.jelks@jelks.nu>
Arjun Ray wrote:

> > <P CLASS="intro">This demonstrates <SPAN STYLE="text-decoration:
> > blink;">blink</SPAN>.</P>
> >
> > Surely anyone could understand that I preferred not to include a CLASS
> > in this case?
>
> But wouldn't this be the same?
>
>   <style>
>    #blink  { text-decoration: blink ; }
>   </style>
>   <P CLASS="intro">This demonstrates <SPAN id="blink">blink</SPAN>.</P>

Yes.  CLASS would do the same thing, too, though.

> Okay then, what's an ID-selector for?  Would there be any reason to
> use one?

Sure, you just gave one.  The advantage of CLASS over ID (from a CSS p-o-v in
this case) is when you want to have multiple items styled the same way.


/Jelks
Received on Wednesday, 23 February 2000 00:11:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:42 GMT