2 ms·
I don't agree with this suggestion either, but I don't think IDs have significant speed advantage: • browsers support duplicate IDs already (try `<p id=foo></p
by pornel 15y ago
I don't agree with this suggestion either, but I don't think IDs have significant speed advantage:
• browsers support duplicate IDs already (try `<p id=foo></p><p id=foo></p>` and you'll find that `#foo` styles both)
• both IDs and classes can be preprocessed and looked up using hash tables or similar
https://developer.mozilla.org/en/Writing_Efficient_CSS https://developer.mozilla.org/en/Writing_Efficient_CSS — suggests that Gecko optimizes class lookup as well