Skip to content

Comment on Don’t use IDs in CSS selectors? (2011)parent

Comments

No, browsers key IDs off a hash table in exactly the same way that they key classes. The reason is that the Web depends on being able to have multiple elements with one ID.

Source: I implemented this in Servo and studied Gecko, WebKit, and Blink code for it.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.