Welcome to WebmasterWorld Guest from 18.104.22.168
Forum Moderators: not2easy
Use id when you want to apply the style to only one element.
An id has to be unique in name and only one "unique id" per page.
1) I’d suggest using classes & ids to describe what some is, not what it looks like. So instead of <h1 class="bluebold"> do something like <h1 class="sectionhead">. That way when the client comes back next week and says “I’d like my blue & bold headings to be pink & italic” it’ll make debugging easier in the future.
2) Mozilla recently added a (non-w3-standard) native implementation of getElementsByClassName [bugzilla.mozilla.org] to Gecko on the back of WHATWG’s forthcoming Web Applications 1.0 [whatwg.org] spec.
[edited by: Robin_reala at 10:11 am (utc) on Feb. 4, 2007]