Previous Message
Next Message

Re: [css-d] What is the difference between the ID and Class selector?

Sent by Timothy J. Luoma on 20 December 2002 20:08


On Fri, 20 Dec 2002 11:45:54 -0800, Jeff Shepherd [EMAIL-REMOVED]> 
wrote:

> What is the difference between the ID and Class selector? When should one 
> use class and when should one use ID?

1) ID can only be once per page
2) Classes can be many per page
3) ID can be accessed as links in newer browsers 
http://www.example.com/some/file.html#foo
4) ID can be access via DOM

For more, there's a fairly short explanation of that here:

	http://css-discuss.incutio.com/?page=ClassesVsIds

(That's the CSS-D wiki, which you can find off www.css-discuss.org)

If that doesn't answer it, please feel free to ask a followup.

TjL

-- 
Timothy Luoma [EMAIL-REMOVED]>
30 Days to Becoming an Opera (6) Lover http://tntluoma.com/opera/lover/
(an Opera7 version will follow once it is officially released)
Opera Etc Blog: http://tntluoma.com/beyond30
Previous Message
Next Message

Message thread: