W3C selectors
The Selectors W3C Specification is one of the standards used to select nodes in HTML and XML documents. Selector strings are used by the CSS specification to apply style properties to HTML and XML elements. They are also used to select nodes in popular JavaScript libraries, such as jQuery. In D3, W3C selectors are used to match against existing nodes, but also to create entirely new DOM trees.
Most of your D3 selection expressions will consist of a single simple selector of one of the six types described in the W3C Level-3 specification, listed in the following table. Selections always select elements and are applied to a context (defined by the application). The result of a selection can be an empty set or a set that contains ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access